TheMealDB API

Beginner's Pick Food & Drink / API Key Intermediate HTTPS CORS
78 B
Measured Score 0 50 100 Speed 15/30 Consistency 20/20 Security 20/20 Browser access 15/15 Transparency 8/15 TESTED 2026-08-10

Overview

TheMealDB is a free meal recipe database covering thousands of dishes from global cuisines. You can search for recipes by meal name, ingredient, or category, and retrieve detailed cooking instructions. The free tier uses test key '1' and is perfect for building recipe apps.

Beginner Tip

Start with the free test API key '1'—no sign-up needed. Try /search.php?s=chicken to get all chicken recipes with full ingredients and instructions.

Measurement Record

What actually happened when we called this API from our own infrastructure. Every value below was recorded by the request, not copied from the provider's documentation.

Request
GET https://www.themealdb.com/api/json/v1/1/search.php?s=chicken
Result
HTTP 200 · application/json · 59,786 bytes · compressed
Response time
267 ms (median of 3) · fastest 263 ms
Transport
TLSv1.3 · TLS_AES_256_GCM_SHA384 · certificate issued by Google Trust Services
Browser CORS
Allowed — Access-Control-Allow-Origin: *
Served by
cloudflare
Recorded
2026-08-10

Fields Returned

Top-level fields present in the response we captured, with the type and value we actually received.

Field Type Value received
meals array [1 item]

Captured Response

Captured from a real request to https://www.themealdb.com/api/json/v1/1/search.php?s=chicken on 2026-08-10. Long arrays and nested objects are truncated to keep the shape readable.

JSON Response · Captured
{
  "meals": [
    {
      "idMeal": "52795",
      "strMeal": "Chicken Handi",
      "strMealAlternate": null,
      "strCategory": "Chicken",
      "strArea": "India",
      "strCountry": "India",
      "strInstructions": "Take a large pot or wok, big enough to cook all the chicken, and heat the oil in it. Once the oil is hot, add sliced onion and fry them until deep golden bro…",
      "strMealThumb": "https://www.themealdb.com/images/media/meals/wyxwsp1486979827.jpg",
      "strTags": null,
      "strYoutube": "https://www.youtube.com/watch?v=IO0issT0Rmc",
      "strIngredient1": "Chicken",
      "strIngredient2": "Onion",
      "strIngredient3": "Tomatoes",
      "strIngredient4": "Garlic",
      "…": "(40 more fields)"
    }
  ]
}

Field Reference

idMeal Unique identifier for the meal
strMeal Name of the meal
strCategory Food category such as Chicken, Dessert, or Seafood
strArea Cuisine region, e.g. Italian, Japanese, Mexican
strInstructions Full cooking instructions as plain text
strMealThumb URL to the meal thumbnail image

Implementation Example

Calls a real endpoint of this API. Replace any placeholder credentials with your own key.

Request
const url = "https://www.themealdb.com/";
// Replace headers or query params with the values required by this API.
const response = await fetch(url, {
  headers: {
  "X-API-Key": "YOUR_API_KEY"
  }
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data);

What Can You Build?

Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.

Common Errors & Troubleshooting

Generated guidance based on this API's documentation, not observed by us. Treat it as a starting point and check against the provider's own error reference.

meals is null No meal matched the search query
Double-check spelling or try a broader search term like a main ingredient instead of a specific dish name
404 Not Found Wrong API endpoint path
Ensure the path follows the pattern /api/json/v1/1/search.php?s=term
Incomplete ingredient list The API returns up to 20 ingredients as strIngredient1…strIngredient20 with null for unused slots
Filter out null or empty ingredient fields before displaying them to users

Measured Score Breakdown

Live HTTP request to the API endpoint

Speed 15/30
Consistency 20/20
Security 20/20
Browser access 15/15
Transparency 8/15
Endpoint Response Time 267ms

Fully tested on Aug 10, 2026

Technical Specifications

Auth API Key
HTTPS REQUIRED
CORS YES
Category Food & Drink
Difficulty Intermediate
Endpoint last called: 2026-08-10

Related Tags

Similar APIs

View All →