Recipe - Food - Nutrition

부분 유료
Verified
분류별 David | 업데이트됨 a month ago | Food
인기

9.9 / 10

지연 시간

1,542ms

서비스 수준

100%

Health Check

N/A

모든 토론으로 돌아가기

Features

Rapid account: Thomasalvord
thomasalvord
7 years ago

I am creating a recipe website. Users will add recipes, including the breakdown of the ingredients.

I need an API that:

(1) will autofill ingredients as a user types each new ingredient for a recipe, so each ingredient a user inserts will correspond/link to a specific/queryable ingredient for nutritional information.

(2) Once the recipe is complete, I can send the list of ingredients each with their corresponding measurement (cups, tbps, etc.) and amount, as well as how many servings in the recipe, and have it return the nutritional value per serving for the recipe.

From the APIs that I have seen out there, yours seems the most robust to handle this. In practice, how would you recommend to best handle this?

(A) As users add ingredients to a new recipe, should I query your api with autofill info, so all the ingredients entered reference back to an id in your database?

(B) Can I post a new recipe to your system, with the corresponding ingredients, and then do one query to get all the nutritional information for that recipe?

© Or instead of doing B above, can I take all of the ingredients in a completed recipe, and submit through one query the ingredients, amounts, servings, etc. and get data on the nutritional value per serving?

I look forward to hearing back how you would recommend to structure my queries.

Thanks,
Thomas Alvord

Rapid account: Spoonacular
spoonacular Commented 7 years ago

Hi Thomas,

Thanks for your questions. I would say you (A) you do © with https://market.mashape.com/spoonacular/recipe-food-nutrition#visualize-nutrition posting all your ingredients or query and sum up the nutrition using https://market.mashape.com/spoonacular/recipe-food-nutrition#get-food-information for each ingredient.

(B) is currently not possible, however, you could sign up to spoonacular.com and submit a recipe as a user via the web frontend, if approved, this recipe will become available through the API.

Best,
David

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

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