TheMealDB Recipe Scraper — Ingredients & Instructions avatar

TheMealDB Recipe Scraper — Ingredients & Instructions

Pricing

from $2.00 / 1,000 results

Go to Apify Store
TheMealDB Recipe Scraper — Ingredients & Instructions

TheMealDB Recipe Scraper — Ingredients & Instructions

Search recipes by name, or pull meals by category, cuisine or ingredient, with full ingredients + measures, step-by-step instructions, image, tags, YouTube and source. Powered by TheMealDB. Keyless, no anti-bot.

Pricing

from $2.00 / 1,000 results

Rating

0.0

(0)

Developer

Haketa

Haketa

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

7 days ago

Last modified

Features

Limited permissions

Share

TheMealDB Recipe Scraper — Ingredients, Instructions, Cuisine & Video

Apify Actor TheMealDB Data Format Scale Pricing

Extract clean, structured culinary recipes from TheMealDB at scale. Search meals by name, or pull complete recipe collections by category, cuisine (area), or ingredient. Every recipe comes enriched with paired ingredients and exact measurements, step-by-step cooking instructions, category, cuisine origin, dish photographs, tags, YouTube video tutorials, and verified source links. No login, no API keys, and no anti-bot headaches.

Export recipe datasets directly to JSON, CSV, Excel, or API.

Built for food & recipe application developers, meal-planning and diet platforms, grocery delivery apps, recipe bloggers, and AI engineers feeding culinary assistants and cooking RAG pipelines.


⚡ At a glance

FeatureSpecification
Target DatabaseTheMealDB (themealdb.com) — Comprehensive Global Recipe Database
Search CapabilitiesSearch by meal name, category filter, cuisine/area filter, ingredient filter
Culinary DetailsIngredients paired with measures, step-by-step instructions, total counts
Media & ProvenanceHigh-res dish photographs, YouTube tutorial links, original recipe URLs
Enrichment ModeAutomatic full recipe lookup for category, cuisine, and ingredient filters
Scale & PaginationMulti-category / multi-cuisine fan-out (1,000+ recipes, 0 = unlimited)
Speed & ConcurrencyConfigurable parallel queries (default 4, up to 20 workers)
Output FormatsJSON, CSV, XML, Excel (XLSX), HTML Table, Apify Dataset API
IntegrationsPython SDK, Node.js SDK, REST API, Webhooks, Zapier, Make

🔎 Why scrape TheMealDB?

TheMealDB is an open culinary registry containing hundreds of traditional and contemporary dishes across 14 food categories and dozens of world cuisines (Italian, Turkish, Mexican, Japanese, Indian, British, French, Chinese, and more). Every meal entry contains rich attributes: paired ingredients and measures, detailed instructions, high-resolution food imagery, video cooking demonstrations, and category taxonomies.

For developers and culinary businesses, assembling recipe databases manually or writing custom web scrapers is notoriously time-consuming:

  • Complex Schema Normalization: Raw API endpoints spread ingredient and measurement pairs across 40 disparate keys (strIngredient1..20 and strMeasure1..20). This scraper cleanly unifies them into single, human-readable strings like Olive Oil: 2 tbsp; Garlic: 3 cloves.
  • Automated Detail Enrichment: Standard category and cuisine filter endpoints return only basic IDs and titles. This actor automatically performs secondary lookups to fetch complete preparation steps and ingredient lists for every meal.
  • RAG & Culinary Chatbot Seeding: AI models require structured, high-quality cooking instructions to provide accurate recipe recommendations and cooking guidance.
  • "What Can I Cook?" Applications: By scraping recipes keyed by individual ingredients, developers build reverse-recipe generators based on pantry inventory.

✨ Key Features & Capabilities

  • ✅ Four Search Modalities — mix and match meal name searches, category sweeps, cuisine filters, and ingredient queries in one run.
  • ✅ Normalized Ingredients & Measures — combines messy multi-column ingredient tables into clean, semicolon-separated lists with exact quantities.
  • ✅ Deep Automated Enrichment — automatically pulls full preparation instructions, ingredients, tags, and media for filtered searches.
  • ✅ Media & Tutorial Links — captures high-definition meal thumbnails and verified YouTube tutorial video URLs.
  • ✅ Culinary Provenance — includes source URLs, categories, and regional origin (area / country) for authentic attribution.
  • ✅ Stable Deduplication — outputs the unique idMeal key so overlapping category and ingredient queries deduplicate cleanly.
  • ✅ Unlimited 1,000+ Deep Scalability — set maxItemsPerQuery: 0 for unlimited match retention; sweep all 14 categories in a single run.
  • ✅ Fast Prefill Performance — default prefill runs are optimized to finish in seconds for rapid verification.

