Sign in | Sign up

Calories from Fat in the 2.0 API?

Tagged:

Currently contains 4 posts

Avatar

January 12, 2015 17:33

chug2k

Sorry for all the questions here – one more thing, the 2.0 API isn’t returning Calories from Fat: https://apibeta.nutritionix.com/v2/item/51c3ffe997c3e6dfa4df3270.

The 1.1 API (and result page at http://www.nutritionix.com/search/item/51c3ffe997c3e6dfa4df3270) does have the calories from fat data.

Avatar

January 15, 2015 18:56

mattsilv

We no longer include calories from fat as an attribute because it is derived from the Total Fat attribute. If you would like to display calories from fat in your app, you can multiply the Fat Grams by 9. Example, if Total Fat is 5, calories from fat would be (5*9).

Avatar

January 15, 2015 19:08

chug2k

I thought that too! But a quick glance shows that’s untrue. If you look at the example I gave:
http://www.nutritionix.com/search/item/51c3ffe997c3e6dfa4df3270

It has 1g fat, but 15 Calories from Fat, not 9. This is relatively common – if I look at the actual Stonyfield page: http://www.stonyfield.com/products/yogurt/smooth-creamy/lowfat-plain has 2 g of fat but 20 Calories from Fat, not 18.

Avatar

January 20, 2015 05:19

menupages112

We no longer include calories from fat as an attribute because it is derived from the Total Fat attribute. If you would like to display calories from fat in your app, you can multiply the Fat Grams by 9.

Reply to thread