# Tasty Recipe Scraper (`muhammadafzal/tasty-recipe-scraper`) Actor

Extract ingredients, instructions, nutrition, timing, ratings, images, and videos from public Tasty recipe URLs.

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

## Pricing

from $12.00 / 1,000 tasty recipe records

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

## Tasty Recipe Scraper

**Free plan limit:** Free-plan users can receive up to **5 result records per run**. Paid-plan and local/unknown runs retain the Actor's existing limits.

Extract ingredients, instructions, nutrition, cooking times, ratings, images, and video links from public Tasty recipe pages into clean JSON records for food apps, recipe research, content catalogs, and AI workflows.

### What it extracts

Each successfully parsed URL produces one homogeneous recipe record in the default dataset.

| Field | Description |
| --- | --- |
| `url`, `slug`, `name` | Canonical page URL, stable URL slug, and published title |
| `description`, `author` | Recipe summary and credited person or organization |
| `ingredients` | Ordered ingredient lines with quantities and preparation notes |
| `instructions` | Ordered cooking steps as plain text |
| `prepTime`, `cookTime`, `totalTime`, `servings` | Published ISO durations and yield |
| `nutrition` | Source-published calories and nutrient strings when available |
| `rating` | Aggregate rating value, count, and scale when available |
| `imageUrl`, `videoUrl` | Primary image and recipe video URLs |
| `category`, `cuisines`, `keywords`, `tools` | Published classification and equipment data |
| `datePublished`, `dateModified`, `scrapedAt` | Source dates and extraction timestamp |

The Actor reads embedded Recipe JSON-LD first because it is the most stable public data surface. Visible page metadata provides a limited fallback for the title, description, image, and video. Missing fields remain `null` or empty arrays; the Actor never invents recipe data.

### When to use it

Use this Actor when you already have one or more direct public Tasty recipe URLs such as `https://tasty.co/recipe/one-pot-garlic-parmesan-pasta`. It is suited to recipe databases, ingredient analysis, meal-planning pipelines, nutrition cataloging, and agent-readable datasets.

Do not use it for Tasty site search, account data, shopping pages, private content, or arbitrary recipe websites. Tasty's `/search` path is excluded from this Actor's contract. Compilation and category pages are not silently treated as recipes.

### Input

| Field | Type | Default | Notes |
| --- | --- | --- | --- |
| `startUrls` | array | One working Tasty recipe URL | Accepts 1-100 direct HTTPS `tasty.co/recipe/...` URLs |
| `maxResults` | integer | `10` | Caps delivered records and result events; range 1-100 |
| `includeNutrition` | boolean | `true` | Keeps published nutrition data; no values are calculated |
| `maxConcurrency` | integer | `3` | Parallel request cap; range 1-10 |

Example input:

```json
{
  "startUrls": [
    { "url": "https://tasty.co/recipe/one-pot-garlic-parmesan-pasta" },
    { "url": "https://tasty.co/recipe/3-ingredient-pancakes" }
  ],
  "maxResults": 2,
  "includeNutrition": true,
  "maxConcurrency": 2
}
```

API clients can run the Actor with the same JSON input and read records from the run's default dataset. AI agents should select this Actor only when the supplied URLs are direct Tasty recipe pages.

### Output example

```json
{
  "url": "https://tasty.co/recipe/one-pot-garlic-parmesan-pasta",
  "slug": "one-pot-garlic-parmesan-pasta",
  "name": "One-Pot Garlic Parmesan Pasta Recipe by Tasty",
  "author": "Tasty",
  "prepTime": "PT10M",
  "cookTime": "PT22M",
  "totalTime": "PT32M",
  "servings": "4 servings",
  "ingredients": ["2 tablespoons unsalted butter", "4 cloves garlic, minced"],
  "instructions": ["Heat unsalted butter in a large skillet over medium high heat."],
  "nutrition": { "calories": "341 calories", "proteinContent": "13 grams" },
  "rating": { "value": 4.8, "count": 15944, "best": 5, "worst": 0 },
  "warnings": []
}
```

The `OUTPUT` key-value-store record reports the run classification (`data`, `partial`, `empty`, `blocked`, or `rejected`), URL counts, records delivered, blocked/missing/failed pages, warnings, estimated event cost, and runtime. Diagnostics never pollute the recipe dataset.

### Pay-per-event pricing

