# Recipe Extractor – Ingredients, Steps and Source Nutrition (`scrape_api/recipe-extractor`) Actor

Extract complete recipes from public recipe URLs — ingredients with quantities, ordered steps, times, portions and the nutrition the source publishes — for meal planning apps, nutrition analysis and content libraries, with clear diagnostics for missing or inaccessible pages.

- **URL**: https://apify.com/scrape_api/recipe-extractor.md
- **Developed by:** [Scrape_API](https://apify.com/scrape_api) (community)
- **Categories:** E-commerce
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$4.00 / 1,000 recipes

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 Extractor: Ingredients, Steps and Source Nutrition

Recipe Extractor turns public recipe URLs into structured recipe records for meal planning,
content aggregation, recipe API feeds and analysis. Each result keeps the original
ingredients, ordered instructions and source URL together. Optional nutrition comes from
the same published recipe page and keeps its stated serving basis. The actor does not
estimate nutrition from ingredients or translate the source text.

### Recipe Extractor input

Provide between one and ten recipe detail URLs in `urls`. Alternatively, supply an HTTPS
site origin in `site` and recipe paths in `paths`. Choose one input mode per run. Collection
pages, search pages and homepages are not recipe detail pages, even when they mention many
recipes. The actor does not follow their links or crawl an entire site.

A measured example uses the following actual source address:

```json
{"urls":["https://www.bbcgoodfood.com/recipes/easy-pancakes"],"include_nutrition":true,"language":"en","max_recipes":10}
```

For the alternative mode, the measured Dutch recipe address can be supplied this way:

```json
{"site":"https://www.leukerecepten.nl","paths":["/recepten/pannenkoeken/"],"language":"nl"}
```

`include_nutrition` defaults to true. Set it to false when you only need recipe content.
`max_recipes` defaults to ten and limits the number of unique complete recipes delivered.
Failed addresses and repeated input addresses do not count as delivered recipes. For more
than ten addresses, submit separate runs with batches of at most ten addresses each.

The `language` option is a request label reported in the batch output. It does not translate
recipes or select a different source language. The recipe's own `language` field reports
its actual language when the source identifies it. English and Dutch content therefore
remain in their original form, regardless of the request label.

### Output and source provenance

Each dataset row represents one complete main recipe. Required fields are `source`,
`fetched_at`, `url`, `title`, `ingredients` and `instructions`. The source product is always
`recipe-extractor`; `url` identifies the recipe website. `fetched_at` records the actual
retrieval time in UTC. `input_urls` preserves the supplied addresses associated with that
recipe, while `final_url` records the fetched detail address after redirects.

Additional fields include an image URL, description, authors, categories, cuisines,
source diet labels, preparation time, cooking time and total time. Missing optional values
remain null or empty lists. A missing time is not reported as zero. Total time is taken
from its own source value rather than calculated by adding preparation and cooking times.

Ingredient lines preserve quantities and preparation notes. `ingredient_details` adds a
conservative quantity parse alongside each original line. A range or a package expression
keeps its quantity text without inventing a single quantity. Instruction details preserve
step order and section headings, so a preparation section remains distinct without adding
extra recipe rows.

Recipe yield and eating portions are separate concepts. The measured hummus source reports
`2 cups (8 servings)` and a nutrition serving size of `1/4 cup`. These describe different
things and are preserved separately. A recipe yielding a number of pieces is not silently
converted into a number of people.

A captured row, trimmed to the main fields. It is a real run result; the detail arrays
and the remaining provenance fields are left out here only to keep the example readable:

```json
{
  "source": "recipe-extractor",
  "fetched_at": "2026-11-12T13:40:38.542645Z",
  "url": "https://www.bbcgoodfood.com/recipes/easy-pancakes",
  "title": "Easy pancakes",
  "authors": ["Cassie Best"],
  "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": [
    "Put 100g plain flour, 2 large eggs, 300ml milk, 1 tbsp sunflower or vegetable oil and a pinch of salt into a bowl or large jug, then whisk to a smooth batter. This should be similar in consistency to single cream.",
    "Set aside for 30 mins to rest if you have time, or start cooking straight away.",
    "Set a medium frying pan or crêpe pan over a medium heat and carefully wipe it with some oiled kitchen paper.",
    "When hot, cook your pancakes for 1 min on each side until golden, using around half a ladleful of batter per pancake. Keep them warm in a low oven as you make the rest.",
    "Serve with lemon wedges and caster sugar, or your favourite filling. Once cold, you can layer the pancakes between baking parchment, then wrap in cling film and freeze for up to two months."
  ],
  "prep_time_minutes": 10,
  "cook_time_minutes": 20,
  "total_time_minutes": 30,
  "yield_raw": "Makes 12",
  "servings": null,
  "extraction_method": "jsonld",
  "language": "en",
  "nutrition": {
    "basis": "per_serving",
    "basis_text": "Nutrition: per pancake",
    "serving_size": null,
    "calories_kcal": 61,
    "fat_g": 2,
    "carbohydrates_g": 7,
    "protein_g": 3,
    "salt_g": 0.1,
    "sodium_mg": null,
    "sources": {"calories_kcal": "jsonld", "protein_g": "jsonld", "salt_g": "html"}
  },
  "quality_warnings": [
    "Source salt and sodium labels conflict; sodium normalization was withheld."
  ]
}
```

`extraction_method` says how the row was read: `jsonld` when the page publishes
schema.org/Recipe structured data, `html` when the recipe card had to be parsed from the
page markup. In this row the publisher labels salt and sodium inconsistently, so the
normalized `sodium_mg` stays null and `salt_g` is reported as published, with the
conflict in `quality_warnings`.

### Use cases

- **Meal planning and calendar apps.** Import a list of recipe addresses and store title,
  image, times, portions, ingredients and steps in one predictable record per recipe,
  instead of keeping a DOM parser per cooking website.
- **Nutrition analysis.** Read the values the publisher publishes together with their
  stated basis and serving size, and exclude the uncertain ones. Nothing is divided,
  averaged or guessed, so an analysis downstream can decide itself what to trust.
- **Content aggregation and recipe libraries.** Fill a database or a newsletter backlog
  with complete recipe records that keep their source URL, author and retrieval time, so
  every entry stays attributable to its publisher.
- **Collecting your own favourites.** Many saved recipe links today live as bookmarked
  pages; one batch converts up to ten of them into rows you can search, diff or re-import
  after a site redesign.

### How Recipe Extractor compares with the alternatives

Recipe scrapers on this Store come in shapes that solve different problems, so the useful
comparison is what each shape promises.

- **Per-site scrapers.** Their promise is a fixed list of supported cooking websites:
  you pick the site from a menu and hope yours is on it. Recipe Extractor starts from
  what the page itself publishes in schema.org/Recipe structured data, falls back to the
  recipe card markup when that is missing, and asks for addresses rather than a menu.
  Coverage is therefore conditional per page and stated honestly: an address that does not
  yield a complete main recipe comes back as a diagnostic, not as a half-parsed card.
- **Writing your own extractor.** One JSON-LD parse is quick for one site. The work is
  everything after that: minutes instead of ISO durations, yield versus eating portions,
  nutrition with a stated basis, section headings in the steps, duplicate addresses in one
  batch. This actor returns the same normalized shape for every input, with the original
  source values preserved beside the normalized ones.
- **Save-the-recipe browser tools.** They are built for a person reading a page later.
  This actor is built for a program: a batch of up to ten addresses per run, one record
  per complete recipe, and explicit error types when a page is missing, refuses access or
  times out, so a pipeline can retry instead of guessing.

The buying difference is the billing unit: a recipe charge attaches to a complete recipe
that actually reaches the dataset, and the diagnostics that explain a failure are part of
the same run.

### Source nutrition and limitations

Nutrition includes the original source object, normalized values where units are clear,
a basis such as `per_serving` or `per_100g`, and the source of each normalized value. An
unknown basis is explicitly labeled `unknown`. Values are never divided by the number of
servings or inferred from the ingredient list. Salt and sodium remain different fields.
Conflicting labels produce a warning and the uncertain normalized value remains null.

When requested nutrition is unavailable, the recipe can still be delivered with a quality
warning. When nutrition is turned off, its fields are null without a missing-nutrition
warning. This output describes what the page publishes; it does not provide dietary advice
or confirm the scientific accuracy of a publisher's nutrition claims.

The verified source families are BBC Good Food, Cookie and Kate and Leuke Recepten.
Availability can change. Simply Recipes and Allrecipes returned access refusals during
research, so successful extraction from those sources is not promised. There is no claim
of universal website coverage. The actor requires a complete main recipe and rejects
incomplete cards or ordinary category content.

### Errors and partial results

Mixed batches keep successful recipes and report the failed input positions separately.
Diagnostics identify missing recipes, inaccessible pages, source rate limits and time-outs.
Warnings are English, include URL context and do not become dataset recipes. If no complete
recipe is available, the run has an empty recipe dataset and a diagnostic report. Submit
valid detail URLs again after a temporary source problem, rather than treating the failure
as a recipe.

### Pricing

Billing is per unique complete recipe actually delivered to the dataset. Ingredients,
steps, source nutrition, repeated addresses and diagnostic messages are not separate
billable units. Empty results and non-recipe pages have no recipe charge. Non-paying
accounts receive at most three delivered recipes per run through either input mode. The
price per delivered recipe is the one shown on this actor's Store page; check it there
before you start a large batch, and note that your own spending limit still applies.

### FAQ

#### Does this search for recipes across a website?

No. Supply known recipe detail addresses. Search pages and category pages are diagnosed
rather than crawled. This keeps the output focused on the complete recipes you requested.

#### Does the language field translate the ingredients?

No. Ingredient lines, instructions and source labels retain the publisher's language.
The request language and actual source language are reported separately.

#### Can I use nutrition values as confirmed values per portion?

Check `nutrition.basis`, `serving_size`, `sources` and `quality_warnings` first. The actor
preserves the publisher's stated basis and flags uncertainty. An unknown basis must not
be treated as confirmed nutrition per serving.

#### Do I need a list of supported cooking websites?

No. Supply the recipe address itself; there is no site menu to choose from. The page must
contain a complete main recipe, either as schema.org/Recipe structured data or as a
recipe card that can be parsed. An address that publishes neither, or that refuses access,
is reported per address instead of silently skipped.

#### What happens when several addresses identify the same recipe?

Confirmed duplicates are delivered once and billed once. Their original addresses are
retained in `input_urls`. Recipes with similar names at different detail addresses are
not merged merely because their titles resemble each other.

# Actor input Schema

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

1–10 public recipe detail URLs. Use urls OR site and paths. HTTP is upgraded to HTTPS before fetching. Fragments and known tracking parameters are removed; meaningful query parameters remain. Split larger jobs into batches of at most ten.

## `site` (type: `string`):

Alternative input: an HTTPS origin without a path, query, fragment, credentials or custom port. Supply paths with this field and omit urls.

## `paths` (type: `array`):

1–10 recipe paths on site, each beginning with one slash. Paths cannot escape the supplied origin. Omit urls.

## `language` (type: `string`):

Requested language tag, echoed in data.language. Does not translate content or change the source request language. Each recipe reports its actual source language separately.

## `include_nutrition` (type: `boolean`):

Read and safely normalize nutrition already published on the same source page. Preserve its stated basis; no ingredient estimates or external enrichment.

## `max_recipes` (type: `integer`):

Maximum unique complete recipes to deliver. Failed URLs and duplicates do not consume this delivery limit.

## Actor input object example

```json
{
  "urls": [
    "https://www.bbcgoodfood.com/recipes/easy-pancakes"
  ],
  "language": "en",
  "include_nutrition": true,
  "max_recipes": 10
}
```

# Actor output Schema

## `recipes` (type: `string`):

No description

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

// Run the Actor and wait for it to finish
const run = await client.actor("scrape_api/recipe-extractor").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("scrape_api/recipe-extractor").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 scrape_api/recipe-extractor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,scrape_api/recipe-extractor"
        }
    }
}
```

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/Zo4kTj9wPAPyCx0yQ/builds/NagWUlcXprfHNzc5x/openapi.json
