Recipe - Food - Nutrition

FREEMIUM
Verified
By David | Updated לפני 24 ימים | Food
Popularity

9.9 / 10

Latency

1,410ms

Service Level

100%

Health Check

N/A

Back to All Discussions

Incorrect nutritional data

Rapid account: Jacq
jacq
לפני 9 שנים

Hi there,

Through testing your api in an application I’m developing, I’ve noticed that the nutritional data is unreliably incorrect.

For example, ‘brown rice’ returns almost 3x the amount of calories than it should (compared to a host of other nutiritional websites). I have triple checked that I’m comparing the same values (100 grams brown rice) and it is consistently wrong.

I have no way of knowing if any of the other nutritional data is reliable enough to use without double checking it all against other sources, and this totally negates the purpose of using the api in the first place.

Having access to nutritional data for ingredients is the sole purpose of me using this api.

Can you please provide some sort of explanation as to why I am finding incorrect data?

Thanks in advance

Rapid account: Spoonacular
spoonacular Commented לפני 8 שנים

Hi again,

We have resolved the issue with “1 cup steamed green beans” - thank you for pointing out the error. If you want to see which ingredient we have matched, you can use this endpoint: https://market.mashape.com/spoonacular/recipe-food-nutrition#parse-ingredients

In general, though, our API is currently best suited for calculating the nutritional information for recipes, where raw ingredients are standard as we explained. We have cooked grains in our database because recipes do, on occasion, specify already prepared grains. This is unusual for vegetables, and the nutritional information for 1 cup raw green beans is not substantially different from 1 cup cooked green beans anyway. This is obviously not true for ingredients that change volume significantly when cooked (spinach comes to mind), so we’ll work on adding more cooked data in the near future.

Please email me at david@spoonacular.com so we can discuss your specific use case in more detail to determine how the API can be best used to deliver the functionality you’re looking for.

Rapid account: Jacq
jacq Commented לפני 8 שנים

Hi Guys. Could you please explain this one.

We are running a 6 week fitness challenge. One of the foods on our list is steamed green beans. Low and behold once again the values are SO far off that i’m fairly sure the green beans that are returned when we query your API are the ones that Jack used to grow a beanstalk - AKA full of about 10 times the energy values than standard beans. Obviously in our previous statements we had issues with cooked vs uncooked - now when we specify exactly what we want the values are still way off other sources.

https://www.dropbox.com/s/5ashb08q6p6oly1/screen_shot_2015-11-05_at_2.50.01_pm_1024.png?dl=0

is a link to a screen shot showing the values between 1 cup of steamed green beans using your api and 1 cup of steamed green beans on my fitness pal. These were the average that we got to by looking at about 5 different items all on my fitness pal - they were all fairly close though. What i don’t understand is how yours is literally 15.38 times more than the average of the steamed green beans that are getting returned from other sources. Obviously you could argue that there is no record for green steam beans, and it’s auto defaulting to tempura deep fried beans, but the fact that no name is returned for the product whose nutritional details you are returning make this impossible to determine.

I thought that maybe you packed the cup of beans 15 times more tightly, therefore fitting 15 times more beans into the cup, but apon attempting this had great difficulty doing so.

I really don’t know what to say. Currently we’re manually hacking our way around your api, forcing it to return values for products that are so FUBAR from your API that they would totally throw off peoples diet calculations, but to be honest it’s really making this difficult for us. I would feel fairly certain that most of our PAID API usage is due to people querying an item, going, WTF BEANS HAVE THAT MANY CALORIES (although they’d do this with a lot of foods) and then trying the search again, which is pushing us over our limit. So far our challenge has been running for 3 days and our bill is already close to 300 dollars - most of which is probably due to the API returning the incorrect values, and people having to search again.

In regards to a resolution for this, i would A) like an explanation to my green bean quandary, and B) talk to someone who can discuss either a discount on the $999 per month plan to cover what we’ve already spent on incorrect queries or a credit to put towards the incorrect values.

I look forward to your response.

Rapid account: Spoonacular
spoonacular Commented לפני 9 שנים

Hello again,

Could you please explain in greater detail how you are using the API? To calculate the nutritional information for recipes, it is standard to start with the weights and nutritional information for the raw ingredients. For example, this recipe from Eating Well is made with chicken liver, which is of course raw before the recipe is prepared:

