TheMealDB API

⭐ Beginner's Pick Food & Drink / API Key Intermediate HTTPS CORS
Varies by plan (check documentation)

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.

Available Data

recipe name and ingredients
nutritional values
calorie count
serving size
preparation time
Use case: Integrate meal recipes data into web and mobile applications

Example Response

JSON Response
{
  "recipe": "Chicken Stir Fry",
  "calories": 380,
  "protein_g": 32,
  "carbs_g": 28,
  "fat_g": 14,
  "ingredients": [
    "chicken breast",
    "bell pepper",
    "soy sauce",
    "garlic"
  ],
  "prep_time_minutes": 20
}

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

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

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

Matrix Score Breakdown

🌐 Reachability 30/30
⚡ Speed 10/20
🔒 Security 15/15
🛠 Developer XP 17/20
✓ Reliability 10/15

Partially tested on Apr 5, 2026

Technical Specifications

Auth API Key
HTTPS REQUIRED
CORS YES
Category Food & Drink
Difficulty Intermediate
Verified: 2026-04-04

Similar APIs

View All →