# MealDB Scraper - Food Recipes & Ingredients (`lulzasaur/mealdb-scraper`) Actor

Scrape meal recipes from TheMealDB. Search by name, browse by category or cuisine. Get ingredients, instructions, images, and YouTube links.

- **URL**: https://apify.com/lulzasaur/mealdb-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/platform/actors/running/actors-in-store#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

## MealDB Scraper - Food Recipes & Ingredients

Scrape meal recipes from TheMealDB. Search by name, browse by category or cuisine. Get full ingredient lists with measures, cooking instructions, images, and YouTube video links.

### Features

- **Search by name**: Find meals by name (e.g. "chicken", "pasta", "curry")
- **Browse by category**: Get all meals in a category (Beef, Seafood, Dessert, Vegan, etc.)
- **Browse by area/cuisine**: Get all meals from a cuisine (Italian, Japanese, Mexican, Indian, etc.)
- **Random mode**: Fetch a batch of random unique meals for discovery
- **Full details**: Every result includes complete ingredient list with measures
- **Fast**: Direct JSON API calls, no browser needed

### Output Fields

| Field | Description |
|-------|-------------|
| `id` | MealDB meal ID |
| `name` | Meal name |
| `category` | Category (Beef, Chicken, Seafood, Dessert, etc.) |
| `area` | Cuisine/area (Italian, Japanese, Mexican, etc.) |
| `instructions` | Step-by-step cooking instructions |
| `ingredients` | Array of {ingredient, measure} objects |
| `imageUrl` | Meal thumbnail image URL |
| `youtubeUrl` | YouTube recipe video URL |
| `source` | Original recipe source URL |
| `tags` | Comma-separated tags |
| `scrapedAt` | ISO timestamp |

### Input Options

- **Mode**: `search` (by name), `category` (by category), `area` (by cuisine), or `random`
- **Search Query**: Meal name to search for
- **Category**: Beef, Breakfast, Chicken, Dessert, Goat, Lamb, Pasta, Pork, Seafood, Side, Starter, Vegan, Vegetarian
- **Area**: American, British, Chinese, French, Indian, Italian, Japanese, Mexican, Thai, and more
- **Limit**: Maximum results to return (default 25, max 100)

### Use Cases

- **Recipe apps**: Build meal recipe databases with ingredients and instructions
- **Menu planning**: Browse meals by category or cuisine for meal planning
- **Grocery lists**: Extract ingredient lists for shopping
- **Content creation**: Generate food content for blogs, social media, or YouTube
- **Nutrition apps**: Collect recipes organized by cuisine and category
- **Education**: Learn about international cuisines and cooking techniques

### Example Output

```json
{
  "id": "52772",
  "name": "Teriyaki Chicken Casserole",
  "category": "Chicken",
  "area": "Japanese",
  "instructions": "Preheat oven to 350F. 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": "garlic", "measure": "1/2 teaspoon" }
  ],
  "imageUrl": "https://www.themealdb.com/images/media/meals/wvpsxx1468256321.jpg",
  "youtubeUrl": "https://www.youtube.com/watch?v=4aZr5hZXP_s",
  "source": "http://www.ثقافته.com/recipes/teriyaki-chicken-casserole",
  "tags": "Meat,Casserole",
  "scrapedAt": "2026-04-26T12:00:00.000Z"
}
```

### Data Source

- [TheMealDB](https://www.themealdb.com/) - Open, crowd-sourced database of meal recipes from around the world

***

### Run on Apify

This scraper runs on the [Apify platform](https://apify.com/?fpr=lulzasaur) -- a full-stack web scraping and automation cloud. Sign up for a free account to get started with 30-day trial of all features.

[Try Apify free](https://apify.com/?fpr=lulzasaur)

# Actor input Schema

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

How to search for meals: by name, by category, by area/cuisine, or get random meals.

## `searchQuery` (type: `string`):

Meal name to search for (used in 'search' mode). E.g. 'chicken', 'pasta', 'curry'.

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

Meal category (used in 'category' mode).

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

Cuisine area (used in 'area' mode).

## `limit` (type: `integer`):

Maximum number of results to return.

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

Optional proxy to use.

## Actor input object example

```json
{
  "mode": "search",
  "searchQuery": "chicken",
  "category": "Seafood",
  "area": "Italian",
  "limit": 25
}
```

# 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/mealdb-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/mealdb-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/mealdb-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/e5TPPcfHDGAnTdN2r/builds/6Q6gJ165stncvVJhZ/openapi.json