http://www.eatingwell.com/recipes/chicken_liver_mousse.html

as you see, their nutritional information and our nutritional information for the final, edible food is again nearly identical, even though we started with the values/weights for raw ingredients:

https://spoonacular.com/country-style-chicken-liver-mousse-686837

Nutrition labels on pasta from the store are also for uncooked pasta. Of course they do not expect you to eat it uncooked 😃

Just to make that clear, if a recipe says:

1cup rice

3oz flank steak

The mean the raw ingredients. 1 cup rice becomes more like 2 - 3 cups rice once cooked (because it absorbs the water) while 3oz of steak lose water and become less than 3oz. Since all that depends on the processing recipes always start with raw so it makes sense to compute the nutritional information with the actual ingredients.

Our ingredient database only includes generic products (so you can enter soy protein powder, whey protein powder, hemp protein powder, etc. but not a specific brand). This means the macronutrients may be somewhat different from the product your user has. For products, there is the products endpoint: https://market.mashape.com/spoonacular/recipe-food-nutrition#search-grocery-products which gives you accurate nutritional information for specific products (protein powders and such). These nutritional information are correct as we get them from the brands themselves.

Again, please let me know more about your specific use case, and I can see how I can help further. Currently I do not understand the use case with “cooked” vs “uncooked” because recipes almost always start with uncooked so we would need to get to the bottom of that issue.

Rapid account: Jacq
jacq Commented לפני 9 שנים

Thank you for your reply.

While I appreciate and expect that you are trying to keep your data accurate (especially since this is a paid service), it needs to be acknowledged that the data from this API is going to be used by normal consumers looking for nutritional information.

It can be safely assumed that the overwhelming majority of consumers don’t eat brown rice uncooked, and as such making it that you need to specify that an item is cooked is going to lead to a whole host of accuracy issues with the nutritional breakdown of their food. With the same logic in mind, does that mean that I must specify that I cook my potatoes, and that I don’t eat my liver raw?

I recognise that having a standard for cooking is difficult, but given that when an item is searched for you don’t return the official name of the queried object, it makes it very difficult to use your system as a trusted source. Might I suggest that you include the name of the object in the returned data so that we can at least present the user with the name of what has been queried - i.e., if you search for brown rice, it returns an object which has the name ‘Uncooked brown rice’ somewhere in it?

I also need to advice on how to add items to your database. We are seeing a lot of issues where users are trying to search for commercial products (Protein powders etc) and are being returned values, however they incorrect. This is especially a problem due to what I stated above - the api response doesn’t actually specify the name of queried object - so we have no way of knowing if a product has been found and the data is correct, or if it has been substituted with something that your service has deemed a ‘suitable’ equivalent.

We have a user base of a few thousand people that are going to be using this service on a daily basis. While the application is due to officially launch tomorrow, we are already receiving a huge amount of complaints relating specifically to these two issues just from the people that have started testing it out early. This is going to quickly become unmanageable if we are unable to resolve these issues.

I look forward to your response.

Rapid account: Spoonacular
spoonacular Commented לפני 9 שנים

Hi,

I think the problem here is likely that you’re entering 100 grams brown rice expecting nutritional values for cooked brown rice, when our data is based on uncooked brown rice. 100 grams cooked brown rice has 112 calories, while 100 grams uncooked brown rice has 362 calories. If you want the nutritional information for cooked rice, please enter “cooked brown rice” in the ingredients field instead.

We assume most recipes anticipate that you don’t have cooked rice on hand and still need to prepare the rice. This is why we’ve chosen to assume uncooked brown rice when there is no indicator that the recipe calls for cooked rice.

We pride ourselves on the accuracy of our information, and as you can see in this example, we reach nearly the exact same values at the nutritional information that is provided by Eating Well for their recipes, including this recipe with brown rice:

http://www.eatingwell.com/recipes/brown_rice_pilaf.html
https://spoonacular.com/brown-rice-pilaf-685404

I hope this clears up any confusion. If you have any feedback, please don’t hesitate to contact us again.

Rapid account: Spoonacular
spoonacular Commented לפני 9 שנים

Hey jacq,

Thanks for writing this, I will investigate immediately and get back to you.

Best,
David

Join in the discussion - add comment below:

Login / Signup to post new comments