# TheFork Scraper (`datascrapers/thefork-scraper`) Actor

Scrape TheFork restaurants from city listings or restaurant URLs, with optional details, reviews, and availability calendar in one row per restaurant.

- **URL**: https://apify.com/datascrapers/thefork-scraper.md
- **Developed by:** [Data Scrapers](https://apify.com/datascrapers) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.20 / 1,000 restaurants

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

**TheFork Scraper** creates a structured dataset of restaurants collected from TheFork. Each dataset item is one restaurant and can include the restaurant id, name, cuisine, rating, review count, average price, address, bookable flag, and, when requested, details, reviews, and availability dates. Query the source with a city listing URL or a restaurant URL, or with a search phrase. Control the result limit with `maxItems`. Retrieve records through the Apify Dataset API or export them as JSON, CSV, Excel, XML, or another supported format.

[![TheFork Scraper — city listing to restaurant rows](https://raw.githubusercontent.com/faizanalii/apify-actor-assets/main/thefork-scraper/thefork-scraper-value-demo.gif)](https://apify.com/datascrapers/thefork-scraper)

### Dataset at a glance

| Property | Value |
|---|---|
| Source | thefork.com and country sites such as thefork.de |
| Record unit | One restaurant |
| Input methods | `startUrls` or `searchQueries` |
| Main identifiers | `restaurantId`, `url` |
| Delivery | Apify Dataset and API |
| Export formats | JSON, CSV, Excel, XML |
| Update model | Fresh records per Actor run |
| Pricing | $1.50 per 1,000 events on the Free plan for restaurants, details, reviews, and calendar dates. Platform usage is not billed separately. |

### Coverage and available records

`startUrls` accepts TheFork city listing URLs and restaurant URLs. `searchQueries` are search phrases used when you are not passing URLs. `maxItems` of 0 does not add a restaurant cap. `scrapeRestaurantDetails` defaults to true and charges `restaurant-details` when the detail payload is saved. `scrapeReviews` charges one `reviews` event per saved review, up to `maxReviews`. `maxReviews` of 0 does not add a per-restaurant review cap. `scrapeCalendar` charges one `calendar` event per saved availability date, up to `maxCalendarDates`, for `partySize`.

The dataset stays one row per restaurant. Reviews and dates are nested on that row. A restaurant that is not bookable can still be saved with `isBookable` false.

### Data dictionary

| Field | Type | Nullable | Description | Example |
|---|---|---:|---|---|
| restaurantId | string | no | TheFork restaurant id. Deduplication key. | 845110 |
| name | string | yes | Restaurant name | Annam 2 (Barmbek) |
| url | string | yes | Restaurant page | https://www.thefork.de/restaurant/annam-2-barmbek-r845110 |
| listingUrl | string | yes | City or search page that produced the row | https://www.thefork.de/restaurants/hamburg-c205324 |
| cuisine | string | yes | Cuisine label | Asiatisch |
| rating | number | yes | TheFork rating | 9.2 |
| reviewCount | number | yes | Review count | 322 |
| averagePrice | object | yes | amount and currency | {"amount": 28.0, "currency": "EUR"} |
| address | object | yes | Street, city, and postal code | {"street": "Weidestraße 129", "city": "Hamburg", "zipCode": "22083"} |
| isBookable | boolean | yes | Booking flag | true |
| sourceQuery | string | yes | URL or query that produced the row | https://www.thefork.de/restaurants/hamburg-c205324 |
| details | object | yes | Detail payload when details are enabled | present |
| reviews | array | yes | Review objects when reviews are enabled | present |
| calendar | array | yes | Availability dates when the calendar is enabled | present |

### Example dataset record

```json
{
  "restaurantId": "845110",
  "name": "Annam 2 (Barmbek)",
  "url": "https://www.thefork.de/restaurant/annam-2-barmbek-r845110",
  "listingUrl": "https://www.thefork.de/restaurants/hamburg-c205324",
  "cuisine": "Asiatisch",
  "rating": 9.2,
  "reviewCount": 322,
  "averagePrice": {"amount": 28.0, "currency": "EUR", "rawValue": 2800},
  "address": {
    "street": "Weidestraße 129",
    "city": "Hamburg",
    "zipCode": "22083",
    "country": "Deutschland"
  },
  "isBookable": true,
  "sourceQuery": "https://www.thefork.de/restaurants/hamburg-c205324"
}
```

This row came from the Hamburg city listing `https://www.thefork.de/restaurants/hamburg-c205324`. Review text and calendar dates are nested on the same row when those inputs are enabled. They are omitted here so the example stays a single restaurant record.

### Query and input reference

| Input | Type | Required | Default | Accepted values | Description |
|---|---|---:|---|---|---|
| searchQueries | array | no | empty | Phrases | Search text. |
| startUrls | array | no | empty | City or restaurant URLs | Direct TheFork URLs. |
| maxItems | integer | no | 0 | Integer | Maximum restaurants. 0 does not add a cap. |
| scrapeRestaurantDetails | boolean | no | true | true, false | Fetch details. Charges `restaurant-details`. |
| scrapeReviews | boolean | no | true | true, false | Fetch reviews. Charges `reviews`. |
| maxReviews | integer | no | 0 | Integer | Reviews per restaurant. 0 does not add a cap. |
| scrapeCalendar | boolean | no | true | true, false | Fetch availability. Charges `calendar`. |
| maxCalendarDates | integer | no | 0 | Integer | Dates per restaurant. 0 does not add a cap. |
| partySize | integer | no | 2 | Integer | Party size for the calendar. |
| maxConcurrency | integer | no | 5 | Integer | Parallel restaurant fetches. |
| proxyConfiguration | object | no | Apify residential | Apify proxy input | Proxy used for TheFork requests. |

Minimal request:

```json
{
  "startUrls": [{ "url": "https://www.thefork.de/restaurants/hamburg-c205324" }],
  "maxItems": 5,
  "scrapeReviews": false,
  "scrapeCalendar": false
}
```

### Retrieve the data through the API

Start the Actor with JSON input, wait for the run, then read the default dataset. Other languages are on the Actor API tab.

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_API_TOKEN>")
run = client.actor("datascrapers/thefork-scraper").call(run_input={
    "startUrls": [{"url": "https://www.thefork.de/restaurants/hamburg-c205324"}],
    "maxItems": 5,
    "scrapeReviews": False,
    "scrapeCalendar": False,
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["restaurantId"], item.get("name"))
```

### Data quality and record handling

Use `restaurantId` as the deduplication key. `averagePrice.amount` is the major currency unit and `rawValue` is the source integer, 2800 for 28.00 EUR on the example row. Ratings are numbers. One dataset row holds one restaurant even when reviews and dates are nested. A detail request that fails can still leave the listing fields on the row. The example uses a restaurant name, not a person name.

### Pricing and cost examples

| Event | Free | Bronze | Silver | Gold |
|---|---:|---:|---:|---:|
| restaurant | $1.50 | $1.40 | $1.30 | $1.20 |
| restaurant-details | $1.50 | $1.40 | $1.30 | $1.20 |
| reviews | $1.50 | $1.40 | $1.30 | $1.20 |
| calendar | $1.50 | $1.40 | $1.30 | $1.20 |

Prices are per 1,000 events. Platinum and Diamond use the Gold price. Platform usage is not billed on top of these events. A Free-plan run that saves 1,000 restaurants with details costs $3.00 before reviews and calendar dates. Each saved review and each saved date is its own event.

### Limitations and responsible data use

TheFork can change city pages, require a proxy, or return an empty calendar for a party size. Availability is the response for that request, not a reservation. Use the data under TheFork's terms and applicable privacy rules. Do not treat a missing calendar as proof that the restaurant is closed.

### Dataset questions

#### Why is the default run larger than the restaurant count?

`scrapeRestaurantDetails`, `scrapeReviews`, and `scrapeCalendar` default to true. Turn the ones you do not need to false, and set `maxReviews` and `maxCalendarDates`.

#### Are reviews separate dataset rows?

No. Reviews stay on the restaurant row. Each saved review is still a `reviews` charge event.

#### Which field should I store as the key?

Store `restaurantId`. It is the id in the restaurant URL.

### Related datasets from Data Scrapers

- [Subito.it Scraper](https://apify.com/datascrapers/subito-scraper) for Italian classified ads.
- [MediaMarkt Germany Product Scraper](https://apify.com/datascrapers/mediamarkt-de-scraper) for German electronics products.
- [Company Services Finder](https://apify.com/datascrapers/company-service-finder) for company service labels.
- [Chargefinder Scraper](https://apify.com/datascrapers/chargefinder-scraper) for public charging stations.
- [Daft.ie Property Scraper](https://apify.com/datascrapers/daft-ie-scraper) for Irish property listings.

### Data Scrapers support

Questions about this dataset: stardustspotlight@gmail.com

# Actor input Schema

## `searchQueries` (type: `array`):

City or location names to resolve on TheFork (for example "Hamburg" or "Paris"). The Actor looks up each query and scrapes restaurants in that city.

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

TheFork city listing URLs (e.g. https://www.thefork.de/restaurants/hamburg-c205324) or restaurant URLs (e.g. https://www.thefork.de/restaurant/restaurant-arda-r804216).

## `maxItems` (type: `integer`):

Maximum number of restaurants to scrape (0 = unlimited).

## `scrapeRestaurantDetails` (type: `boolean`):

Fetch extra restaurant details (menu, awards, features, photos, map) into a single details object. Charged as restaurant-details once per restaurant.

## `scrapeReviews` (type: `boolean`):

Fetch diner reviews into a reviews list on the restaurant row. Charged per review.

## `maxReviews` (type: `integer`):

Maximum reviews to collect per restaurant (0 = all available).

## `scrapeCalendar` (type: `boolean`):

Fetch bookable dates into a calendar list on the restaurant row. Charged per calendar date.

## `maxCalendarDates` (type: `integer`):

Maximum availability dates to keep per restaurant (0 = all returned dates).

## `partySize` (type: `integer`):

Number of diners used when requesting the availability calendar.

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

How many restaurants to enrich in parallel (details, reviews, and calendar). Each request rotates a proxy session.

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

Proxy settings. Residential proxies are recommended.

## Actor input object example

```json
{
  "searchQueries": [
    "Hamburg"
  ],
  "startUrls": [
    {
      "url": "https://www.thefork.de/restaurants/hamburg-c205324"
    }
  ],
  "maxItems": 10,
  "scrapeRestaurantDetails": false,
  "scrapeReviews": false,
  "maxReviews": 10,
  "scrapeCalendar": false,
  "maxCalendarDates": 10,
  "partySize": 2,
  "maxConcurrency": 5,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `results` (type: `string`):

Dataset containing one row per restaurant, with nested details, reviews, and calendar fields

## `runStats` (type: `string`):

Key-value store record with record counts and run timestamps

# 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 = {
    "searchQueries": [
        "Hamburg"
    ],
    "startUrls": [
        {
            "url": "https://www.thefork.de/restaurants/hamburg-c205324"
        }
    ],
    "maxItems": 10,
    "scrapeRestaurantDetails": false,
    "scrapeReviews": false,
    "maxReviews": 10,
    "scrapeCalendar": false,
    "maxCalendarDates": 10,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("datascrapers/thefork-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 = {
    "searchQueries": ["Hamburg"],
    "startUrls": [{ "url": "https://www.thefork.de/restaurants/hamburg-c205324" }],
    "maxItems": 10,
    "scrapeRestaurantDetails": False,
    "scrapeReviews": False,
    "maxReviews": 10,
    "scrapeCalendar": False,
    "maxCalendarDates": 10,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("datascrapers/thefork-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 '{
  "searchQueries": [
    "Hamburg"
  ],
  "startUrls": [
    {
      "url": "https://www.thefork.de/restaurants/hamburg-c205324"
    }
  ],
  "maxItems": 10,
  "scrapeRestaurantDetails": false,
  "scrapeReviews": false,
  "maxReviews": 10,
  "scrapeCalendar": false,
  "maxCalendarDates": 10,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call datascrapers/thefork-scraper --silent --output-dataset

```

## MCP server setup

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