Recipe API
The Recipe API provides access to over 125,000 recipes from all cuisines, each with structured ingredients, step-by-step instructions and full nutrition data. Premium plans add ingredient (pantry) search, automatic recipe scaling and macro-based filtering.
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
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 (up to
5). Results are ranked by how many of your ingredients they use, then by how few additional ingredients they need, and each recipe gains apantry_matchobject listing what you are missing.limitoptionalNumber of results to return. Must be between
1and5on the free tier, or1and10for premium subscribers. If not set, a default value of1will be used.servingsoptionalPremium onlyRescale each recipe to this number of servings. Every ingredient
quantityand the wholenutritionblock are recomputed, and the response gainsoriginal_servingsandscale_factor. Must be between1and1000.min_calories,max_calories,min_protein,max_protein,min_carbs,max_carbs,min_fat,max_fat,max_sugars,max_sodiumoptionalPremium onlyMacro filters. Restrict results to recipes whose nutrition falls within the given bounds — for example
min_protein=30&max_calories=500for high-protein, lower-calorie meals. Values are per recipe, in the same units as thenutritionresponse object. Macro filters may be used on their own, withouttitleoringredients.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 objects. Each object contains a
name(string),quantity(number), andunit(string).servingsServing information / yield description.
instructionsArray of instruction step strings describing how to prepare the recipe.
nutritionNutrition information object containing calories, fat, saturated fat, protein, sodium, potassium, dietary fiber, cholesterol, sugars, and total carbohydrates. Included on every tier.
pantry_matchPremium onlyReturned when
ingredientsis set. Containsmatched_ingredients,matched_count,requested_count,missing_ingredients(the recipe ingredients your search did not cover) andmissing_count.original_servings,scale_factorPremium onlyReturned when
servingsis set. The recipe's original yield, and the multiplier applied to every ingredient quantity and nutrition value.
Live Demo
Code Examples
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 125,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 anutritionobject covering calories, fat, protein, sodium, fiber, sugars, and more — included on every tier. Premium requests can also returnpantry_match(for ingredient searches) andoriginal_servings/scale_factor(when rescaling withservings). 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.
Explore API integration use cases for recommended APIs and workflow examples.