🎯 Use cases

1. Recipe & Meal-Planning Mobile Apps

Seed your food application with hundreds of tested recipes across dietary preferences (Vegetarian, Vegan, Seafood, Pasta, Dessert). Enable users to filter by cuisine and preparation complexity.

2. Shoppable Recipes for Online Supermarkets

E-commerce grocery stores and delivery platforms link recipe ingredient lists directly to shoppable grocery carts, increasing basket sizes and simplifying dinner preparation for shoppers.

3. Cooking Chatbots & AI Recipe Agents

Large Language Models (LLMs) frequently hallucinate cooking temperatures and ingredient ratios. Feed verified TheMealDB datasets into RAG vector databases to ground your cooking assistant in factual recipes.

4. Food Blogs & Editorial Aggregators

Food bloggers and media publishers curate themed collections (e.g., "Top 20 Authentic Italian Pasta Dishes" or "Quick Weeknight Chicken Dinners") with high-resolution imagery and video tutorials.


📥 Input Parameters

Provide meal names, categories, cuisines, or ingredients. Running with default settings executes a fast demo on a classic pasta dish.

FieldTypeDescriptionDefaultPrefill
mealNamesArrayRecipe name searches (e.g. arrabiata, pancakes, beef wellington).[]["arrabiata", "pancakes", "beef wellington"]
categoriesArrayFood category sweeps (e.g. Seafood, Dessert, Vegetarian, Chicken, Pasta).[][]
areasArrayRegional cuisines (e.g. Italian, Turkish, Mexican, Japanese, Indian).[][]
ingredientsArrayPrimary ingredients (e.g. chicken_breast, salmon, garlic).[][]
includeDetailsBooleanFetch complete instructions and ingredients for category/cuisine searches.truetrue
maxItemsPerQueryIntegerMax recipes per query. Set to 0 for unlimited retrieval.0100
maxConcurrencyIntegerParallel query workers dispatched simultaneously.44
proxyConfigurationObjectApify Proxy configuration for fast, uninterrupted scraping.{ "useApifyProxy": true }{ "useApifyProxy": true }

Example Input Configuration

{
"mealNames": [
"arrabiata",
"beef wellington"
],
"categories": [
"Dessert",
"Seafood",
"Vegetarian"
],
"areas": [
"Italian",
"Mexican"
],
"ingredients": [
"salmon"
],
"includeDetails": true,
"maxItemsPerQuery": 50,
"maxConcurrency": 4,
"proxyConfiguration": { "useApifyProxy": true }
}

📤 Output Dataset & Field Specification

Each dataset item represents a unique culinary recipe. All ingredient/measurement pairs and preparation steps are cleaned and normalized.

Real Output Sample

{
"source": "arrabiata",
"sourceType": "name",
"idMeal": "52771",
"title": "Spicy Arrabiata Penne",
"category": "Vegetarian",
"area": "Italian",
"country": "Italy",
"instructions": "Bring a large pot of water to a boil. Add kosher salt to the boiling water, then add the pasta. Cook according to package instructions. In a large skillet over medium heat, add the olive oil and heat until shimmering. Add the chopped garlic and red pepper flakes and cook until fragrant...",
"ingredients": "penne rigate: 1 pound; olive oil: 1/4 cup; garlic: 3 cloves; chopped tomatoes: 1 tin; red chile flakes: 1/2 teaspoon; italian seasoning: 1/2 teaspoon; basil: 6 leaves; parmigiano-reggiano: spinkling",
"ingredientCount": "8",
"tags": "Pasta,Curry",
"thumbnail": "https://www.themealdb.com/images/media/meals/ustsqw1468250014.jpg",
"youtube": "https://www.youtube.com/watch?v=1IszT_guI08",
"sourceUrl": "https://www.foodnetwork.com/recipes/rachael-ray/spicy-arrabiata-penne-recipe-1941656",
"scrapedAt": "2026-11-10T16:44:00.000Z"
}

Field Breakdown & Data Coverage

