Recipe API
The Recipe API provides access to over 200,000 recipes from all cuisines.
From 6,055 users
Applications using this API
API Status
API Response Times
Average | P50 | P75 | P90 | P95 |
|---|---|---|---|---|
| 391ms | 433ms | 482ms | 887ms | 1315ms |
Similar APIs
Didn't find what you were looking for? Suggest an improvement
/v3/recipe GET
https://api.api-ninjas.com/v3/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.
titleoptionalRecipe title to search for.
ingredientsoptionalpremium onlyComma-separated list of ingredients to search for.
limitoptionalpremium onlyNumber of results to return. Must be between
1and10. If not set, a default value of1will be used.offsetoptionalpremium onlyNumber of results to offset for pagination.
Headers
X-Api-KeyrequiredAPI Key associated with your account.
Response
A JSON array of recipe objects matching the query, each containing the following fields, or an error if the request is unsuccessful.
titleRecipe title.
ingredientsArray of ingredient strings. Each ingredient contains the name and quantity.
servingsServing information / yield description.
instructionsFull text instructions describing how to prepare the recipe.
nutritionpremium onlyNutrition information object containing calories, fat, saturated fat, protein, sodium, potassium, dietary fiber, cholesterol, sugars, and total carbohydrates.
Sample Request Live Demo!
Try our APIs in the API playground
Sign up for a free API key to get started — no credit card required.
https://api.api-ninjas.com/v3/recipe?title=lentil%20soupHeaders
X-Api-KeyLog in or sign up to get your API KeySample Response
Code Examples
1
2
curl -X GET "https://api.api-ninjas.com/v3/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.
Frequently Asked Questions
Can I use the Recipe API for commercial purposes?
Yes, but you must have a premium subscription. Commercial use of the Recipe API is not permitted on the free tier. See our pricing page to choose a plan that fits your needs.How do I get an API key and start using the Recipe API?
Sign up for a free account to instantly get your API key, then pass it in theX-Api-Keyheader on every request. The documentation above includes ready-to-run examples in cURL, Python, JavaScript, Node.js, and more.What happens if I exceed my quota for the month?
Your API requests will simply be denied once you hit your monthly quota — you will never be charged more than the plan you signed up for. To increase your quota, you can upgrade your plan any time on our pricing page.What happens if a request to the Recipe API fails?
The API responds with a standard HTTP status code and a JSON error message describing the problem. See our error codes reference for the full list of codes and how to resolve each one, or contact support if you need help.How do I search for recipes by name or by ingredient?
Call the/v3/recipeendpoint with either atitleparameter (for exampletitle=lentil soup) or a comma-separatedingredientsparameter to find recipes that use those items; one of the two is required. Get a key on the registration page to start querying over 200,000 recipes.What fields does a recipe response include?
Each result is a JSON object with the recipetitle, aningredientsarray of names and quantities, aservingsyield description, and full-textinstructions, plus a premium-onlynutritionobject covering calories, fat, protein, sodium, fiber, sugars, and more. If you need standalone nutrition lookups, pair it with the Nutrition API.How do I get more than one recipe back per request?
By default a single recipe is returned, but with a premium plan you can set thelimitparameter to any value between1and10and use theoffsetparameter to paginate through additional results across multiple calls. See the pricing page for plan details.What are some use cases for the Recipe API?
You can power meal-planning and cooking apps, build 'what can I make with these ingredients' search tools using theingredientsparameter, or surface nutrition facts for dishes. It pairs well with the Calories Burned API and Cocktail API to round out a complete food and fitness experience.