# TheMealDB Recipe Scraper — Ingredients & Instructions (`haketa/themealdb-recipe-scraper`) Actor

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.

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

## Pricing

from $2.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.
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?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## TheMealDB Recipe Scraper — Ingredients & Instructions

Pull **recipes with full details** — search by name, or grab every meal in a **category, cuisine or ingredient** — as clean JSON/CSV/Excel. Each recipe comes with its **ingredients + measures, step-by-step instructions, category, cuisine, image, tags, YouTube video and source link**.

Powered by **TheMealDB**. **Keyless**, no anti-bot — built for food & recipe apps, meal planners, diet tools and content.

***

### What this Actor does

Give it any mix of inputs and it returns full recipes:

- **Search by name** — e.g. `arrabiata`, `beef wellington`, `pancakes` — with complete details.
- **By category** — pull every meal in `Dessert`, `Seafood`, `Vegetarian`, `Beef`, `Pasta`…
- **By cuisine (area)** — every meal from `Italian`, `Turkish`, `Mexican`, `Japanese`, `Indian`…
- **By ingredient** — every meal that uses `chicken_breast`, `salmon`, `garlic`…

For category/cuisine/ingredient results, it automatically fetches each meal's **full details** (ingredients, measures, instructions) — or you can switch to a fast, light list.

***

### Why use it

- **Complete recipes, structured.** Ingredients paired with measures, full instructions, image and video — ready for an app or a dataset.
- **Four ways in.** Name search, category, cuisine or ingredient — build exactly the recipe set you want.
- **Keyless and clean.** No API key, no anti-bot, no scraping headaches — fast and reliable.
- **Media included.** Every recipe has a dish image, and most have a YouTube tutorial link.
- **Great for apps & content.** Meal planners, diet/nutrition tools, recipe blogs, chatbots and RAG pipelines.

***

### Who it's for

- **Food & recipe app developers** needing a structured recipe source.
- **Meal-planning & diet tools** building menus by cuisine, category or ingredient.
- **Content creators & bloggers** assembling recipe collections.
- **AI builders** feeding recipes into cooking assistants and RAG.

***

### Quick start

#### Run it in the console (no code)

1. Fill any of the fields:

   ```
   Meal names:  arrabiata, pancakes
   Categories:  Seafood, Dessert
   Cuisines:    Italian, Turkish
   Ingredients: salmon
   ```

2. Keep **Include full details** on for complete recipes.

3. Click **Start**, then export as **JSON, CSV, Excel or HTML**.

Leave everything empty for a **demo**.

#### Run it via API (Python)

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")

run_input = {
    "areas": ["Italian", "Turkish"],
    "categories": ["Dessert"],
    "includeDetails": True,
}

run = client.actor("YOUR_USERNAME/themealdb-recipe-scraper").call(run_input=run_input)

for r in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(f"{r['title']} ({r['area']}, {r['category']}) — {r['ingredientCount']} ingredients")
```

#### Run it via API (JavaScript)

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

const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });

const run = await client.actor('YOUR_USERNAME/themealdb-recipe-scraper').call({
    mealNames: ['arrabiata'],
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((r) => console.log(`${r.title}: ${r.ingredients}`));
```

***

### Input

| Field | Type | Description |
|---|---|---|
| **Meal names (search)** | array | Recipe name searches, full details. Empty-all = demo. |
| **Categories** | array | `Seafood`, `Dessert`, `Vegetarian`, `Beef`, `Chicken`, `Pasta`, `Lamb`… |
| **Cuisines (areas)** | array | `Italian`, `Turkish`, `Mexican`, `Japanese`, `Indian`, `Chinese`… |
| **Ingredients** | array | `chicken_breast`, `salmon`, `garlic` (underscores for spaces). |
| **Include full details** | boolean | Fetch each meal's full recipe for category/cuisine/ingredient results. Default on. |
| **Max recipes per query** | integer | Cap per query. Default 100. |
| **Speed (parallel queries)** | integer | Queries at once. Default 4. |
| **Proxy configuration** | object | Apify Proxy. On by default. |

***

### Output

One record per recipe:

```json
{
  "source": "Turkish",
  "sourceType": "area",
  "idMeal": "52977",
  "title": "Corba",
  "category": "Side",
  "area": "Turkish",
  "ingredients": "Lentils: 1 cup; Onion: 1 large; Carrot: 1; ...",
  "ingredientCount": "13",
  "instructions": "Pick through your lentils for any foreign debris...",
  "tags": "Soup",
  "thumbnail": "https://www.themealdb.com/images/media/meals/xxxx.jpg",
  "youtube": "https://www.youtube.com/watch?v=xxxx",
  "sourceUrl": "https://www.themealdb.com/...",
  "scrapedAt": "2026-10-10T12:00:00.000Z"
}
```

