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

הצטרף לדיון - הוסף תגובה למטה:

התחבר / הירשם כדי לפרסם תגובות חדשות