{
  "openapi": "3.1.0",
  "info": {
    "title": "Recipes API",
    "version": "1.0.0",
    "description": "115 curated home-cook recipes across 21 cuisines with quantities, steps, timings and dietary flags.\n\n115 curated home-cook recipes across 21 cuisines — Italian, Mexican, Indian, Japanese, Korean, Thai, French, Middle Eastern, Spanish, British and more — each with ingredients and quantities, original step-by-step instructions, prep and cook times, servings, difficulty and dietary flags (vegetarian, vegan, gluten-free). Search by text, ingredient, cuisine, meal type, difficulty, diet or total time, page through summaries, fetch full recipes by slug, or pull a random dish that matches any filter.",
    "contact": {
      "name": "Data and APIs",
      "url": "https://dataandapis.com/contact"
    },
    "termsOfService": "https://dataandapis.com/terms-of-service",
    "license": {
      "name": "Data and APIs Terms of Service",
      "url": "https://dataandapis.com/terms-of-service"
    },
    "x-logo": {
      "url": "https://dataandapis.com/images/recipes.webp"
    }
  },
  "externalDocs": {
    "description": "Documentation, live tester and pricing",
    "url": "https://dataandapis.com/apis/recipes"
  },
  "servers": [
    {
      "url": "https://api-recipes.dataandapis.com"
    }
  ],
  "tags": [
    {
      "name": "Food",
      "description": "Recipes API belongs to the Food category of the Data and APIs catalog."
    }
  ],
  "paths": {
    "/v1/recipes/{slug}": {
      "get": {
        "operationId": "getRecipe",
        "summary": "Get Recipe",
        "description": "Get Recipe endpoint of the Recipes API. Costs 1 token per call.",
        "externalDocs": {
          "url": "https://dataandapis.com/apis/recipes/get-recipe"
        },
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "margherita-pizza"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "ok": true,
                  "name": "Margherita Pizza",
                  "slug": "margherita-pizza",
                  "cuisine": "italian",
                  "meal_type": "dinner",
                  "difficulty": "hard",
                  "prep_minutes": 90,
                  "cook_minutes": 12,
                  "total_minutes": 102,
                  "servings": 2,
                  "vegetarian": true,
                  "vegan": false,
                  "gluten_free": false,
                  "tags": [
                    "pizza",
                    "baking",
                    "classic"
                  ],
                  "ingredients": [
                    {
                      "name": "Pizza dough",
                      "quantity": "300 g"
                    },
                    {
                      "name": "Crushed tomatoes",
                      "quantity": "120 g"
                    },
                    {
                      "name": "Fresh mozzarella",
                      "quantity": "125 g"
                    },
                    {
                      "name": "Basil leaves",
                      "quantity": "a handful"
                    },
                    {
                      "name": "Olive oil",
                      "quantity": "1 tbsp"
                    },
                    {
                      "name": "Salt",
                      "quantity": "pinch"
                    }
                  ],
                  "instructions": [
                    "Let the dough come to room temperature, then stretch it into a thin 30 cm round.",
                    "Spread a thin layer of seasoned crushed tomatoes, leaving a border.",
                    "Tear the mozzarella over the top and bake on a preheated stone or tray at the oven's highest setting until blistered, 8–12 minutes.",
                    "Finish with basil and a drizzle of olive oil."
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "402": {
            "description": "Subscription past due; the response carries a payment_url"
          },
          "429": {
            "description": "Monthly token allowance exhausted"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1/recipes/cuisines": {
      "get": {
        "operationId": "listCuisines",
        "summary": "List Cuisines",
        "description": "List Cuisines endpoint of the Recipes API. Costs 1 token per call.",
        "externalDocs": {
          "url": "https://dataandapis.com/apis/recipes/list-cuisines"
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "ok": true,
                  "total_recipes": 115,
                  "cuisines": [
                    {
                      "name": "american",
                      "recipes": 19
                    },
                    {
                      "name": "brazilian",
                      "recipes": 1
                    },
                    {
                      "name": "british",
                      "recipes": 8
                    },
                    {
                      "name": "caribbean",
                      "recipes": 2
                    },
                    {
                      "name": "chinese",
                      "recipes": 7
                    },
                    {
                      "name": "french",
                      "recipes": 9
                    },
                    {
                      "name": "fusion",
                      "recipes": 1
                    },
                    {
                      "name": "german",
                      "recipes": 3
                    },
                    {
                      "name": "indian",
                      "recipes": 8
                    },
                    {
                      "name": "italian",
                      "recipes": 10
                    },
                    {
                      "name": "japanese",
                      "recipes": 6
                    },
                    {
                      "name": "korean",
                      "recipes": 4
                    },
                    {
                      "name": "mediterranean",
                      "recipes": 7
                    },
                    {
                      "name": "mexican",
                      "recipes": 8
                    },
                    {
                      "name": "middle-eastern",
                      "recipes": 5
                    },
                    {
                      "name": "moroccan",
                      "recipes": 3
                    },
                    {
                      "name": "peruvian",
                      "recipes": 1
                    },
                    {
                      "name": "spanish",
                      "recipes": 4
                    },
                    {
                      "name": "thai",
                      "recipes": 5
                    },
                    {
                      "name": "venezuelan",
                      "recipes": 1
                    },
                    {
                      "name": "vietnamese",
                      "recipes": 3
                    }
                  ],
                  "meal_types": [
                    {
                      "name": "breakfast",
                      "recipes": 11
                    },
                    {
                      "name": "dessert",
                      "recipes": 12
                    },
                    {
                      "name": "dinner",
                      "recipes": 55
                    },
                    {
                      "name": "lunch",
                      "recipes": 25
                    },
                    {
                      "name": "snack",
                      "recipes": 12
                    }
                  ],
                  "dietary": {
                    "vegetarian": 67,
                    "vegan": 24,
                    "gluten_free": 50
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "402": {
            "description": "Subscription past due; the response carries a payment_url"
          },
          "429": {
            "description": "Monthly token allowance exhausted"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1/recipes": {
      "get": {
        "operationId": "listRecipes",
        "summary": "List Recipes",
        "description": "List Recipes endpoint of the Recipes API. Costs 1 token per call.",
        "externalDocs": {
          "url": "https://dataandapis.com/apis/recipes/list-recipes"
        },
        "parameters": [
          {
            "name": "cuisine",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "italian"
          },
          {
            "name": "difficulty",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "easy"
          },
          {
            "name": "gluten_free",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "true"
          },
          {
            "name": "ingredient",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "chickpea"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "10"
          },
          {
            "name": "max_minutes",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "30"
          },
          {
            "name": "meal_type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "dinner"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "1"
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "coconut"
          },
          {
            "name": "vegan",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "true"
          },
          {
            "name": "vegetarian",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "true"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "ok": true,
                  "total": 6,
                  "page": 1,
                  "limit": 3,
                  "count": 3,
                  "results": [
                    {
                      "name": "Spaghetti Aglio e Olio",
                      "slug": "spaghetti-aglio-e-olio",
                      "cuisine": "italian",
                      "meal_type": "dinner",
                      "difficulty": "easy",
                      "prep_minutes": 5,
                      "cook_minutes": 15,
                      "total_minutes": 20,
                      "servings": 2,
                      "vegetarian": true,
                      "vegan": true,
                      "gluten_free": false,
                      "tags": [
                        "pasta",
                        "quick",
                        "classic"
                      ]
                    },
                    {
                      "name": "Margherita Pizza",
                      "slug": "margherita-pizza",
                      "cuisine": "italian",
                      "meal_type": "dinner",
                      "difficulty": "hard",
                      "prep_minutes": 90,
                      "cook_minutes": 12,
                      "total_minutes": 102,
                      "servings": 2,
                      "vegetarian": true,
                      "vegan": false,
                      "gluten_free": false,
                      "tags": [
                        "pizza",
                        "baking",
                        "classic"
                      ]
                    },
                    {
                      "name": "Creamy Mushroom Risotto",
                      "slug": "mushroom-risotto",
                      "cuisine": "italian",
                      "meal_type": "dinner",
                      "difficulty": "medium",
                      "prep_minutes": 10,
                      "cook_minutes": 30,
                      "total_minutes": 40,
                      "servings": 4,
                      "vegetarian": true,
                      "vegan": false,
                      "gluten_free": true,
                      "tags": [
                        "rice",
                        "comfort-food"
                      ]
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "402": {
            "description": "Subscription past due; the response carries a payment_url"
          },
          "429": {
            "description": "Monthly token allowance exhausted"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1/recipes/random": {
      "get": {
        "operationId": "randomRecipe",
        "summary": "Random Recipe",
        "description": "Random Recipe endpoint of the Recipes API. Costs 1 token per call.",
        "externalDocs": {
          "url": "https://dataandapis.com/apis/recipes/random-recipe"
        },
        "parameters": [
          {
            "name": "amount",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "1"
          },
          {
            "name": "gluten_free",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "true"
          },
          {
            "name": "vegan",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "true"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "ok": true,
                  "count": 1,
                  "results": [
                    {
                      "name": "Rice and Peas",
                      "slug": "rice-and-peas",
                      "cuisine": "caribbean",
                      "meal_type": "dinner",
                      "difficulty": "medium",
                      "prep_minutes": 5,
                      "cook_minutes": 30,
                      "total_minutes": 35,
                      "servings": 6,
                      "vegetarian": true,
                      "vegan": true,
                      "gluten_free": true,
                      "tags": [
                        "rice",
                        "vegan",
                        "gluten-free"
                      ],
                      "ingredients": [
                        {
                          "name": "Long-grain rice",
                          "quantity": "400 g"
                        },
                        {
                          "name": "Kidney beans",
                          "quantity": "1 can with liquid"
                        },
                        {
                          "name": "Coconut milk",
                          "quantity": "400 ml"
                        },
                        {
                          "name": "Scallions",
                          "quantity": "2"
                        },
                        {
                          "name": "Thyme",
                          "quantity": "2 sprigs"
                        },
                        {
                          "name": "Scotch bonnet",
                          "quantity": "1, whole"
                        },
                        {
                          "name": "Garlic",
                          "quantity": "2 cloves"
                        }
                      ],
                      "instructions": [
                        "Put the beans and their liquid, coconut milk, aromatics and 300 ml water in a pot and bring to a boil.",
                        "Stir in the rice and salt, cover and simmer on low for 20 minutes.",
                        "Rest off the heat for 10 minutes.",
                        "Remove the chile and thyme stems and fluff with a fork."
                      ]
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "402": {
            "description": "Subscription past due; the response carries a payment_url"
          },
          "429": {
            "description": "Monthly token allowance exhausted"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ApiKey": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Api-Key",
        "description": "Create a free key at https://dataandapis.com/sign-up. 500 tokens a month on the Free plan; this API costs 1 token per call."
      }
    }
  },
  "security": [
    {
      "ApiKey": []
    }
  ]
}