# Recipe Scraper API – URL to Structured Data (`tiger_claw/recipe-scraper`) Actor

Recipe scraper API for recipe sites and food blogs. Turn recipe URLs into clean structured data with titles, ingredients, instructions, prep and cook times, servings, nutrition, and source URLs. Handles JavaScript-heavy pages and anti-bot challenges for apps, data pipelines, and AI agents.

- **URL**: https://apify.com/tiger\_claw/recipe-scraper.md
- **Developed by:** [Tiger Claw](https://apify.com/tiger_claw) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 successful recipe extractions

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?

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

## Recipe Scraper API

Recipe scraper API for extracting structured recipe data from public recipe
URLs, recipe websites, and food blogs.

Extract a recipe from a URL and receive normalized ingredients, instructions,
cooking times, servings, cuisine, category, nutrition, and other available
recipe fields.

The Actor automatically adapts to different website structures,
JavaScript-rendered pages, and supported access protections. No browser
configuration, proxy setup, or scraping knowledge is required.

### What does Recipe Scraper API do?

Recipe Scraper API extracts structured recipe information from recipe websites,
publishers, and food blogs.

For each unique URL, the Actor selects appropriate fetching and extraction
methods automatically and returns one Dataset record.

It is designed for:

- Recipe and meal-planning applications
- Recipe database ingestion
- Shopping-list and ingredient tools
- Nutrition and food-data pipelines
- AI agents that need structured recipe information
- Bulk recipe processing and research

### Why use this Actor?

#### One interface for many recipe websites

Recipe websites use different layouts, structured-data formats, JavaScript
frameworks, and access protections. This Actor hides that complexity behind one
consistent input and output format.

#### Automatic fallback

The Actor starts with efficient HTTP fetching, then automatically uses browser
rendering and managed access handling only when needed. You do not need to
choose a browser, configure a proxy, or enable a special scraping mode.

#### Structured output

Recipes are returned in predictable fields suitable for applications,
databases, automation workflows, APIs, and AI agents.

#### One result per URL

Each unique submitted URL produces one Dataset record. Failed URLs are not
silently discarded: they return a structured error that makes bulk processing
easy to reconcile programmatically.

### Input

Provide up to 100 direct public recipe URLs:

```json
{
  "urls": [
    "https://www.bbcgoodfood.com/recipes/easy-pancakes",
    "https://www.750g.com/quiche-lorraine-r100077.htm"
  ]
}
```

### Output

The Actor creates one Dataset item for every unique input URL.

#### Successful recipe

The detailed recipe is contained in `recipe`. Top-level summary fields make
the Apify Dataset table easy to scan and filter.

```json
{
  "success": true,
  "fetch_method": "basic_requests",
  "extraction_method": "json_ld",
  "recipe": {
    "title": "Easy pancakes",
    "description": "Learn how to make the perfect pancakes every time.",
    "ingredients": [
      "100g plain flour",
      "2 large eggs",
      "300ml milk",
      "1 tbsp sunflower or vegetable oil plus a little extra for frying",
      "lemon wedges to serve (optional)",
      "caster sugar to serve (optional)"
    ],
    "instructions": [
      "Whisk the flour, eggs, milk, oil, and salt into a smooth batter.",
      "Rest the batter if desired.",
      "Heat and lightly oil a frying pan.",
      "Cook each pancake until golden on both sides.",
      "Serve with lemon wedges and caster sugar."
    ],
    "prep_time": "PT10M",
    "cook_time": "PT20M",
    "total_time": "PT30M",
    "yield": "Makes 12",
    "cuisine": "British",
    "category": "Breakfast, Brunch, Main course",
    "nutrition": {
      "calories": "61 calories",
      "proteinContent": "3 grams protein"
    },
    "source_url": "https://www.bbcgoodfood.com/recipes/easy-pancakes"
  },
  "source_url": "https://www.bbcgoodfood.com/recipes/easy-pancakes",
  "recipe_title": "Easy pancakes",
  "ingredient_count": 6,
  "instruction_count": 5
}
```

Fields such as nutrition, cooking time, cuisine, category, and servings depend
on what the source website publishes and can be `null` when unavailable.

### Error Handling

Every submitted URL produces a result, including URLs that cannot be
successfully extracted. Failures are returned as Dataset items rather than
being silently skipped:

```json
{
  "success": false,
  "source_url": "https://example.com/recipe",
  "error": {
    "code": "not_a_recipe",
    "message": "The page does not appear to contain a recipe.",
    "retryable": false
  }
}
```

The `error` object always contains a machine-readable `code`, a human-readable
`message`, and a `retryable` flag. Some errors also include helpful context,
such as an anti-bot provider or HTTP status code.

| Error code | Meaning |
| --- | --- |
| `not_a_recipe` | The page was accessible but does not appear to contain a recipe. |
| `recipe_incomplete` | Recipe information was found, but there was not enough reliable data to return a complete recipe. |
| `subscription_required` | The recipe appears to require an authenticated subscription or paywall access. |
| `anti_bot_challenge` | The website blocked automated access even after available fallback methods were attempted. |
| `access_blocked` | The website denied access without a detected named anti-bot challenge. |
| `network_error` | The page could not be retrieved because of a network or remote-server failure. |
| `fetch_timeout` | The website did not respond before the request timed out. |

### Notes and Limits

- Submit direct public recipe-page URLs, not category pages, search results, or homepages.
- Duplicate URLs are processed once per run.
- The Actor never attempts to bypass subscriptions or authenticated access.
- Recipe availability and optional fields depend on the source website.
- Use the returned `success` field and error object when processing recipes in bulk.

### Pricing

Successful recipe extractions cost $0.003 each ($3 per 1,000 successful
recipes).

Failed URLs still return a Dataset record but do not trigger the
successful-extraction charge. Platform usage is included in the price. A small
Actor-start fee applies per run.

### Example Use Cases

- Send a list of bookmarked recipes to build a meal plan.
- Convert recipe links into an ingredient database or shopping list.
- Enrich a food dataset with cooking times, servings, and nutrition data.
- Let an AI agent retrieve a recipe from a public link in a predictable JSON format.

### API and AI Agent Use

Use Recipe Scraper API through the Apify API, automation workflows, or Apify
MCP.

It is useful when an application or AI agent needs to:

- Extract a recipe from a URL.
- Parse recipes from food blogs or recipe websites.
- Convert recipe pages into predictable structured JSON.
- Retrieve ingredients and cooking instructions programmatically.
- Normalize recipe data before meal planning, shopping-list generation, or further AI processing.

# Actor input Schema

## `urls` (type: `array`):

Enter direct URLs for public recipes from recipe websites or food blogs. Each URL produces a Dataset result; successful extractions include available structured fields such as title, ingredients, instructions, cooking times, servings, nutrition, and source URL. Paste one URL per line with Bulk edit. Do not use homepages, category pages, search results, login-only pages, or subscription-only pages. Duplicate URLs are processed once.

## Actor input object example

```json
{
  "urls": [
    "https://www.bbcgoodfood.com/recipes/easy-pancakes",
    "https://www.750g.com/quiche-lorraine-r100077.htm"
  ]
}
```

# Actor output Schema

## `recipe_results` (type: `string`):

The default Dataset containing one result for every unique submitted recipe URL.

# 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 = {
    "urls": [
        "https://www.bbcgoodfood.com/recipes/easy-pancakes"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("tiger_claw/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 = { "urls": ["https://www.bbcgoodfood.com/recipes/easy-pancakes"] }

# Run the Actor and wait for it to finish
run = client.actor("tiger_claw/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 '{
  "urls": [
    "https://www.bbcgoodfood.com/recipes/easy-pancakes"
  ]
}' |
apify call tiger_claw/recipe-scraper --silent --output-dataset

```

## MCP server setup

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