Recipe - Food - Nutrition

부분 유료
분류별 David | 업데이트됨 24 days ago | Food
인기

9.9 / 10

지연 시간

1,410ms

서비스 수준

100%

Health Check

N/A

모든 토론으로 돌아가기

How to "get nutritional information for ingredients" and other ingredient data

Rapid account: Hawes Domingue
HawesDomingue
8 years ago

It says on the front page of the API that you can “get nutritional information for ingredients”, and that there are 2000+ ingredients in the API’s database. So how do I access that through the API? I couldn’t find any documentation for it. It would be really awesome if I could search for an ingredient by name or lookup by ID and get nutritional information, price data, cooking tips, etc.

Rapid account: Spoonacular
spoonacular Commented 8 years ago

I appreciate your feedback! Well another thing you can use is the quick answer endpoint https://market.mashape.com/spoonacular/recipe-food-nutrition#quick-answer … just try “calories in 100g apples” and you get exactly what you want. “vitamin c in 2 carrots” etc. works too…

Rapid account: Hawes Domingue
HawesDomingue Commented 8 years ago

It helps somewhat. I was hoping more for a way to just look up a single ingredient and it would give me info on, for example, how many calories per 100g. Plus the price data and cooking tips that were mentioned on the API’s front page sounded cool. I may just end up using the USDA’s nutrient database for most of this (they also include scientific names for ingredients, another thing I’m after), but thank you for your reply.

Rapid account: Spoonacular
spoonacular Commented 8 years ago

You cannot query ingredient nutrition individually but you get them when asking for information of a recipe (https://market.mashape.com/spoonacular/recipe-food-nutrition#recipe-information) with the nutrition parameter set to true. Here you will see how each ingredient contributes to the recipes total nutrition. Does that help you?

아래에 의견을 추가하고 토론에 참여하세요.

새 댓글을 게시하려면 로그인 / 가입