Skip to content
Mock APIs

Resources

Recipes

Recipes with ingredients, step-by-step instructions, timings, and nutrition information. The dataset contains 50 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.

recipe fields
FieldTypeNotes
idintegermin -9007199254740991, max 9007199254740991
namestring
cuisinestring
difficulty"Easy" | "Medium" | "Hard"
mealType"Breakfast" | "Lunch" | "Dinner" | "Snack" | "Dessert"[]
tagsstring[]
ingredientsstring[]
instructionsstring[]
prepTimeMinutesintegermin -9007199254740991, max 9007199254740991
cookTimeMinutesintegermin -9007199254740991, max 9007199254740991
servingsintegermin -9007199254740991, max 9007199254740991
caloriesPerServingintegermin -9007199254740991, max 9007199254740991
ratingnumber
reviewCountintegermin -9007199254740991, max 9007199254740991
userIdintegermin -9007199254740991, max 9007199254740991
imagestring

List recipes

GET/api/v1/recipes

Returns a paginated list of recipes. Supports pagination, field selection, sorting, and filtering.

Parameters

Parameters for List recipes
NameInTypeDescription
limitqueryintegerNumber of records to return (1-100).Default: 30Range: 1-100
skipqueryintegerNumber of records to skip before returning results.Default: 0Range: 0-1000000
selectquerystringComma-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.
sortByquerystringField to sort by.One of: id, name, rating, prepTimeMinutes, cookTimeMinutes, caloriesPerServingDefault: id
orderquerystringSort direction.One of: asc, descDefault: asc
cuisinequerystringFilter by cuisine.
difficultyquerystringFilter by difficulty.One of: Easy, Medium, Hard
mealTypequerystringFilter by meal type.One of: Breakfast, Lunch, Dinner, Snack, Dessert
tagquerystringOnly return recipes with this tag.
delayqueryintegerDelay 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, and limit metadata.
  • 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.

200application/json
{
  "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

GET
Headers

No header yet.

Open in playground
Send the request to see a live response.
GET/api/v1/recipes/search

Case-insensitive search across name, cuisine, tags, ingredients. Returns an empty recipes array with total: 0 when nothing matches.

Parameters

Parameters for Search recipes
NameInTypeDescription
qrequiredquerystringSearch term (1-100 characters).
limitqueryintegerNumber of records to return (1-100).Default: 30Range: 1-100
skipqueryintegerNumber of records to skip before returning results.Default: 0Range: 0-1000000
selectquerystringComma-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.
sortByquerystringField to sort by.One of: id, name, rating, prepTimeMinutes, cookTimeMinutes, caloriesPerServingDefault: id
orderquerystringSort direction.One of: asc, descDefault: asc
delayqueryintegerDelay 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 q parameter (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.

200application/json
{
  "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
Headers

No header yet.

Open in playground
Send the request to see a live response.

Get a recipe

GET/api/v1/recipes/{id}

Returns a single recipe by its numeric ID.

Parameters

Parameters for Get a recipe
NameInTypeDescription
idrequiredpathintegerNumeric recipe ID (positive integer).Min: 1
selectquerystringComma-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.
delayqueryintegerDelay 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.

200application/json
{
  "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"
}

Try it

GET
Headers

No header yet.

Open in playground
Send the request to see a live response.