Spoonacular API
Recipes, nutrition, meal planning and food data with a free plan.
What it does
Spoonacular is a comprehensive food and recipe API: recipe search with dozens of filters (diet, intolerance, cuisine, ready-time, nutrients), full recipe details with steps and nutrition, ‘what can I make with these ingredients’, meal planning, wine pairing, grocery-product and menu-item lookup, and food image classification.
Base URL
Authentication
Sign up for a free API key and pass it as ?apiKey=YOUR_KEY.
Code examples
curl -s "https://api.spoonacular.com/recipes/complexSearch?query=pasta&maxReadyTime=30&number=5&apiKey=$SPOON_KEY"
import requests
r = requests.get("https://api.spoonacular.com/recipes/findByIngredients", params={
"ingredients": "tomato,onion,rice", "number": 5, "apiKey": KEY}, timeout=10)
for rec in r.json():
print(rec["title"], "- missing", rec["missedIngredientCount"])Rate limits & quotas
Free plan: 150 points/day. Endpoints cost points, not requests — a search is ~1 point plus a small amount per result, recipe detail is ~1, and image/NLP endpoints cost more. Response headers (X-API-Quota-Used, X-API-Quota-Left) track it; over budget returns HTTP 402.
Key response fields
| results[].id / title / image | From complexSearch |
| results[].nutrition.nutrients[] | Per-recipe nutrient list (with addRecipeNutrition=true) |
| (findByIngredients) usedIngredientCount / missedIngredientCount | How well a recipe matches your pantry |
| (recipe info) analyzedInstructions[].steps[] | Structured cooking steps |
| (recipe info) extendedIngredients[] | Ingredients with amounts and units |
Common errors
| 401 | Missing or invalid apiKey. |
| 402 | Daily point quota exhausted — resets at midnight UTC. |
| 400 | Missing a required parameter (e.g. ingredients for findByIngredients). |
| 404 | Unknown recipe/product id. |
When to use it (and alternatives)
The most feature-complete option when you need recipes plus nutrition plus meal planning from one vendor — if 150 points/day is enough to build with. For free recipe browsing without quotas, TheMealDB; for nutrition-first work, Nutritionix or USDA FoodData Central.
FAQ
How far does 150 points/day go?
Roughly 100–140 simple calls. Requesting nutrition inline (addRecipeNutrition=true) or many results per search burns points faster — check X-API-Quota-Left and cache aggressively.
Can I get a recipe's nutrition in the search call?
Yes — add addRecipeNutrition=true to complexSearch, at the cost of extra points. Otherwise call /recipes/{id}/nutritionWidget.json separately.
Does it handle diets and allergies?
Yes — diet=vegan, intolerances=gluten,dairy, excludeIngredients= on complexSearch.
New to APIs?
Short guides for working with this API — and any other.