Save over 30% when you subscribe to an annual subscription plan!

Recipe API

The Recipe API provides access to hundreds of thousands of creative recipes from all cuisines.

/v2/recipe GET

https://api.api-ninjas.com/v2/recipe

Get a list of recipes for a given recipe name or ingredient(s). Returns a list of recipes. To access more results, use the limit parameter to limit the number of results and the offset parameter to offset results for pagination in multiple API calls.


Parameters

Either title or ingredients parameter must be provided.

  • title  optional

    Recipe title to search for.

  • ingredients  optional

    Comma-separated list of ingredients to search for.

  • limit  optionalpremium only

    Number of results to return. Must be between 1 and 30. If not set, a default value of 1 will be used.

  • offset  optionalpremium only

    Number of results to offset for pagination.

Headers

  • X-Api-Key  required

    API Key associated with your account.

Sample Request Live Demo!

title
https://api.api-ninjas.com/v2/recipe?title=lentil soup

Headers

X-Api-KeyLog in or sign up to get your API Key

Sample Response

JSON
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 [ { "title": "Gramma's Lentil Soup with Garlic Bread", "ingredients": [ "2 tb Oil", "1 lg Onion; chopped", "3 Garlic cloves; finely grated or pureed", "1 Leek; finely chopped", "3 lg Carrots; diced", "3 Celery stalks; finely chopped", "1 ts Paprika", "1 ts Died mixed herbs", "1 ts Gramma's Mild Pepper Sauce", "2 ts Wine vinegar", "3 oz Red lentils; rinsed", "1 4 oz can tomatoes", "2 pt Vegetable stock" ], "servings": "6 servings", "instructions": "1. Heat the oil in a pan and fry the onions until soft (about 5 minutes). 2. Add the garlic, leeks, carrots and celery and cook for 5 minutes, stirring occasionally. 3. Add the paprika, herbs, pepper sauce, vinegar, lentils, tomatoes and stock. Stir well. 4. Bring to the boil, then reduce heat and simmer for 40-50 minutes, stirring occasionally. 5. Remove from heat, leave to cool slightly, then liquidise in a food processor or blender, or pass through a large sieve. 6. Pour back into pan and reheat. Serve with hot toasted garlic bread." } ]

Code Examples

1 2 curl -X GET "https://api.api-ninjas.com/v2/recipe?title=lentil%20soup" \ -H "X-Api-Key: YOUR_API_KEY"

If your programming language is not listed in the Code Example above, you can still make API calls by using a HTTP request library written in your programming language and following the above documentation.