Resources
Recipes
Read-only resource
Recipes can be listed, searched, and fetched by ID. Write methods return 405 Method Not Allowed.
Endpoints
The recipe object
Use select to return a subset of these fields. Sort with sortBy on id, name, rating, prepTimeMinutes, cookTimeMinutes, caloriesPerServing; search matches name, cuisine, tags, ingredients. See query parameters.
| Field | Type | Notes |
|---|---|---|
id | integer | min -9007199254740991, max 9007199254740991 |
name | string | |
cuisine | string | |
difficulty | "Easy" | "Medium" | "Hard" | |
mealType | "Breakfast" | "Lunch" | "Dinner" | "Snack" | "Dessert"[] | |
tags | string[] | |
ingredients | string[] | |
instructions | string[] | |
prepTimeMinutes | integer | min -9007199254740991, max 9007199254740991 |
cookTimeMinutes | integer | min -9007199254740991, max 9007199254740991 |
servings | integer | min -9007199254740991, max 9007199254740991 |
caloriesPerServing | integer | min -9007199254740991, max 9007199254740991 |
rating | number | |
reviewCount | integer | min -9007199254740991, max 9007199254740991 |
userId | integer | min -9007199254740991, max 9007199254740991 |
image | string |
List recipes
/api/v1/recipesReturns a paginated list of recipes. Supports pagination, field selection, sorting, and filtering.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
limit | query | integer | Number of records to return (1-100).Default: 30Range: 1-100 |
skip | query | integer | Number of records to skip before returning results.Default: 0Range: 0-1000000 |
select | query | string | Comma-separated list of fields to return. id is always included. Allowed: id, name, cuisine, difficulty, mealType, tags, ingredients, instructions, prepTimeMinutes, cookTimeMinutes, servings, caloriesPerServing, rating, reviewCount, userId, image. |
sortBy | query | string | Field to sort by.One of: id, name, rating, prepTimeMinutes, cookTimeMinutes, caloriesPerServingDefault: id |
order | query | string | Sort direction.One of: asc, descDefault: asc |
cuisine | query | string | Filter by cuisine. |
difficulty | query | string | Filter by difficulty.One of: Easy, Medium, Hard |
mealType | query | string | Filter by meal type.One of: Breakfast, Lunch, Dinner, Snack, Dessert |
tag | query | string | Only return recipes with this tag. |
delay | query | integer | Delay the response by this many milliseconds (0-5000). Subject to a stricter rate limit.Range: 0-5000 |
Status codes
- 200A page of recipes with
total,skip, andlimitmetadata. - 400Invalid path or query parameter (
INVALID_PARAMETER/INVALID_ID). - 429Too many requests from this IP (
RATE_LIMIT_EXCEEDED). - 503The database is temporarily unavailable (
SERVICE_UNAVAILABLE).
Request
curl 'https://test.naimulhassan.me/api/v1/recipes?limit=2'Example responses
Captured from the real API with the requests shown on this page.
{
"recipes": [
{
"id": 1,
"name": "Classic Margherita Pizza",
"cuisine": "Italian",
"difficulty": "Medium",
"mealType": [
"Dinner"
],
"tags": [
"pizza",
"vegetarian"
],
"ingredients": [
"pizza dough",
"tomato sauce",
"fresh mozzarella",
"fresh basil",
"olive oil",
"salt"
],
"instructions": [
"Preheat the oven to its highest setting with a tray or pizza stone inside.",
"Stretch the pizza dough into a thin round on a floured surface.",
"Spread a thin layer of tomato sauce and tear the mozzarella over the top.",
"Bake for 8-10 minutes until the crust is blistered and the cheese is bubbling.",
"Finish with fresh basil and a drizzle of olive oil."
],
"prepTimeMinutes": 18,
"cookTimeMinutes": 11,
"servings": 2,
"caloriesPerServing": 845,
"rating": 4.9,
"reviewCount": 15,
"userId": 87,
"image": "https://test.naimulhassan.me/api/v1/images/recipes/1"
},
{
"id": 2,
"name": "Spaghetti Aglio e Olio",
"cuisine": "Italian",
"difficulty": "Easy",
"mealType": [
"Dinner"
],
"tags": [
"pasta",
"vegetarian",
"quick"
],
"ingredients": [
"spaghetti",
"garlic",
"olive oil",
"red pepper flakes",
"parsley",
"parmesan"
],
"instructions": [
"Bring a large pot of salted water to a boil.",
"Cook the spaghetti until al dente, then reserve a cup of the cooking water.",
"Meanwhile, gently cook the remaining ingredients in olive oil over medium heat.",
"Toss the drained spaghetti with the sauce, adding cooking water as needed.",
"Serve immediately, topped with parmesan."
],
"prepTimeMinutes": 11,
"cookTimeMinutes": 11,
"servings": 2,
"caloriesPerServing": 553,
"rating": 4.6,
"reviewCount": 109,
"userId": 39,
"image": "https://test.naimulhassan.me/api/v1/images/recipes/2"
}
],
"total": 50,
"skip": 0,
"limit": 2
}Try it
Search recipes
/api/v1/recipes/searchCase-insensitive search across name, cuisine, tags, ingredients. Returns an empty recipes array with total: 0 when nothing matches.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
qrequired | query | string | Search term (1-100 characters). |
limit | query | integer | Number of records to return (1-100).Default: 30Range: 1-100 |
skip | query | integer | Number of records to skip before returning results.Default: 0Range: 0-1000000 |
select | query | string | Comma-separated list of fields to return. id is always included. Allowed: id, name, cuisine, difficulty, mealType, tags, ingredients, instructions, prepTimeMinutes, cookTimeMinutes, servings, caloriesPerServing, rating, reviewCount, userId, image. |
sortBy | query | string | Field to sort by.One of: id, name, rating, prepTimeMinutes, cookTimeMinutes, caloriesPerServingDefault: id |
order | query | string | Sort direction.One of: asc, descDefault: asc |
delay | query | integer | Delay the response by this many milliseconds (0-5000). Subject to a stricter rate limit.Range: 0-5000 |
Status codes
- 200Matching recipes (possibly empty).
- 400Missing or invalid
qparameter (INVALID_PARAMETER). - 429Too many requests from this IP (
RATE_LIMIT_EXCEEDED).
Request
curl 'https://test.naimulhassan.me/api/v1/recipes/search?q=pasta&limit=2'Example responses
Captured from the real API with the requests shown on this page.
{
"recipes": [
{
"id": 2,
"name": "Spaghetti Aglio e Olio",
"cuisine": "Italian",
"difficulty": "Easy",
"mealType": [
"Dinner"
],
"tags": [
"pasta",
"vegetarian",
"quick"
],
"ingredients": [
"spaghetti",
"garlic",
"olive oil",
"red pepper flakes",
"parsley",
"parmesan"
],
"instructions": [
"Bring a large pot of salted water to a boil.",
"Cook the spaghetti until al dente, then reserve a cup of the cooking water.",
"Meanwhile, gently cook the remaining ingredients in olive oil over medium heat.",
"Toss the drained spaghetti with the sauce, adding cooking water as needed.",
"Serve immediately, topped with parmesan."
],
"prepTimeMinutes": 11,
"cookTimeMinutes": 11,
"servings": 2,
"caloriesPerServing": 553,
"rating": 4.6,
"reviewCount": 109,
"userId": 39,
"image": "https://test.naimulhassan.me/api/v1/images/recipes/2"
},
{
"id": 3,
"name": "Creamy Mushroom Pasta",
"cuisine": "Italian",
"difficulty": "Easy",
"mealType": [
"Lunch",
"Dinner"
],
"tags": [
"pasta",
"vegetarian"
],
"ingredients": [
"penne",
"mushrooms",
"cream",
"garlic",
"parmesan",
"fresh thyme"
],
"instructions": [
"Bring a large pot of salted water to a boil.",
"Cook the penne until al dente, then reserve a cup of the cooking water.",
"Meanwhile, gently cook the remaining ingredients in olive oil over medium heat.",
"Toss the drained penne with the sauce, adding cooking water as needed.",
"Serve immediately, topped with fresh thyme."
],
"prepTimeMinutes": 17,
"cookTimeMinutes": 22,
"servings": 4,
"caloriesPerServing": 470,
"rating": 4.9,
"reviewCount": 101,
"userId": 72,
"image": "https://test.naimulhassan.me/api/v1/images/recipes/3"
}
],
"total": 2,
"skip": 0,
"limit": 2
}Try it
Get a recipe
/api/v1/recipes/{id}Returns a single recipe by its numeric ID.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | integer | Numeric recipe ID (positive integer).Min: 1 |
select | query | string | Comma-separated list of fields to return. id is always included. Allowed: id, name, cuisine, difficulty, mealType, tags, ingredients, instructions, prepTimeMinutes, cookTimeMinutes, servings, caloriesPerServing, rating, reviewCount, userId, image. |
delay | query | integer | Delay the response by this many milliseconds (0-5000). Subject to a stricter rate limit.Range: 0-5000 |
Status codes
- 200The recipe object.
- 400Invalid path or query parameter (
INVALID_PARAMETER/INVALID_ID). - 404No record exists with that ID (
RESOURCE_NOT_FOUND).
Request
curl 'https://test.naimulhassan.me/api/v1/recipes/1'Example responses
Captured from the real API with the requests shown on this page.
{
"id": 1,
"name": "Classic Margherita Pizza",
"cuisine": "Italian",
"difficulty": "Medium",
"mealType": [
"Dinner"
],
"tags": [
"pizza",
"vegetarian"
],
"ingredients": [
"pizza dough",
"tomato sauce",
"fresh mozzarella",
"fresh basil",
"olive oil",
"salt"
],
"instructions": [
"Preheat the oven to its highest setting with a tray or pizza stone inside.",
"Stretch the pizza dough into a thin round on a floured surface.",
"Spread a thin layer of tomato sauce and tear the mozzarella over the top.",
"Bake for 8-10 minutes until the crust is blistered and the cheese is bubbling.",
"Finish with fresh basil and a drizzle of olive oil."
],
"prepTimeMinutes": 18,
"cookTimeMinutes": 11,
"servings": 2,
"caloriesPerServing": 845,
"rating": 4.9,
"reviewCount": 15,
"userId": 87,
"image": "https://test.naimulhassan.me/api/v1/images/recipes/1"
}