Search Recipes API

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.

Recipe Sorting Options

This is a list of possible values for the sort parameter.

  • (empty)
  • meta-score
  • popularity
  • healthiness
  • price
  • time
  • random
  • max-used-ingredients
  • min-missing-ingredients
  • alcohol
  • caffeine
  • copper
  • energy
  • calories
  • calcium
  • carbohydrates
  • carbs
  • choline
  • cholesterol
  • total-fat
  • fluoride
  • trans-fat
  • saturated-fat
  • mono-unsaturated-fat
  • poly-unsaturated-fat
  • fiber
  • folate
  • folic-acid
  • iodine
  • iron
  • magnesium
  • manganese
  • vitamin-b3
  • niacin
  • vitamin-b5
  • pantothenic-acid
  • phosphorus
  • potassium
  • protein
  • vitamin-b2
  • riboflavin
  • selenium
  • sodium
  • vitamin-b1
  • thiamin
  • vitamin-a
  • vitamin-b6
  • vitamin-b12
  • vitamin-c
  • vitamin-d
  • vitamin-e
  • vitamin-k
  • sugar
  • zinc
  • (empty)
  • meta-score
  • popularity
  • healthiness
  • price
  • time
  • random
  • max-used-ingredients
  • min-missing-ingredients
  • alcohol
  • caffeine
  • copper
  • energy
  • calories
  • calcium
  • carbohydrates
  • carbs
  • choline
  • cholesterol
  • total-fat
  • fluoride
  • trans-fat
  • saturated-fat
  • mono-unsaturated-fat
  • poly-unsaturated-fat
  • fiber
  • folate
  • folic-acid
  • iodine
  • iron
  • magnesium
  • manganese
  • vitamin-b3
  • niacin
  • vitamin-b5
  • pantothenic-acid
  • phosphorus
  • potassium
  • protein
  • vitamin-b2
  • riboflavin
  • selenium
  • sodium
  • vitamin-b1
  • thiamin
  • vitamin-a
  • vitamin-b6
  • vitamin-b12
  • vitamin-c
  • vitamin-d
  • vitamin-e
  • vitamin-k
  • sugar
  • zinc

Health Score ('healthiness')

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.

GET
https://api.apileague.com/search-recipes
Example Request and Response
GET
https://api.apileague.com/{{ examples.getSearchRecipes }}
{
    "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
}
cURL
Java
Javascript
Python
Go
C#
 {{ codeCopyText }}
 {{ codeCopyText }}
 {{ codeCopyText }}
 {{ codeCopyText }}
 {{ codeCopyText }}
 {{ codeCopyText }}

Frequently Asked Questions

How can I search for recipes using this API?

You can search using natural language queries (e.g., "pasta without mushrooms"), and filter by ingredients, diet, cuisine, meal type, nutrition, intolerances, and more.

What dietary filters are available?

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.

Does the API provide nutritional information for the recipes?

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.

How is the Search Recipes API different from the Retrieve Recipe API?

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.

Questions? Need Help? Ask Away