🍳 Recipe Identification & Metadata
FieldTypeDescriptionCoverage
idMealStringUnique TheMealDB meal identifier (ideal for deduplication).🟢 High (100%)
titleStringDish name / recipe title.🟢 High (100%)
categoryStringCulinary category (Beef, Seafood, Dessert, Vegetarian).🟢 High (100%)
areaStringRegional cuisine demonym (e.g. Italian, Turkish, Mexican).🟢 High (80%)
countryStringCountry associated with the cuisine origin.🟢 High (100%)
tagsStringDescriptive recipe tags (e.g. Pasta, Meat, Baking).🟡 Conditional (30%)
🔪 Ingredients & Preparation
FieldTypeDescriptionCoverage
ingredientsStringAll ingredients paired with measures, semicolon-separated.🟢 High (100%)
ingredientCountStringTotal count of distinct ingredients in the recipe.🟢 High (100%)
instructionsStringFull step-by-step preparation and cooking instructions.🟢 High (100%)
📸 Media & Provenance
FieldTypeDescriptionCoverage
thumbnailStringHigh-resolution dish photograph URL.🟢 High (100%)
youtubeStringYouTube video tutorial link.🟢 High (75%)
sourceUrlStringLink to original publishing website or blog.🟢 High (95%)
sourceStringQuery value that retrieved this meal.🟢 High (100%)
sourceTypeStringMethod used (name, category, area, ingredient).🟢 High (100%)
scrapedAtStringISO 8601 extraction timestamp.🟢 High (100%)

🔁 Pagination & Unlimited Scale

The TheMealDB Recipe Scraper provides seamless extraction across the entire culinary catalog:

  • 1,000+ Recipes via Multi-Query Sweeping: Supply multiple categories or cuisines simultaneously. The actor retrieves all matches and de-duplicates them on idMeal.
  • Zero Artificial Ceilings: Setting maxItemsPerQuery: 0 removes all per-query limits, allowing entire categories like Dessert or Seafood to be ingested in a single run.
  • Fast Prefill Performance: Default prefill runs are optimized to complete in under 10 seconds, enabling fast smoke tests.
  • Polite Concurrency Control: Configurable worker concurrency prevents server overload and ensures reliable execution.

💻 Integration & API Usage

Integrate recipe data into your software applications using Apify SDKs.

Python SDK Example

from apify_client import ApifyClient
client = ApifyClient("YOUR_APIFY_TOKEN")
run_input = {
"categories": ["Vegetarian", "Seafood"],
"includeDetails": True,
"maxItemsPerQuery": 20,
}
run = client.actor("haketa/themealdb-recipe-scraper").call(run_input=run_input)
for meal in client.dataset(run["defaultDatasetId"]).iterate_items():
print(f"{meal['title']} ({meal['category']}) - Ingredients: {meal['ingredientCount']}")