| Field | Description |
|---|---|
| `source` / `sourceType` | The query value and how it was searched (`name`/`category`/`area`/`ingredient`). |
| `title` / `category` / `area` | Recipe name, category and cuisine. |
| `ingredients` / `ingredientCount` | Ingredients paired with measures, and how many. |
| `instructions` | Full cooking steps. |
| `tags` | Recipe tags. |
| `thumbnail` | Dish image URL. |
| `youtube` | Video tutorial link (when available). |
| `sourceUrl` | Original recipe source. |
| `scrapedAt` | ISO timestamp. |

***

### Tips & notes

- **Combine inputs.** Mix names, categories, cuisines and ingredients in one run to build a themed recipe set.
- **Fast list mode.** Turn **Include full details** off to get a quick id/title/image list (useful for building a picker, then enriching later).
- **Ingredients for spaces.** Use underscores in ingredient names (`chicken_breast`).
- **Dedupe.** The same meal can appear via multiple queries — dedupe on `idMeal` if needed.

***

### Frequently asked questions

**Do I need an API key?**
No — it uses TheMealDB's public endpoints.

**Can I get all meals from a cuisine or category?**
Yes — add them to **Cuisines** or **Categories**; with **Include full details** on, each meal comes back complete.

**Are measures included with ingredients?**
Yes — each ingredient is paired with its measure (e.g. `Lentils: 1 cup`).

**Is there an image and video?**
Every recipe has an image; most have a YouTube link.

**Good for a cooking app or AI assistant?**
Yes — clean, structured recipes with ingredients and steps are ideal for apps, meal planners and RAG.

***

### Export & integrate

Results are available as **JSON, CSV, Excel, HTML** and via the **Apify API**. Push to **Google Sheets**, a **webhook**, **Make**, **Zapier** or your database.

*Data from TheMealDB.*

# Actor input Schema

## `mealNames` (type: `array`):

Search recipes by name — one per line, e.g. `arrabiata`, `pancakes`, `beef wellington`. Returns full recipe details. Leave all fields empty for a demo.

## `categories` (type: `array`):

Pull all meals in a category — e.g. `Seafood`, `Dessert`, `Vegetarian`, `Beef`, `Chicken`, `Pasta`. One per line.

## `areas` (type: `array`):

Pull all meals from a cuisine — e.g. `Italian`, `Turkish`, `Mexican`, `Japanese`, `Indian`. One per line.

## `ingredients` (type: `array`):

Pull all meals that use an ingredient — e.g. `chicken_breast`, `salmon`, `garlic`. One per line (use underscores for spaces).

## `includeDetails` (type: `boolean`):

For category/cuisine/ingredient results, fetch each meal's full details (ingredients, instructions, etc.). Turn off for a faster, lighter list (id, title, image only).

## `maxItemsPerQuery` (type: `integer`):

How many recipes to keep per query.

## `maxConcurrency` (type: `integer`):

How many queries at once.

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

Apify Proxy. On by default.

## Actor input object example

```json
{
  "mealNames": [
    "arrabiata",
    "pancakes"
  ],
  "categories": [],
  "areas": [],
  "ingredients": [],
  "includeDetails": true,
  "maxItemsPerQuery": 100,
  "maxConcurrency": 4,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `source` (type: `string`):

Query value

## `sourceType` (type: `string`):

name/category/area/ingredient

## `idMeal` (type: `string`):

Meal ID

## `title` (type: `string`):

Meal name

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

Category

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

Cuisine/area

## `ingredients` (type: `string`):

Ingredients + measures

## `ingredientCount` (type: `string`):

Ingredient count

## `instructions` (type: `string`):

Cooking steps

## `tags` (type: `string`):

Tags

## `thumbnail` (type: `string`):

Image URL

## `youtube` (type: `string`):

Video URL

## `sourceUrl` (type: `string`):

Original recipe URL

## `scrapedAt` (type: `string`):

Timestamp

# 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 = {
    "mealNames": [
        "arrabiata",
        "pancakes"
    ],
    "categories": [],
    "areas": [],
    "ingredients": [],
    "maxItemsPerQuery": 100,
    "maxConcurrency": 4
};

// Run the Actor and wait for it to finish
const run = await client.actor("haketa/themealdb-recipe-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 = {
    "mealNames": [
        "arrabiata",
        "pancakes",
    ],
    "categories": [],
    "areas": [],
    "ingredients": [],
    "maxItemsPerQuery": 100,
    "maxConcurrency": 4,
}

# Run the Actor and wait for it to finish
run = client.actor("haketa/themealdb-recipe-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 '{
  "mealNames": [
    "arrabiata",
    "pancakes"
  ],
  "categories": [],
  "areas": [],
  "ingredients": [],
  "maxItemsPerQuery": 100,
  "maxConcurrency": 4
}' |
apify call haketa/themealdb-recipe-scraper --silent --output-dataset

```

## MCP server setup

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