Search and filter thousands of recipes with natural language, e.g. pasta recipes without mushrooms but with truffles. You can filter by ingredients, diet, cuisine, meal type, macro and micro nutrition, intolerances, and much more.
This API wraps the search recipes endpoint by Recipe API. Check out the tutorial about writing a diet and nutrition app or how to write a meal planning app using this API.
This is a list of possible values for the sort parameter.
Score % (between 0 and 100) = Average coverage of "good" nutrients - Average coverage of "bad" nutrients.
That is, the more of your daily requirements of vitamins and minerals are covered and lower amounts of things you should limit (sugar, salt etc.) the higher the score.
| Name | Example | Description |
|---|---|---|
query | pasta with mushrooms but without nuts | The search query. |
cuisines | mexican | The cuisine(s) of the recipes. One or more, comma-separated (will be interpreted as 'OR'). |
exclude-cuisines | indian,japanese | The cuisine(s) the recipes must not match. One or more, comma-separated (will be interpreted as 'AND'). |
meal-type | dessert | The type of the recipe, one of: main course,side dish,dessert,appetizer,salad,bread,breakfast,soup,beverage,sauce,drink. |
diet | paleo | The diet the recipes must adhere to. One of the following: paleo,primal,grain-free,pescetarian,lacto vegetarian,ovo vegetarian,vegan,vegetarian. |
intolerances | gluten,dairy,shellfish | A comma-separated list of intolerances. All recipes returned must not contain ingredients that are not suitable for people with the intolerances entered. |
equipment | blender,frying pan,bowl | The equipment required. Multiple values will be interpreted as 'OR'. |
include-ingredients | tomato,cheese | A comma-separated list of ingredients that should/must be used in the recipes. |
exclude-ingredients | olives,capers | A comma-separated list of ingredients or ingredient types that the recipes must not contain. |
fill-ingredients | true | Add information about the ingredients and whether they are used or missing in relation to the query. |
add-recipe-information | true | If set to true, you get more information about the recipes returned. |
max-time | 45 | The maximum time in minutes it should take to prepare and cook the recipe. |
min-servings | 1 | The minimum amount of servings the recipe is for. |
max-servings | 8 | The maximum amount of servings the recipe is for. |
min-calories | 100 | The minimum amount of calories the recipe must have per serving. |
max-calories | 655 | The maximum amount of calories the recipe can have per serving. |
min-carbs | 10.1 | The minimum amount of carbohydrates in grams the recipe must have per serving. |
max-carbs | 25.5 | The maximum amount of carbohydrates in grams the recipe can have per serving. |
min-protein | 10.1 | The minimum amount of protein in grams the recipe must have per serving. |
max-protein | 25.5 | The maximum amount of protein in grams the recipe can have per serving. |
min-fat | 10.1 | The minimum amount of fat in grams the recipe must have per serving. |
max-fat | 25.5 | The maximum amount of fat in grams the recipe can have per serving. |
min-sugar | 10.1 | The minimum amount of sugar in grams the recipe must have per serving. |
max-sugar | 25.5 | The maximum amount of sugar in grams the recipe can have per serving. |
min-fiber | 10.1 | The minimum amount of fiber in grams the recipe must have per serving. |
max-fiber | 25.5 | The maximum amount of fiber in grams the recipe can have per serving. |
min-folate | 30.4 | The minimum amount of folate in micrograms the recipe must have per serving. |
max-folate | 80.9 | The maximum amount of folate in micrograms the recipe can have per serving. |
min-folic-acid | 30.4 | The minimum amount of folic acid in micrograms the recipe must have per serving. |
max-folic-acid | 80.9 | The maximum amount of folic acid in micrograms the recipe can have per serving. |
min-iodine | 30.4 | The minimum amount of iodine in micrograms the recipe must have per serving. |
max-iodine | 80.9 | The maximum amount of iodine in micrograms the recipe can have per serving. |
min-iron | 30.4 | The minimum amount of iron in milligrams the recipe must have per serving. |
max-iron | 80.9 | The maximum amount of iron in milligrams the recipe can have per serving. |
min-zinc | 30.4 | The minimum amount of zinc in milligrams the recipe must have per serving. |
max-zinc | 80.9 | The maximum amount of zinc in milligrams the recipe can have per serving. |
min-magnesium | 30.4 | The minimum amount of magnesium in milligrams the recipe must have per serving. |
max-magnesium | 80.9 | The maximum amount of magnesium in milligrams the recipe can have per serving. |
min-manganese | 30.4 | The minimum amount of manganese in milligrams the recipe must have per serving. |
max-manganese | 80.9 | The maximum amount of manganese in milligrams the recipe can have per serving. |
min-phosphorus | 30.4 | The minimum amount of phosphorus in milligrams the recipe must have per serving. |
max-phosphorus | 80.9 | The maximum amount of phosphorus in milligrams the recipe can have per serving. |
min-potassium | 30.4 | The minimum amount of potassium in milligrams the recipe must have per serving. |
max-potassium | 80.9 | The maximum amount of potassium in milligrams the recipe can have per serving. |
min-sodium | 30.4 | The minimum amount of sodium in milligrams the recipe must have per serving. |
max-sodium | 80.9 | The maximum amount of sodium in milligrams the recipe can have per serving. |
min-selenium | 30.4 | The minimum amount of selenium in micrograms the recipe must have per serving. |
max-selenium | 80.9 | The maximum amount of selenium in micrograms the recipe can have per serving. |
min-copper | 30.4 | The minimum amount of copper in milligrams the recipe must have per serving. |
max-copper | 80.9 | The maximum amount of copper in milligrams the recipe can have per serving. |
min-calcium | 30.4 | The minimum amount of calcium in milligrams the recipe must have per serving. |
max-calcium | 80.9 | The maximum amount of calcium in milligrams the recipe can have per serving. |
min-choline | 30.4 | The minimum amount of choline in milligrams the recipe must have per serving. |
max-choline | 80.9 | The maximum amount of choline in milligrams the recipe can have per serving. |
min-cholesterol | 30.4 | The minimum amount of cholesterol in milligrams the recipe must have per serving. |
max-cholesterol | 80.9 | The maximum amount of cholesterol in milligrams the recipe can have per serving. |
min-fluoride | 30.4 | The minimum amount of fluoride in milligrams the recipe must have per serving. |
max-fluoride | 80.9 | The maximum amount of fluoride in milligrams the recipe can have per serving. |
min-alcohol | 10.1 | The minimum amount of alcohol in grams the recipe must have per serving. |
max-alcohol | 25.5 | The maximum amount of alcohol in grams the recipe can have per serving. |
min-caffeine | 30.4 | The minimum amount of caffeine in milligrams the recipe must have per serving. |
max-caffeine | 80.9 | The maximum amount of caffeine in milligrams the recipe can have per serving. |
min-saturated-fat | 30.4 | The minimum amount of saturated fat in grams the recipe must have per serving. |
max-saturated-fat | 80.9 | The maximum amount of saturated fat in grams the recipe can have per serving. |
min-vitamin-a | 30.4 | The minimum amount of Vitamin A in IU the recipe must have per serving. |
max-vitamin-a | 80.9 | The maximum amount of Vitamin A in IU the recipe can have per serving. |
min-vitamin-c | 30.4 | The minimum amount of Vitamin C in milligrams the recipe must have per serving. |
max-vitamin-c | 80.9 | The maximum amount of Vitamin C in milligrams the recipe can have per serving. |
min-vitamin-d | 30.4 | The minimum amount of Vitamin D in micrograms the recipe must have per serving. |
max-vitamin-d | 80.9 | The maximum amount of Vitamin D in micrograms the recipe can have per serving. |
min-vitamin-e | 30.4 | The minimum amount of Vitamin E in milligrams the recipe must have per serving. |
max-vitamin-e | 80.9 | The maximum amount of Vitamin E in milligrams the recipe can have per serving. |
min-vitamin-k | 30.4 | The minimum amount of Vitamin K in micrograms the recipe must have per serving. |
max-vitamin-k | 80.9 | The maximum amount of Vitamin K in micrograms the recipe can have per serving. |
min-vitamin-b1 | 30.4 | The minimum amount of Vitamin B1 in milligrams the recipe must have per serving. |
max-vitamin-b1 | 80.9 | The maximum amount of Vitamin B1 in milligrams the recipe can have per serving. |
min-vitamin-b2 | 30.4 | The minimum amount of Vitamin B2 in milligrams the recipe must have per serving. |
max-vitamin-b2 | 80.9 | The maximum amount of Vitamin B2 in milligrams the recipe can have per serving. |
min-vitamin-b3 | 30.4 | The minimum amount of Vitamin B3 in milligrams the recipe must have per serving. |
max-vitamin-b3 | 80.9 | The maximum amount of Vitamin B3 in milligrams the recipe can have per serving. |
min-vitamin-b5 | 30.4 | The minimum amount of Vitamin B5 in milligrams the recipe must have per serving. |
max-vitamin-b5 | 80.9 | The maximum amount of Vitamin B5 in milligrams the recipe can have per serving. |
min-vitamin-b6 | 30.4 | The minimum amount of Vitamin B6 in milligrams the recipe must have per serving. |
max-vitamin-b6 | 80.9 | The maximum amount of Vitamin B6 in milligrams the recipe can have per serving. |
min-vitamin-b12 | 30.4 | The minimum amount of Vitamin B12 in milligrams the recipe must have per serving. |
max-vitamin-b12 | 80.9 | The maximum amount of Vitamin B12 in milligrams the recipe can have per serving. |
sort | meta-score | The strategy to sort recipes by. |
sort-direction | ASC | Whether to sort ascending or descending (ASC or DESC). |
offset | 0 | The number of recipes to skip, between 0 and 900. |
number | 3 | The number of recipes, between 1 and 100. |
api-key | abcd1234 | Your API key. |
{
"offset": 0,
"number": 3,
"recipes": [
{
"id": 654913,
"title": "Pasta With Chicken and Mushrooms",
"images": [
"https://img.spoonacular.com/recipes/654913-312x231.jpg"
],
"nutrition": {
"nutrients": [
{
"name": "Protein",
"amount": 36.1306,
"unit": "g"
}
]
}
},
{
"id": 655582,
"title": "Penne Pasta With Chicken And Mushrooms",
"images": [
"https://img.spoonacular.com/recipes/655582-312x231.jpg"
],
"nutrition": {
"nutrients": [
{
"name": "Protein",
"amount": 40.6552,
"unit": "g"
}
]
}
},
{
"id": 1096241,
"title": "Spaghetti with Peas, Mushrooms, and Tomato Sauce",
"images": [
"https://img.spoonacular.com/recipes/1096241-312x231.jpg"
],
"nutrition": {
"nutrients": [
{
"name": "Protein",
"amount": 39.1976,
"unit": "g"
}
]
}
}
],
"total_results": 18
} Copy Code
curl -X GET 'https://api.apileague.com/search-recipes?query=pasta+with+mushrooms&exclude-ingredients=olives&min-protein=20&number=3' \ -H 'x-api-key: myapikey'
Response Headers:
Content-Type: application/jsonX-API-Quota-Request: The number of tokens used by the requestX-API-Quota-Used: The number of tokens used in total todayX-API-Quota-Left: The number of tokens left today (depends on your plan)You can search using natural language queries (e.g., "pasta without mushrooms"), and filter by ingredients, diet, cuisine, meal type, nutrition, intolerances, and more.
You can filter recipes by various diets such as vegetarian, vegan, gluten-free, ketogenic, and many others. You can also exclude specific ingredients or allergens.
Yes, the API can return detailed nutritional information for each recipe, including macro and micro nutrients, allowing you to sort or filter by healthiness or specific nutrient content.
The Search Recipes API allows you to find recipes based on ingredients, diets, or queries, while the Retrieve Recipe API provides detailed information for a single recipe using its ID.
add-recipe-information is set to true, one additional token per returned recipe. If fill-ingredients is set to true, one additional token per returned recipe.