Current Apify event prices and platform-usage treatment are listed in the dedicated [Pricing section](#pricing) below.

A run returning 10 recipes has an event total of approximately `$0.155` using the FREE event-price tier, including the $0.005 start event. Apify platform usage for this Actor run is included in the event prices; no separate per-run platform-usage fee is charged. Invalid, missing, blocked, or unparseable pages do not create recipe-record events. Apify automatically charges the synthetic start and default-dataset-item events; the Actor does not double-charge them in code.

### Reliability and limits

Requests use a stable browser-like identity, a 30-second timeout, bounded retries for transient network and server errors, rate-limit backoff, URL deduplication, a five-megabyte response safety cap, and conservative concurrency. Valid partial results are preserved if another URL fails. HTTP blocks, missing pages, schema drift, and invalid URLs are separated in `OUTPUT`.

Tasty can change markup, structured data, or access rules without notice. A successful container run with zero records is not presented as a successful scrape: the terminal status and `OUTPUT` explain whether the outcome was empty, blocked, rejected, or failed. Nutrition, ratings, tools, and videos are returned only when Tasty publishes them.

### Legal and responsible use

Scrape only public pages you are permitted to access. Follow Tasty's terms, robots directives, copyright rules, and applicable laws. Do not use this Actor to republish protected recipe text or media without the necessary rights. The Actor does not bypass authentication, paywalls, CAPTCHAs, or other access controls, and it does not collect account or private data.

For support, include the run ID, a non-sensitive example URL, and the relevant `OUTPUT` warning. Never share cookies, tokens, or private credentials.

### Pricing

This Actor uses **pay-per-event** pricing. These are the current Apify Store event prices:

| Event | Price (USD) | When it is charged |
|---|---:|---|
| `apify-default-dataset-item` | FREE: $0.015; BRONZE: $0.015; SILVER: $0.015; GOLD: $0.012; PLATINUM: $0.012; DIAMOND: $0.012 | Tasty recipe record — One schema-valid Tasty recipe written to the default dataset. |
| `apify-actor-start` | $0.005 | Actor Start — Charged when the Actor starts running. Number of events charged depends on Actor memory (one event per GB, minimum one event). — Charged once per run. |

Apify platform usage for this Actor run is included alongside the event prices above; no separate per-run platform-usage fee is passed to users.

This covers Apify platform usage for this Actor run. Other Apify products or usage outside this Actor run may still follow your account plan.

# Changelog

This Actor's version history is a separate document: https://apify.com/muhammadafzal/tasty-recipe-scraper/changelog.md

# Actor input Schema

## `startUrls` (type: `array`):

Use this for public Tasty recipe pages in https://tasty.co/recipe/{slug} format. Example: https://tasty.co/recipe/one-pot-garlic-parmesan-pasta. Category, compilation, search, and non-Tasty URLs are not accepted.

## `maxResults` (type: `integer`):

Use this to cap delivered recipe records and PPE result events. Accepts 1-100; the default is 10 and never creates more records than the number of unique valid URLs.

## `includeNutrition` (type: `boolean`):

Use this to include Tasty's published calories and nutrient fields when present. Disable it to return nutrition as null; no nutrition values are calculated.

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

Use this to limit simultaneous Tasty page requests. Accepts 1-10; the conservative default of 3 reduces rate-limit risk and does not change the result cap.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://tasty.co/recipe/one-pot-garlic-parmesan-pasta"
    }
  ],
  "maxResults": 10,
  "includeNutrition": true,
  "maxConcurrency": 3
}
```

# Actor output Schema

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

Schema-validated recipe records in the default dataset.

## `summary` (type: `string`):

Counts, warnings, and outcome classification from this run.

# 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 = {
    "startUrls": [
        {
            "url": "https://tasty.co/recipe/one-pot-garlic-parmesan-pasta"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("muhammadafzal/tasty-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 = { "startUrls": [{ "url": "https://tasty.co/recipe/one-pot-garlic-parmesan-pasta" }] }

# Run the Actor and wait for it to finish
run = client.actor("muhammadafzal/tasty-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 '{
  "startUrls": [
    {
      "url": "https://tasty.co/recipe/one-pot-garlic-parmesan-pasta"
    }
  ]
}' |
apify call muhammadafzal/tasty-recipe-scraper --silent --output-dataset

```

## MCP server setup

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