I am developing a nutrition instant answer for Jive Search and am looking for data sources for queries like "calories in a big mac", "how much protein is in milk?", etc. I am aware of USDA's API but finding relevant products in their API is somewhat challenging. For instance, finding "butter" returns a lot of irrelevant results:<p>https://api.nal.usda.gov/ndb/search/?format=json&q=butter&sort=r&max=25&offset=0&api_key=DEMO_KEY<p>I could apply the food group filter to help with relevancy and filter by "Dairy and Egg Products" but without knowing the food group beforehand makes it difficult and a manual process.<p>There is the Nutritionix API but that is pretty expensive for the number of calls we will be making (and this is bootstrapped). There is also Open Food Facts, but they seem to be missing basic items such as calories.
I know you asked for raw nutritional information, but the topic of healthy food is a lot more complex than that. Different foods also <i>interact</i> with each other, having a significant influence on how they affect your body.<p>For example, if you eat pancakes, or the same amount of pancakes with fresh blueberries, the latter will give <i>less</i> of a spike/crash in blood sugar despite having <i>more</i> calories.<p>So this is not quite what you asked, but <a href="https://nutritionfacts.org/" rel="nofollow">https://nutritionfacts.org/</a> by Dr. Michael Greger is an interesting source for what nutrition science has to say about healthy diets. Yes, he is biased towards a diet without animal products, but he is very open about his own biases. Plus, the science really does seem to back that one up anyway.<p>There is a strong pop-science bent to his presentations that might put some people off, and repeats the same points over and over, but he <i>does</i> use actual nutrition research papers as his sources and takes time to point out caveats with the studies he refers to, and actively seeks out high-standard studies.<p>Also, the fact that he first recommended cinnamon for better insulin response, then updated that stance when later papers made it clear that they might damage the liver (<i>ceylon cinnamon</i> is safe but has no benefits for insulin response) gives me more faith that he does his best to only give advice that is properly backed up by science.