# TheMealDB Recipes Scraper (`parseforge/themealdb-recipes-scraper`) Actor

Scrapes recipes from TheMealDB by search, category, area, ingredient, or random. Returns each recipe as a flat row with ingredients, instructions, image, and YouTube link.

- **URL**: https://apify.com/parseforge/themealdb-recipes-scraper.md
- **Developed by:** [ParseForge](https://apify.com/parseforge) (community)
- **Categories:** Education, Other, Automation
- **Stats:** 1 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $10.00 / 1,000 result items

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

[![ParseForge](https://raw.githubusercontent.com/ParseForge/apify-assets/main/banner.jpg)](https://apify.com/parseforge?fpr=vmoqkp)

### TheMealDB Recipes Scraper

**Scrape recipes from TheMealDB by name, category, cuisine, or ingredient, up to a million per run.** Every recipe comes with its ingredients, instructions, image, and YouTube link. No API key. Export to JSON, CSV, Excel, or XML.

TheMealDB is a free recipe database with over 600 meals from around the world. This Actor reads its public API directly, so you can search by recipe name, browse by category, area, or ingredient, or pull random meals without registering for a key. Each result is returned as one flat row with the full ingredient list, step-by-step instructions, and media links.

| Who uses it | What they scrape TheMealDB for |
|---|---|
| Food bloggers | Build a recipe index for their niche cuisine |
| Meal planning apps | Populate a database of recipes with ingredients and instructions |
| Data analysts | Study ingredient combinations across world cuisines |
| Chefs and cooking schools | Curate a teaching library of recipes by category |

### What it does

This Actor collects recipes from TheMealDB by search, category, area, ingredient, or random selection, and returns each recipe as one flat row.

- 🔍 **Search by name:** find recipes whose title matches your query, like `Arrabiata` or `Chicken`.
- 🗂️ **Browse by category:** get all recipes in a category such as `Seafood` or `Dessert`.
- 🌍 **Browse by area/cuisine:** filter by world cuisine like `Italian` or `Japanese`.
- 🥕 **Browse by ingredient:** list recipes that use a specific ingredient, e.g. `chicken_breast`.
- 🎲 **Random meals:** fetch random recipes for inspiration or sampling.
- 📋 **List metadata:** get all categories, areas, or ingredients available on TheMealDB.

Results export to CSV, JSON, Excel, or XML, or straight from the API.

### What you can do with TheMealDB data

**📚 Build a recipe database.**

A food startup runs the Actor in `allMeals` mode to collect the full TheMealDB catalog and seed their app's recipe search.

**🌍 Analyze world cuisines.**

A data analyst uses `byArea` mode to pull all Italian recipes and compare ingredient frequencies against Japanese recipes.

**🥗 Plan weekly menus.**

A meal planning service uses `byIngredient` mode to find recipes that use ingredients their users already have.

**🎲 Generate recipe ideas.**

A cooking blog runs `random` mode daily to feature a surprise recipe and keep content fresh.

### Why choose this scraper

|  | What you get |
|---|---|
| **No API key** | TheMealDB's public API is free and open, so you can start scraping immediately. |
| **Full recipe data** | Each row includes the ingredient list with measures, step-by-step instructions, image URL, and YouTube link. |
| **Flexible modes** | Search, browse, or randomize to fit your data collection needs. |
| **Scalable** | Collect up to 1,000,000 recipes in a single run. |

### How it compares

This Actor covers all TheMealDB modes and returns complete recipe data, while competitors vary in their focus.

| Feature | ParseForge | Themealdb Recipe Scraper | TheMealDB Recipe Database - Data Scraper | TheMealDB Recipe Scraper |
|---|---|---|---|---|
| Search by recipe name | Yes | Yes | Yes | Yes |
| Browse by category | Yes | Yes | Not listed | Yes |
| Browse by area/cuisine | Yes | Yes | Not listed | Yes |
| Browse by ingredient | Yes | Not listed | Not listed | Yes |
| Random meals | Yes | Yes | Not listed | Not listed |
| List categories/areas/ingredients | Yes | Yes | Not listed | Not listed |
| Full ingredient list with measures | Yes | Yes | Yes | Yes |
| Step-by-step instructions | Yes | Yes | Yes | Yes |
| YouTube link | Yes | Yes | Not listed | Not listed |
| No API key required | Yes | Not listed | Not listed | Yes |

### Configure the run

Drive the Actor from a search term, a category, an area, or an ingredient, and set a maximum number of recipes to collect per run. The Input tab lists every parameter.

A first run with the defaults:

```json
{
  "maxItems": 10,
  "mode": "byCategory",
  "query": "Chicken"
}
```

A larger pull:

```json
{
  "maxItems": 200,
  "mode": "byCategory",
  "query": "Chicken"
}
```

### Pricing

Pay-per-result: **$0.01333 per result** collected. You pay only for the results written to your dataset.

| Results collected | Approximate cost |
|---|---|
| 100 results | $1.33 |
| 1,000 results | $13.33 |
| 10,000 results | $133.30 |

New Apify accounts start with $5 in free credit.

### Free users

Free-plan runs return up to 10 results as a preview. [Upgrade your Apify plan](https://console.apify.com/sign-up?fpr=vmoqkp) to collect up to 1,000,000 results per run.

### Run it

1. [Create a free Apify account with $5 in credit](https://console.apify.com/sign-up?fpr=vmoqkp).
2. Open the [TheMealDB Recipes Scraper](https://apify.com/parseforge/themealdb-recipes-scraper?fpr=vmoqkp).
3. Set your inputs and any filters, then click **Start**.
4. Export the results as CSV, Excel, JSON, or XML from the **Dataset** tab.

Run it programmatically through the [Apify API](https://docs.apify.com/api/v2) (`run-sync-get-dataset-items`) or the [ApifyClient](https://docs.apify.com/api/client/js) for JavaScript and Python.

### Use with AI agents (MCP)

Give an AI agent live access to TheMealDB through the Model Context Protocol. Add the Actor to Claude, Cursor, or any MCP client:

```bash
claude mcp add --transport http apify "https://mcp.apify.com/?tools=parseforge/themealdb-recipes-scraper"
```

Then prompt it in plain language to run the scraper and read back the results.

### Troubleshooting

**Why am I getting no results?**

Check your query. For search mode, try a simpler term like `Chicken`. For browse modes, use exact values from the list modes, e.g. `Italian` for area or `Seafood` for category.

**Why did the run stop before reaching maxItems?**

TheMealDB may not have enough recipes matching your filter. Try a broader category or search term, or use `allMeals` mode to get the full catalog.

**Why are some fields empty?**

Not all recipes have a YouTube link or image. TheMealDB data is community-sourced, so some fields may be missing for certain recipes.

**Can I get more than 600 recipes?**

TheMealDB currently has around 600 recipes. If you need more, consider combining with other recipe sources or waiting for database updates.

### FAQ

| Question | Answer |
|---|---|
| Do I need an API key to scrape TheMealDB? | No. TheMealDB offers a free public API, and this Actor uses it directly without any registration or key. |
| How many recipes can I scrape in one run? | You can set `maxItems` up to 1,000,000. The full TheMealDB catalog is around 600 recipes, so one run can collect everything. |
| What data does each recipe include? | Each recipe row includes the name, category, area, instructions, ingredient list with measures, image URL, and YouTube link if available. |
| Can I search by ingredient? | Yes. Use `byIngredient` mode and provide the ingredient name, like `chicken_breast`. The Actor returns all recipes that use it. |
| What is the difference between search and browse modes? | Search mode looks for recipes by name. Browse modes filter by category, area, or ingredient. Random mode returns random recipes. |
| Can I list all categories or areas? | Yes. Use `categoriesList`, `areasList`, or `ingredientsList` modes to get the available filter values. |
| What output formats are supported? | The Actor exports to JSON, CSV, Excel, and XML, so you can use the data in any tool. |
| Is the data from TheMealDB reliable? | TheMealDB is a community-maintained database. Recipes are generally accurate, but always verify before publishing. |
| Can I schedule this Actor to run regularly? | Yes. On Apify, you can schedule runs daily, weekly, or at any interval to keep your recipe data fresh. |
| Does this Actor scrape the website or use the API? | It uses TheMealDB's official public JSON API, which is faster and more reliable than scraping HTML. |

### Related actors

Browse the full [ParseForge collection](https://apify.com/parseforge?fpr=vmoqkp) for more scrapers.

🆘 **Need help?** Email parseforge@protonmail.com with your run ID, your input, and what you expected.

⚠️ **Disclaimer.** This Actor is unofficial and is not affiliated with, endorsed by, or sponsored by TheMealDB. It collects only publicly available data. You are responsible for using the collected data in compliance with the source's terms of service and applicable data-protection laws, including GDPR, CCPA, and PIPL. Do not use it to collect personal data unlawfully.

# Actor input Schema

## `maxItems` (type: `integer`):

How many recipes to collect per run.

## `mode` (type: `string`):

search by name, byCategory/byArea/byIngredient, random, or list (categories/areas/ingredients).

## `query` (type: `string`):

Search term (search mode) or filter value (byCategory/byArea/byIngredient). Examples: `Arrabiata` (search), `Seafood` (category), `Italian` (area), `chicken_breast` (ingredient).

## Actor input object example

```json
{
  "maxItems": 10,
  "mode": "byCategory",
  "query": "Chicken"
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

# 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 = {
    "maxItems": 10,
    "mode": "byCategory",
    "query": "Chicken"
};

// Run the Actor and wait for it to finish
const run = await client.actor("parseforge/themealdb-recipes-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 = {
    "maxItems": 10,
    "mode": "byCategory",
    "query": "Chicken",
}

# Run the Actor and wait for it to finish
run = client.actor("parseforge/themealdb-recipes-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 '{
  "maxItems": 10,
  "mode": "byCategory",
  "query": "Chicken"
}' |
apify call parseforge/themealdb-recipes-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,parseforge/themealdb-recipes-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/eJT2rGC8uv6zkrDeJ/builds/jnQqnVs9fprVL0CyG/openapi.json
