Recipes API
Description
Search, or get recommendations from, our recipes database that contains 2M+ recipes ranging from American warm dishes to East European and Middle Eastern snacks. Most of this data was aggregated from online forums and cookbooks.
Bulk Data Download:
If you need a complete data dump of our entire Recipes database, reach out to us. We offer that as a separate service option. Trying to scrape our APIs is not recommended as you'll end up consuming your monthly request allowance.
Endpoint
> GET https://api.jsonrepo.com/v1/knowledge/food/recipes
Headers
Field | Description |
---|---|
api_key | Required Your API Key |
Parameters
Field | Type | Description |
---|---|---|
name | String | Optional The recipe or ingredient name (case insensitive) |
limit | Integer | Optional Number of results Default: 10 Range: 1 <= limit <= 20 |
Random Recommendations:
If the
name
search field is not provided, the endpoint will return a set of random recipes of sizelimit
.
Search Strictness:
This endpoint will use
non-strict
search. Thename
parameter provided will be searched against all possible matches including partial ones.
Response
A successful request will result in a populated payload
field with the expected output.
A failed request will result in an error output as detailed in Error Rules. If the endpoint validation fails due to missing, badly formatted or invalid parameters, the endpoint will return HTTP code 400
along with a message
detailing the error.
See the examples section for more information.
Request
- Curl
// Search for a `chicken` recipe
curl -G \
https://api.jsonrepo.com/v1/knowledge/food/recipes \
-H "api_key: {YOUR_API_KEY_HERE}" \
--data-urlencode "name=chicken" \
--data-urlencode "limit=1"
Success Response
{
"http_code": 200,
"http_message": "Ok",
"message": "Successful execution",
"payload": {
"recipes": [
{
"id": 1426770,
"name": "Popeye Tso'S Chicken (General Tso'S Chicken Made With Popeye'S Chicken Nuggets) Recipe",
"ingredients": [
"1/4 cup low sodium chicken stock",
"1 tablespoon soy sauce",
"1 tablespoon rice wine vinegar",
"2 tablespoons hoisin sauce",
"1 teaspoon chinese chili paste",
"2 teaspoons sesame oil",
"3 tablespoons sugar",
"2 teaspoons cornstarch",
"2 tablespons vegetable oil",
"2 cloves minced garlic (about 2 teaspoons",
"1 teapsoon minced fresh ginger",
"a half dozen dried red whole chilis",
"18 to 24 pieces popeye's chicken nuggets, or 3 order popeye's popcorn shrimp",
"3 scallion greens, sliced"
],
"instructions": [
"Combine stock, soy sauce, vinegar, hoisin, chili paste, sesame oil, sugar, and cornstarch in a small bowl and mix with a fork until blended and smooth.",
"Heat oil in a large wok over high heat until smoking. add garlic and ginger and stir fry until fragrant, about 15 seconds. immediately add whole chilies and chicken nuggets and toss to combine. add sauce and simmer, stirring constantly, until thickened into a thick glossy glaze. transfer contents immediately to a hot plate and serve with steamed rice."
],
"tags": [
"Chicken Stock",
"Soy Sauce",
"Rice Wine Vinegar",
"Hoisin Sauce",
"Chinese Chili Paste",
"Sesame Oil",
"Sugar",
"Cornstarch",
"Vegetable Oil",
"Garlic",
"Fresh Ginger",
"Chilis",
"Chicken",
"Scallion Greens"
],
"db_entry_last_updated_at": "2024-07-25 08:43:53"
}
]
}
}
Error Response Examples
// Request with invalid `limit` parameter
{
"http_code": 400,
"http_message": "Bad Request",
"message": "Malformed request: `limit` parameter must be between 1 (min) and 20 (max). Default is 10.",
"payload": []
}