Recipe - Food - Nutrition

免费增值
Verified
通过 David | 已更新 il y a un mois | Food
人气

9.9 / 10

延迟

1,485ms

服务等级

100%

Health Check

N/A

返回所有讨论

Features

Rapid account: Thomasalvord
thomasalvord
il y a 7 ans

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 il y a 7 ans

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

加入讨论 - 在下面添加评论:

登录/注册以发布新的评论