# TheMealDB Recipe Scraper (`lulzasaur/themealdb-scraper`) Actor

Scrape meal recipes from TheMealDB. Search by name, filter by category (Beef, Chicken, Seafood, etc.) or cuisine (Italian, Mexican, Indian, etc.). Get ingredients, instructions, images, and YouTube links.

- **URL**: https://apify.com/lulzasaur/themealdb-scraper.md
- **Developed by:** [lulz bot](https://apify.com/lulzasaur) (community)
- **Categories:** E-commerce
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $10.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## TheMealDB Recipe Scraper

Scrape meal recipes from [TheMealDB](https://www.themealdb.com/) — a free, open database of recipes from around the world.

### What does TheMealDB Scraper do?

This scraper extracts detailed recipe information from TheMealDB, including:

- **Meal name and ID**
- **Category** (Beef, Chicken, Dessert, Seafood, Pasta, Vegan, etc.)
- **Cuisine/Area** (Italian, Mexican, Indian, Japanese, French, etc.)
- **Full cooking instructions**
- **Ingredients list** with measurements (parsed into clean arrays)
- **Image URL** for the meal
- **Tags** (e.g. Meat, Casserole, Curry)
- **YouTube video link** for cooking tutorials
- **Source URL** for the original recipe

### How to search

You can search in three ways:

#### 1. Search by meal name
Enter one or more search queries like "chicken", "pasta", "cake". The scraper will find all meals matching each query.

#### 2. Filter by category
Select a food category to get all meals in that group:
Beef, Chicken, Dessert, Lamb, Miscellaneous, Pasta, Pork, Seafood, Side, Starter, Vegan, Vegetarian, Breakfast, Goat

#### 3. Filter by cuisine/area
Select a cuisine to get all meals from that region:
American, Italian, Mexican, Indian, Japanese, French, Chinese, Thai, British, Greek, and 27 more.

### Input example

```json
{
    "searchQueries": ["pasta", "risotto"],
    "maxListings": 20
}
````

Or filter by category:

```json
{
    "category": "Seafood",
    "maxListings": 30
}
```

Or filter by cuisine:

```json
{
    "area": "Italian",
    "maxListings": 25
}
```

### Output example

```json
{
    "mealName": "Teriyaki Chicken Casserole",
    "mealId": "52772",
    "category": "Chicken",
    "area": "Japanese",
    "instructions": "Preheat oven to 350 F. Spray a 9x13-inch baking pan...",
    "ingredients": [
        { "ingredient": "soy sauce", "measure": "3/4 cup" },
        { "ingredient": "water", "measure": "1/2 cup" },
        { "ingredient": "brown sugar", "measure": "1/4 cup" },
        { "ingredient": "ground ginger", "measure": "1/2 teaspoon" },
        { "ingredient": "chicken breasts", "measure": "2" }
    ],
    "imageUrl": "https://www.themealdb.com/images/media/meals/wvpsxx1468256321.jpg",
    "tags": ["Meat", "Casserole"],
    "youtubeUrl": "https://www.youtube.com/watch?v=4aZr5hZXP_s",
    "sourceUrl": null,
    "scrapedAt": "2026-04-26T12:00:00.000Z"
}
```

### Use cases

- **Recipe apps** — Build a meal planning or recipe search app
- **Meal prep tools** — Aggregate recipes by category or cuisine for weekly meal plans
- **Nutrition research** — Analyze ingredients across different cuisines
- **Food blogs** — Source recipe data for content creation
- **Grocery list generators** — Extract ingredient lists to build shopping lists
- **Cooking education** — Collect recipes with video tutorials for learning platforms

### Cost

This scraper uses pay-per-event pricing. You are charged $0.005 per recipe result returned. There are no platform fees beyond the per-result charge.

| Results | Cost |
|---------|------|
| 50 | $0.25 |
| 200 | $1.00 |
| 500 | $2.50 |

### Limitations

- TheMealDB's free tier API (key "1") is used. Data is sourced from the TheMealDB community database.
- The database contains a curated set of recipes (300+). Not all possible meals are available.
- Search is by meal name substring match. Ingredient-based search is not supported in this scraper.

### Integrations

Connect TheMealDB Scraper to any workflow with [Apify integrations](https://apify.com/integrations). Export to Google Sheets, Slack, Zapier, Make, GitHub, and more.

# Actor input Schema

## `searchQueries` (type: `array`):

Search meals by name. Each query searches for matching meal names (e.g. 'chicken', 'pasta', 'cake').

## `category` (type: `string`):

Filter meals by category. Leave empty to use search queries instead.

## `area` (type: `string`):

Filter meals by cuisine/area. Leave empty to use search queries instead.

## `maxListings` (type: `integer`):

Maximum number of meal recipes to return.

## `proxyConfiguration` (type: `object`):

Optional proxy to use for API requests.

## Actor input object example

```json
{
  "searchQueries": [
    "chicken"
  ],
  "category": "",
  "area": "",
  "maxListings": 50
}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("lulzasaur/themealdb-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("lulzasaur/themealdb-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call lulzasaur/themealdb-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=lulzasaur/themealdb-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "TheMealDB Recipe Scraper",
        "description": "Scrape meal recipes from TheMealDB. Search by name, filter by category (Beef, Chicken, Seafood, etc.) or cuisine (Italian, Mexican, Indian, etc.). Get ingredients, instructions, images, and YouTube links.",
        "version": "1.0",
        "x-build-id": "s9q0bEkyVMkReJ5Ra"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/lulzasaur~themealdb-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-lulzasaur-themealdb-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/lulzasaur~themealdb-scraper/runs": {
            "post": {
                "operationId": "runs-sync-lulzasaur-themealdb-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/lulzasaur~themealdb-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-lulzasaur-themealdb-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "searchQueries": {
                        "title": "Search Queries",
                        "type": "array",
                        "description": "Search meals by name. Each query searches for matching meal names (e.g. 'chicken', 'pasta', 'cake').",
                        "items": {
                            "type": "string"
                        },
                        "default": [
                            "chicken"
                        ]
                    },
                    "category": {
                        "title": "Category",
                        "enum": [
                            "",
                            "Beef",
                            "Chicken",
                            "Dessert",
                            "Lamb",
                            "Miscellaneous",
                            "Pasta",
                            "Pork",
                            "Seafood",
                            "Side",
                            "Starter",
                            "Vegan",
                            "Vegetarian",
                            "Breakfast",
                            "Goat"
                        ],
                        "type": "string",
                        "description": "Filter meals by category. Leave empty to use search queries instead.",
                        "default": ""
                    },
                    "area": {
                        "title": "Cuisine / Area",
                        "enum": [
                            "",
                            "Algerian",
                            "American",
                            "Argentinian",
                            "Australian",
                            "British",
                            "Canadian",
                            "Chinese",
                            "Croatian",
                            "Dutch",
                            "Egyptian",
                            "Filipino",
                            "French",
                            "Greek",
                            "Indian",
                            "Irish",
                            "Italian",
                            "Jamaican",
                            "Japanese",
                            "Kenyan",
                            "Malaysian",
                            "Mexican",
                            "Moroccan",
                            "Norwegian",
                            "Polish",
                            "Portuguese",
                            "Russian",
                            "Saudi Arabian",
                            "Slovakian",
                            "Spanish",
                            "Syrian",
                            "Thai",
                            "Tunisian",
                            "Turkish",
                            "Ukrainian",
                            "Uruguayan",
                            "Venezulan",
                            "Vietnamese"
                        ],
                        "type": "string",
                        "description": "Filter meals by cuisine/area. Leave empty to use search queries instead.",
                        "default": ""
                    },
                    "maxListings": {
                        "title": "Max Listings",
                        "minimum": 1,
                        "maximum": 500,
                        "type": "integer",
                        "description": "Maximum number of meal recipes to return.",
                        "default": 50
                    },
                    "proxyConfiguration": {
                        "title": "Proxy configuration",
                        "type": "object",
                        "description": "Optional proxy to use for API requests."
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
