# 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, 0 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/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).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": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,lulzasaur/themealdb-scraper"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/4n6vJ38AXifFh0euL/builds/s9q0bEkyVMkReJ5Ra/openapi.json
