spoonacular API
The spoonacular Nutrition, Recipe, and Food API allows you to access over thousands of recipes, thousands of ingredients, 800,000 food products, over 100,000…
Fork copies the collection into your workspace, without the publisher's secrets, so you can add your own key and send requests. Star saves it to your starred APIs (Account › Marketplace) and helps others find it.
Overview
The spoonacular Nutrition, Recipe, and Food API allows you to access over thousands of recipes, thousands of ingredients, 800,000 food products, over 100,000 menu items, and restaurants. Our food ontology and semantic recipe search engine makes it possible to search for recipes using natural language queries, such as "gluten free brownies without sugar" or "low fat vegan cupcakes." You can automatically calculate the nutritional information for any recipe, analyze recipe costs, visualize ingredient lists, find recipes for what's in your fridge, find recipes based on special diets, nutritional requirements, or favorite ingredients, classify recipes into types and cuisines, convert ingredient amounts, or even compute an entire meal plan. With our powerful API, you can create many kinds of food and especially nutrition apps.
Special diets/dietary requirements currently available include: vegan, vegetarian, pescetarian, gluten free, grain free, dairy free, high protein, whole 30, low sodium, low carb, Paleo, ketogenic, FODMAP, and Primal.
Endpoints 99
ingredients
- GETAutocomplete Ingredient Search
/food/ingredients/autocomplete?query=burger&number=10&metaInformation=false&intolerances=egg&language=enAutocomplete the entry of an ingredient. - POSTMap Ingredients to Grocery Products
/food/ingredients/mapMap a set of ingredients to products you can buy in the grocery store. - GETIngredient Search
/food/ingredients/search?query=burger&addChildren=true&minProteinPercent=10&maxProteinPercent=90&minFatPercent=10&maxFatPercent=90&minCarbsPercent=10&maxCarbsPercent=90&metaInformation=false&intolerances=egg&sort=calories&sortDirection=asc&offset=0&number=10&language=enSearch for simple whole foods (e.g. fruits, vegetables, nuts, grains, meat, fish, dairy etc.). - GETGet Ingredient Substitutes
/food/ingredients/substitutes?ingredientName=butterSearch for substitutes for a given ingredient. - GETCompute Ingredient Amount
/food/ingredients/:id/amount?nutrient=protein&target=2&unit=ozCompute the amount you need of a certain ingredient for a certain nutritional goal. For example, how much pineapple do you have to eat to get 10 grams of… - GETGet Ingredient Information
/food/ingredients/:id/information?amount=150&unit=gramsUse an ingredient id to get all available information about an ingredient, such as its image and supermarket aisle. - GETGet Ingredient Substitutes by ID
/food/ingredients/:id/substitutesSearch for substitutes for a given ingredient. - POSTIngredients Widget
/recipes/visualizeIngredients?language=enVisualize ingredients of a recipe. You can play around with that endpoint! - GETIngredients by ID Image
/recipes/:id/ingredientWidget.png?measure=metricVisualize a recipe's ingredient list.
meal planning
- GETGenerate Meal Plan
/mealplanner/generate?timeFrame=day&targetCalories=2000&diet=vegetarian&exclude=shellfish, olivesGenerate a meal plan with three meals per day (breakfast, lunch, and dinner). - DELETEClear Meal Plan Day
/mealplanner/:username/day/:date?hash=stringDelete all planned items from the user's meal plan for a specific day. - POSTAdd to Meal Plan
/mealplanner/:username/items?hash=stringAdd an item to the user's meal plan. - DELETEDelete from Meal Plan
/mealplanner/:username/items/:id?hash=stringDelete an item from the user's meal plan. - GETGet Shopping List
/mealplanner/:username/shopping-list?hash=stringGet the current shopping list for the given user. - POSTAdd to Shopping List
/mealplanner/:username/shopping-list/items?hash=stringAdd an item to the current shopping list of a user. - DELETEDelete from Shopping List
/mealplanner/:username/shopping-list/items/:id?hash=stringDelete an item from the current shopping list of the user. - POSTGenerate Shopping List
/mealplanner/:username/shopping-list/:start-date/:end-date?hash=stringGenerate the shopping list for a user from the meal planner in a given time frame. - GETGet Meal Plan Templates
/mealplanner/:username/templates?hash=stringGet meal plan templates from user or public ones. - POSTAdd Meal Plan Template
/mealplanner/:username/templates?hash=4b5v4398573406Add a meal plan template for a user. - GETGet Meal Plan Template
/mealplanner/:username/templates/:id?hash=stringGet information about a meal plan template. - DELETEDelete Meal Plan Template
/mealplanner/:username/templates/:id?hash=4b5v4398573406Delete a meal plan template for a user. - GETGet Meal Plan Week
/mealplanner/:username/week/:start-date?hash=stringRetrieve a meal planned week for the given user. The username must be a spoonacular user and the hash must the the user's hash that can be found in his/her… - POSTConnect User
/users/connectIn order to call user-specific endpoints, you need to connect your app's users to spoonacular users.
menu items
- GETSearch Menu Items
/food/menuItems/search?query=burger&minCalories=50&maxCalories=800&minCarbs=10&maxCarbs=100&minProtein=10&maxProtein=100&minFat=1&maxFat=100&addMenuItemInformation=true&offset=0&number=10Search over 115,000 menu items from over 800 fast food and chain restaurants. For example, McDonald's Big Mac or Starbucks Mocha. - GETAutocomplete Menu Item Search
/food/menuItems/suggest?query=chicke&number=10Generate suggestions for menu items based on a (partial) query. The matches will be found by looking in the title only. - GETGet Menu Item Information
/food/menuItems/:idUse a menu item id to get all available information about a menu item, such as nutrition. - GETMenu Item Nutrition Label Widget
/food/menuItems/:id/nutritionLabel?defaultCss=false&showOptionalNutrients=false&showZeroValues=false&showIngredients=falseVisualize a menu item's nutritional label information as HTML including CSS. - GETMenu Item Nutrition Label Image
/food/menuItems/:id/nutritionLabel.png?showOptionalNutrients=false&showZeroValues=false&showIngredients=falseVisualize a menu item's nutritional label information as an image. - GETMenu Item Nutrition by ID Widget
/food/menuItems/:id/nutritionWidget?defaultCss=falseVisualize a menu item's nutritional information as HTML including CSS. - GETMenu Item Nutrition by ID Image
/food/menuItems/:id/nutritionWidget.pngVisualize a menu item's nutritional information as HTML including CSS.
misc
- GETTalk to Chatbot
/food/converse?text=donut recipes&contextId=342938This endpoint can be used to have a conversation about food with the spoonacular chatbot. Use the "Get Conversation Suggests" endpoint to show your user what… - GETConversation Suggests
/food/converse/suggest?query=tell&number=5This endpoint returns suggestions for things the user can say or ask the chatbot. - GETSearch Custom Foods
/food/customFoods/search?query=burger&username=dsky&hash=4b5v4398573406&offset=0&number=10Search custom foods in a user's account. - POSTDetect Food in Text
/food/detectTake any text and find all mentions of food contained within it. This task is also called Named Entity Recognition (NER). In this case, the entities are… - GETImage Analysis by URL
/food/images/analyze?imageUrl=https://spoonacular.com/recipeImages/635350-240x150.jpgAnalyze a food image. The API tries to classify the image, guess the nutrition, and find a matching recipes. - GETImage Classification by URL
/food/images/classify?imageUrl=https://spoonacular.com/recipeImages/635350-240x150.jpgClassify a food image. - GETRandom Food Joke
/food/jokes/randomGet a random joke that is related to food. Caution: this is an endpoint for adults! - GETSearch All Food
/food/search?query=apple&offset=0&number=10Search all food content with one call. That includes recipes, grocery products, menu items, simple foods (ingredients), and food videos. - GETSearch Site Content
/food/site/search?query=pastSearch spoonacular's site content. You'll be able to find everything that you could also find using the search suggestions on spoonacular.com. This is a… - GETRandom Food Trivia
/food/trivia/randomReturns random food trivia. - GETSearch Food Videos
/food/videos/search?query=burger&type=main course&cuisine=italian&diet=vegetarian&includeIngredients=tomato,cheese&excludeIngredients=eggs&minLength=0&maxLength=999&offset=0&number=10Find recipe and other food related videos.
products
- POSTClassify Grocery Product
/food/products/classify?locale=en_USThis endpoint allows you to match a packaged food to a basic category, e.g. a specific brand of milk to the category milk. - POSTClassify Grocery Product Bulk
/food/products/classifyBatch?locale=en_USProvide a set of product jsons, get back classified products. - GETSearch Grocery Products
/food/products/search?query=burger&minCalories=50&maxCalories=800&minCarbs=10&maxCarbs=100&minProtein=10&maxProtein=100&minFat=1&maxFat=100&addProductInformation=true&offset=0&number=10Search packaged food products, such as frozen pizza or Greek yogurt. - GETAutocomplete Product Search
/food/products/suggest?query=chicke&number=10Generate suggestions for grocery products based on a (partial) query. The matches will be found by looking in the title only. - GETSearch Grocery Products by UPC
/food/products/upc/:upcGet information about a packaged food using its UPC. - GETGet Comparable Products
/food/products/upc/:upc/comparableFind comparable products to the given one. - GETGet Product Information
/food/products/:idUse a product id to get full information about a product, such as ingredients, nutrition, etc. The nutritional information is per serving. - GETProduct Nutrition Label Widget
/food/products/:id/nutritionLabel?defaultCss=false&showOptionalNutrients=false&showZeroValues=false&showIngredients=falseGet a product's nutrition label as an HTML widget. - GETProduct Nutrition Label Image
/food/products/:id/nutritionLabel.png?showOptionalNutrients=false&showZeroValues=false&showIngredients=falseGet a product's nutrition label as an image. - GETProduct Nutrition by ID Widget
/food/products/:id/nutritionWidget?defaultCss=falseVisualize a product's nutritional information as HTML including CSS. - GETProduct Nutrition by ID Image
/food/products/:id/nutritionWidget.pngVisualize a product's nutritional information as an image.
recipes
- POSTCompute Glycemic Load
/food/ingredients/glycemicLoad?language=enRetrieve the glycemic index for a list of ingredients and compute the individual and total glycemic load. - POSTAnalyze Recipe Instructions
/recipes/analyzeInstructionsThis endpoint allows you to break down instructions into atomic steps. Furthermore, each step will contain the ingredients and equipment required.… - GETAutocomplete Recipe Search
/recipes/autocomplete?query=burger&number=10Autocomplete a partial input to suggest possible recipe names. - GETSearch Recipes
/recipes/complexSearch?query=burger&cuisine=italian&excludeCuisine=greek&diet=vegetarian&intolerances=gluten&equipment=pan&includeIngredients=tomato,cheese&excludeIngredients=eggs&type=main course&instructionsRequired=true&fillIngredients=false&addRecipeInformation=false&addRecipeNutrition=false&author=coffeebean&tags=string&recipeBoxId=2468&titleMatch=Crock Pot&maxReadyTime=20&ignorePantry=false&sort=calories&sortDirection=asc&minCarbs=10&maxCarbs=100&minProtein=10&maxProtein=100&minCalories=50&maxCalories=800&minFat=1&maxFat=100&minAlcohol=0&maxAlcohol=100&minCaffeine=0&maxCaffeine=100&minCopper=0&maxCopper=100&minCalcium=0&maxCalcium=100&minCholine=0&maxCholine=100&minCholesterol=0&maxCholesterol=100&minFluoride=0&maxFluoride=100&minSaturatedFat=0&maxSaturatedFat=100&minVitaminA=0&maxVitaminA=100&minVitaminC=0&maxVitaminC=100&minVitaminD=0&maxVitaminD=100&minVitaminE=0&maxVitaminE=100&minVitaminK=0&maxVitaminK=100&minVitaminB1=0&maxVitaminB1=100&minVitaminB2=0&maxVitaminB2=100&minVitaminB5=0&maxVitaminB5=100&minVitaminB3=0&maxVitaminB3=100&minVitaminB6=0&maxVitaminB6=100&minVitaminB12=0&maxVitaminB12=100&minFiber=0&maxFiber=100&minFolate=0&maxFolate=100&minFolicAcid=0&maxFolicAcid=100&minIodine=0&maxIodine=100&minIron=0&maxIron=100&minMagnesium=0&maxMagnesium=100&minManganese=0&maxManganese=100&minPhosphorus=0&maxPhosphorus=100&minPotassium=0&maxPotassium=100&minSelenium=0&maxSelenium=100&minSodium=0&maxSodium=100&minSugar=0&maxSugar=100&minZinc=0&maxZinc=100&offset=0&number=10&limitLicense=trueSearch through hundreds of thousands of recipes using advanced filtering and ranking. NOTE: This method combines searching by query, by ingredients, and by… - GETConvert Amounts
/recipes/convert?ingredientName=flour&sourceAmount=2.5&sourceUnit=cups&targetUnit=gramsConvert amounts like "2 cups of flour to grams". - POSTClassify Cuisine
/recipes/cuisineClassify the recipe's cuisine. - GETExtract Recipe from Website
/recipes/extract?url=https://foodista.com/recipe/ZHK4KPB6/chocolate-crinkle-cookies&forceExtraction=true&analyze=false&includeNutrition=false&includeTaste=falseThis endpoint lets you extract recipe data such as title, ingredients, and instructions from any properly formatted Website. - GETSearch Recipes by Ingredients
/recipes/findByIngredients?ingredients=carrots,tomatoes&number=10&limitLicense=true&ranking=1&ignorePantry=falseEver wondered what recipes you can cook with the ingredients you have in your fridge or pantry? This endpoint lets you find recipes that either maximize the… - GETSearch Recipes by Nutrients
/recipes/findByNutrients?minCarbs=10&maxCarbs=100&minProtein=10&maxProtein=100&minCalories=50&maxCalories=800&minFat=1&maxFat=100&minAlcohol=0&maxAlcohol=100&minCaffeine=0&maxCaffeine=100&minCopper=0&maxCopper=100&minCalcium=0&maxCalcium=100&minCholine=0&maxCholine=100&minCholesterol=0&maxCholesterol=100&minFluoride=0&maxFluoride=100&minSaturatedFat=0&maxSaturatedFat=100&minVitaminA=0&maxVitaminA=100&minVitaminC=0&maxVitaminC=100&minVitaminD=0&maxVitaminD=100&minVitaminE=0&maxVitaminE=100&minVitaminK=0&maxVitaminK=100&minVitaminB1=0&maxVitaminB1=100&minVitaminB2=0&maxVitaminB2=100&minVitaminB5=0&maxVitaminB5=100&minVitaminB3=0&maxVitaminB3=100&minVitaminB6=0&maxVitaminB6=100&minVitaminB12=0&maxVitaminB12=100&minFiber=0&maxFiber=100&minFolate=0&maxFolate=100&minFolicAcid=0&maxFolicAcid=100&minIodine=0&maxIodine=100&minIron=0&maxIron=100&minMagnesium=0&maxMagnesium=100&minManganese=0&maxManganese=100&minPhosphorus=0&maxPhosphorus=100&minPotassium=0&maxPotassium=100&minSelenium=0&maxSelenium=100&minSodium=0&maxSodium=100&minSugar=0&maxSugar=100&minZinc=0&maxZinc=100&offset=0&number=10&random=false&limitLicense=trueFind a set of recipes that adhere to the given nutritional limits. You may set limits for macronutrients (calories, protein, fat, and carbohydrate) and/or… - GETGuess Nutrition by Dish Name
/recipes/guessNutrition?title=Spaghetti Aglio et OlioEstimate the macronutrients of a dish based on its title. - GETGet Recipe Information Bulk
/recipes/informationBulk?ids=715538,716429&includeNutrition=falseGet information about multiple recipes at once. This is equivalent to calling the Get Recipe Information endpoint multiple times, but faster. - POSTParse Ingredients
/recipes/parseIngredients?language=enExtract an ingredient from plain text. - GETAnalyze a Recipe Search Query
/recipes/queries/analyze?q=salmon with fusilli and no nutsParse a recipe search query to find out its intention. - GETQuick Answer
/recipes/quickAnswer?q=How much vitamin c is in 2 apples?Answer a nutrition related natural language question. - GETGet Random Recipes
/recipes/random?limitLicense=true&tags=string&number=10Find random (popular) recipes. If you need to filter recipes by diet, nutrition etc. you might want to consider using the complex recipe search endpoint and… - POSTEquipment Widget
/recipes/visualizeEquipmentVisualize the equipment used to make a recipe. - POSTRecipe Nutrition Widget
/recipes/visualizeNutrition?language=enVisualize a recipe's nutritional information as HTML including CSS. - POSTPrice Breakdown Widget
/recipes/visualizePriceEstimator?language=enVisualize the price breakdown of a recipe. - POSTCreate Recipe Card
/recipes/visualizeRecipeGenerate a recipe card for a recipe. - POSTRecipe Taste Widget
/recipes/visualizeTaste?language=en&normalize=true&rgb=75,192,192Visualize a recipe's taste information as HTML including CSS. You can play around with that endpoint! - GETGet Analyzed Recipe Instructions
/recipes/:id/analyzedInstructions?stepBreakdown=trueGet an analyzed breakdown of a recipe's instructions. Each step is enriched with the ingredients and equipment required. - GETEquipment by ID Widget
/recipes/:id/equipmentWidget?defaultCss=falseVisualize a recipe's equipment list. - GETEquipment by ID
/recipes/:id/equipmentWidget.jsonGet a recipe's equipment list. - GETEquipment by ID Image
/recipes/:id/equipmentWidget.pngVisualize a recipe's equipment list as an image. - GETGet Recipe Information
/recipes/:id/information?includeNutrition=falseUse a recipe id to get full information about a recipe, such as ingredients, nutrition, diet and allergen information, etc. - GETIngredients by ID Widget
/recipes/:id/ingredientWidget?defaultCss=false&measure=metricVisualize a recipe's ingredient list. - GETIngredients by ID
/recipes/:id/ingredientWidget.jsonGet a recipe's ingredient list. - GETRecipe Nutrition Label Widget
/recipes/:id/nutritionLabel?defaultCss=false&showOptionalNutrients=false&showZeroValues=false&showIngredients=falseGet a recipe's nutrition label as an HTML widget. - GETRecipe Nutrition Label Image
/recipes/:id/nutritionLabel.png?showOptionalNutrients=false&showZeroValues=false&showIngredients=falseGet a recipe's nutrition label as an image. - GETRecipe Nutrition by ID Widget
/recipes/:id/nutritionWidget?defaultCss=falseVisualize a recipe's nutritional information as HTML including CSS. - GETNutrition by ID
/recipes/:id/nutritionWidget.jsonGet a recipe's nutrition data. - GETRecipe Nutrition by ID Image
/recipes/:id/nutritionWidget.pngVisualize a recipe's nutritional information as an image. - GETPrice Breakdown by ID Widget
/recipes/:id/priceBreakdownWidget?defaultCss=falseVisualize a recipe's price breakdown. - GETPrice Breakdown by ID
/recipes/:id/priceBreakdownWidget.jsonGet a recipe's price breakdown data. - GETPrice Breakdown by ID Image
/recipes/:id/priceBreakdownWidget.pngVisualize a recipe's price breakdown. - GETGet Similar Recipes
/recipes/:id/similar?number=10&limitLicense=trueFind recipes which are similar to the given one. - GETSummarize Recipe
/recipes/:id/summaryAutomatically generate a short description that summarizes key information about the recipe. - GETRecipe Taste by ID Widget
/recipes/:id/tasteWidget?normalize=true&rgb=75,192,192Get a recipe's taste. The tastes supported are sweet, salty, sour, bitter, savory, and fatty. - GETTaste by ID
/recipes/:id/tasteWidget.json?normalize=trueGet a recipe's taste. The tastes supported are sweet, salty, sour, bitter, savory, and fatty. - GETRecipe Taste by ID Image
/recipes/:id/tasteWidget.png?normalize=false&rgb=75,192,192Get a recipe's taste as an image. The tastes supported are sweet, salty, sour, bitter, savory, and fatty.
wine
- GETWine Description
/food/wine/description?wine=merlotGet a simple description of a certain wine, e.g. "malbec", "riesling", or "merlot". - GETDish Pairing for Wine
/food/wine/dishes?wine=malbecFind a dish that goes well with a given wine. - GETWine Pairing
/food/wine/pairing?food=steak&maxPrice=50Find a wine that goes well with a food. Food can be a dish name ("steak"), an ingredient name ("salmon"), or a cuisine ("italian"). - GETWine Recommendation
/food/wine/recommendation?wine=merlot&maxPrice=50&minRating=0.7&number=3Get a specific wine recommendation (concrete product) for a given wine type, e.g. "merlot".
- GETSearch Restaurants
/food/restaurants/search?query=beach cafe&lat=37.7786357&lng=-122.3918135&distance=2&budget=20&cuisine=italian&min-rating=4.4&is-open=true&sort=distance&page=0Search through thousands of restaurants (in North America) by location, cuisine, budget, and more. - POSTAnalyze Recipe
/recipes/analyze?language=en&includeNutrition=false&includeTaste=falseThis endpoint allows you to send raw recipe information, such as title, servings, and ingredients, to then see what we compute (badges, diets, nutrition, and… - GETCreate Recipe Card
/recipes/:id/card?mask=ellipseMask&backgroundImage=background1&backgroundColor=ffffff&fontColor=333333Generate a recipe card for a recipe.
API details
- Base URL
https://api.spoonacular.com- Authentication
- An API key in the x-api-key header
- Operations
- 99 operations on 97 pathsGET 75POST 20DELETE 4
- Main resources
- recipes 41meal planning 14misc 11products 11ingredients 9menu items 7wine 4
- Response formats
application/jsontext/htmlimage/png- Description format
- OpenAPI 3.0.0, API version
1.1 - Links
- Documentation · OpenAPI document · Terms of service · Support
- Listed from
- APIs.guru OpenAPI Directory (CC0-1.0)
Source updated
How to test the spoonacular API in Swastik Codes
- Open the APISelect “Fork & run in Swastik Codes” on this page. Sign in or create a free account if asked.
- Fork it into your workspaceChoose a workspace. You get your own copy of the spoonacular API collection, without the publisher's secrets.
- Add your credentialsThis API uses an API key in the x-api-key header. Add yours in the collection's variables or an environment; the requests already reference it.
- Send a requestPick an endpoint, for example “Autocomplete Ingredient Search” (GET /food/ingredients/autocomplete?query=burger&number=10&metaInformation=false&intolerances=egg&language=en), and press Send. Check the response, add tests and run the whole collection with the runner.
Frequently asked questions
What is the spoonacular API?
The spoonacular Nutrition, Recipe, and Food API allows you to access over thousands of recipes, thousands of ingredients, 800,000 food products, over 100,000… It is listed under Social and has 99 endpoints.
Who publishes the spoonacular API?
It is listed from spoonacular's public API description (an OpenAPI document), not published by spoonacular on Swastik Codes. Anyone who controls spoonacular.com can claim the profile by adding a DNS TXT record.
What is the base URL of the spoonacular API?
Requests go to https://api.spoonacular.com. Endpoint paths are added to this base URL.
How do I authenticate with the spoonacular API?
With an API key in the x-api-key header.
How many endpoints does the spoonacular API have?
99 operations on 97 paths (75 GET, 20 POST, 4 DELETE). The largest groups are recipes, meal planning, misc, products.
Is forking the spoonacular API free?
Yes. Forking copies the collection into your workspace for free. It has been starred 0 times and forked 0 times.