Node.js SDK Example

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });
const run = await client.actor('haketa/themealdb-recipe-scraper').call({
areas: ['Italian', 'Mexican'],
includeDetails: true,
maxItemsPerQuery: 25,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(`Scraped ${items.length} recipes:`, items);

cURL API Trigger

curl --request POST \
--url "https://api.apify.com/v2/acts/haketa~themealdb-recipe-scraper/runs?token=YOUR_APIFY_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"mealNames": ["arrabiata", "beef wellington"],
"includeDetails": true
}'

🛠️ Troubleshooting & Common Edge Cases

Issue / SymptomProbable CauseRecommended Resolution
Recipe name returns 0 resultsTypo or obscure recipe titleTry common keywords (e.g. curry, pie, cake, chicken) rather than long specific phrases.
Missing instructionsincludeDetails was toggled offEnsure includeDetails: true is enabled if you require full cooking steps for category/cuisine searches.
Ingredient searches failSpaces used instead of underscoresFormat ingredient tags with underscores for spaces (e.g. chicken_breast, not chicken breast).
Missing youtube or sourceUrlNot all community recipes include video tutorialsThese fields are data-dependent; filter for records where youtube != "" if videos are mandatory.
Incomplete instructions formattingRecipe submitted with unformatted raw textThe scraper strips extraneous whitespace and standardizes line breaks for clean ingestion.
Incomplete ingredient unitsMeasure specified as 'to taste' or 'pinch'Traditional recipes often use non-metric volume descriptions; exact strings are preserved as published.
Rate-limiting (HTTP 429)Concurrency set too highThe scraper includes built-in retries. Keep proxyConfiguration enabled to rotate IPs smoothly.

🔬 Data Processing & Analysis Examples

Filter Recipes by Ingredient Count with Pandas

import pandas as pd
# Load scraped recipes dataset
df = pd.read_csv("themealdb_recipes.csv")
# Convert ingredient count to numeric
df["ingredientCount"] = pd.to_numeric(df["ingredientCount"], errors="coerce")
# Filter for quick, simple recipes (<= 5 ingredients)
simple_meals = df[df["ingredientCount"] <= 5].sort_values(by="ingredientCount")
print(simple_meals[["title", "category", "area", "ingredientCount"]].head(10))

Quick CLI Extraction with jq

# Extract recipe titles and YouTube video tutorials
cat dataset.json | jq -r '.[] | select(.youtube != "") | "\(.title): \(.youtube)"'
# Group recipe counts by culinary category
cat dataset.json | jq -r '.[].category' | sort | uniq -c | sort -nr

Build a Vector Embeddings Corpus for AI Cooking Assistants

import json
# Transform scraped recipe JSON into chunked documents for vector databases (ChromaDB / Pinecone)
with open("recipes.json") as f:
recipes = json.load(f)
documents = []
for r in recipes:
content = f"Title: {r['title']}\nCategory: {r['category']}\nCuisine: {r['area']}\nIngredients:\n{r['ingredients']}\nInstructions:\n{r['instructions']}"
documents.append({
"id": r["idMeal"],
"text": content,
"metadata": {"title": r["title"], "category": r["category"], "area": r["area"]}
})
print(f"Generated {len(documents)} structured RAG documents for indexing.")

💡 Best Practices & Pro Tips

  • 🍝 Deduplicate on idMeal: Because recipes can belong to both a category (Pasta) and a cuisine (Italian), always deduplicate on idMeal when aggregating multi-query datasets.
  • ⚡ Lightweight Extraction for Discovery: If you only need titles and photo thumbnails for a fast search index, set includeDetails: false. This skips secondary lookups and finishes in seconds.
  • 🏷️ Cuisine Demonyms: When querying by area, use regional demonyms like Italian, Turkish, Mexican, Indian, Japanese, and French.
  • 🥗 Clean Ingredients: Each ingredient in ingredients is paired with its measure and separated by semicolons, making it trivial to split and ingest into inventory systems.

❓ Frequently Asked Questions

Do I need a TheMealDB API key?
No. The scraper utilizes public endpoints with no API key or subscription required.

How many recipes can I extract in one run?
You can extract all available recipes in TheMealDB (~800+ meals) by supplying multiple categories or cuisines and setting maxItemsPerQuery: 0.

Can I search by multiple ingredients?
TheMealDB's ingredient filter searches by primary ingredient. To search multiple ingredients, list them in ingredients (e.g. chicken_breast, salmon, garlic) and the scraper will process each in turn.

Are full cooking steps included?
Yes. With includeDetails: true (default), the complete, unedited instructions are captured for every recipe.

Can I run this actor on an Apify schedule?
Yes. Configure an automated schedule in the Apify Console to periodically re-scrape categories and capture newly submitted community recipes.

How are ingredients and measures matched together?
TheMealDB stores up to 20 separate pairs of ingredients and measure fields (strIngredient1 through strIngredient20 and strMeasure1 through strMeasure20). The scraper matches each non-empty ingredient with its corresponding measure and formats them into a unified string.

Can I filter recipes by country of origin?
Yes. The country and area fields specify regional culinary origin (e.g., Italian, Mexican, British, Japanese). You can filter by these fields directly in your database or spreadsheet.

Are dessert and baking recipes included?
Yes. Categories include Dessert, Starter, Side, Breakfast, Pasta, and meat categories (Beef, Chicken, Pork, Lamb, Seafood, Vegetarian, Vegan).

What format are the cooking steps in?
Cooking instructions are provided as clean plain-text paragraphs with whitespace normalized and capped at 2,000 characters to prevent database overflow.


🔗 Complementary Data Scrapers


📋 Changelog

  • v1.2 (2026-11):
    • 🚀 Unlocked 1,000+ Deep Scalability: Enabled maxItemsPerQuery: 0 for unlimited recipe extraction across categories and cuisines.
    • ⚡ Optimized Prefill Execution: Prefill run updated to fast, popular dishes completing in <10 seconds.
    • 🧼 Clean Output Schema Compliance: Strict string-typed output schema for seamless CSV, Excel, and API consumption.
  • v1.1 (2026-08):
    • Added automatic full recipe enrichment for category, cuisine, and ingredient searches.
    • Unified 40 raw ingredient/measure keys into readable semicolon-separated pairs.
  • v1.0 (2026-05):
    • Initial release with meal name search, category sweeps, cuisine filtering, and YouTube video extraction.