# Thefork Restaurants Search Scraper (`stealth_mode/thefork-restaurants-search-scraper`) Actor

Scrape restaurant listings from TheFork.com search pages with ease. Collect names, ratings, cuisine types, pricing, photos, geolocation, booking availability, and 20+ fields per restaurant — perfect for market research and food industry analytics.

- **URL**: https://apify.com/stealth\_mode/thefork-restaurants-search-scraper.md
- **Developed by:** [Stealth mode](https://apify.com/stealth_mode) (community)
- **Categories:** Automation, Developer tools, Travel
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.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.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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

## TheFork.com Restaurant Scraper: Extract Search & Listing Data

---

### What Is TheFork.com?

TheFork (formerly LaFourchette) is one of Europe's leading restaurant discovery and reservation platforms, covering thousands of venues across France, Spain, Italy, and beyond. It aggregates user reviews, pricing, cuisine types, and real-time booking availability — making it a valuable data source for hospitality analysts, food tech developers, and market researchers. Manually collecting this data at scale is impractical; the **TheFork Restaurant Scraper** automates the entire process.

---

### Overview

The **TheFork.com Restaurants Search Scraper** crawls restaurant listing pages — such as city or cuisine search results — and extracts structured data for each venue. It is designed for:

- **Market researchers** analyzing restaurant density, pricing, or cuisine trends by city
- **Food tech developers** building recommendation engines or aggregator tools
- **Hospitality consultants** benchmarking competitors in specific markets
- **Data analysts** studying review patterns and loyalty program adoption

Key features include configurable item limits, multi-URL support, and resilient error handling via `ignore_url_failures`.

---

### Input Format

The scraper accepts a simple JSON configuration:

```json
{
  "ignore_url_failures": true,
  "max_items_per_url": 200,
  "urls": [
    "https://www.thefork.com/restaurants/paris-c415144?p=2"
  ]
}
````

| Field | Type | Default | Description |
|---|---|---|---|
| `urls` | `array` | — | One or more TheFork restaurant search/listing page URLs to scrape. Supports city pages, cuisine filters, and paginated results (e.g., `?p=2`). Add URLs one by one or via bulk edit. |
| `max_items_per_url` | `integer` | `20` | Maximum number of restaurant records to collect per URL. Increase up to the page's available listings (e.g., `200` for large city pages). |
| `ignore_url_failures` | `boolean` | `true` | If `true`, the scraper skips failed URLs and continues instead of stopping the entire run. Recommended for bulk jobs. |

> **Tip:** To scrape multiple pages of a city, add each paginated URL separately — e.g., `?p=1`, `?p=2`, `?p=3`.

***

### Output Format

**Sample output**

```json
{
  "address": {
    "__typename": "RestaurantAddress",
    "country": "France",
    "locality": "Paris",
    "street": "15 Rue de la Villette",
    "zip_code": "75019"
  },
  "reviews_summary": null,
  "aggregate_ratings": {
    "__typename": "RestaurantAggregateRatings",
    "thefork": {
      "__typename": "RestaurantAggregateRatingsValues",
      "rating_value": 9.5,
      "review_count": 1536
    }
  },
  "attributes": {
    "__typename": "Attributes",
    "deals": [
      {
        "__typename": "Deal",
        "description": null,
        "label": "Up to -30%",
        "short_label": "-30%",
        "type": "CLASSIC_OFFER"
      },
      {
        "__typename": "Deal",
        "description": null,
        "label": "Yums x2",
        "short_label": null,
        "type": "SUPER_YUMS"
      }
    ],
    "distance_from_geolocation": null,
    "distinctions": [
      {
        "__typename": "TopHostDistinction",
        "label": "TOPHOST"
      }
    ],
    "formatted_address": "15 Rue de la Villette, 75019, Paris",
    "formatted_short_address": "75019, Paris",
    "partnership": []
  },
  "geolocation": {
    "__typename": "Coordinate",
    "latitude": 48.8754732,
    "longitude": 2.3873058
  },
  "has_loyalty_program": false,
  "tags": [
    {
      "__typename": "RestaurantTag",
      "id": "311",
      "name": "American Express",
      "category": {
        "__typename": "RestaurantTagCategory",
        "id": "5"
      },
      "is_published": true
    },
    {
      "__typename": "RestaurantTag",
      "id": "314",
      "name": "Mastercard",
      "category": {
        "__typename": "RestaurantTagCategory",
        "id": "5"
      },
      "is_published": true
    },
    {
      "__typename": "RestaurantTag",
      "id": "4367",
      "name": "TheFork Pay",
      "category": {
        "__typename": "RestaurantTagCategory",
        "id": "5"
      },
      "is_published": true
    },
    {
      "__typename": "RestaurantTag",
      "id": "2699",
      "name": "UnionPay",
      "category": {
        "__typename": "RestaurantTagCategory",
        "id": "5"
      },
      "is_published": true
    },
    {
      "__typename": "RestaurantTag",
      "id": "315",
      "name": "Visa",
      "category": {
        "__typename": "RestaurantTagCategory",
        "id": "5"
      },
      "is_published": true
    },
    {
      "__typename": "RestaurantTag",
      "id": "545",
      "name": "Paris 19th",
      "category": {
        "__typename": "RestaurantTagCategory",
        "id": "19"
      },
      "is_published": true
    },
    {
      "__typename": "RestaurantTag",
      "id": "1505",
      "name": "LP boost",
      "category": {
        "__typename": "RestaurantTagCategory",
        "id": "14"
      },
      "is_published": true
    },
    {
      "__typename": "RestaurantTag",
      "id": "644",
      "name": "Trip Advisor",
      "category": {
        "__typename": "RestaurantTagCategory",
        "id": "14"
      },
      "is_published": true
    },
    {
      "__typename": "RestaurantTag",
      "id": "457",
      "name": "Mexican",
      "category": {
        "__typename": "RestaurantTagCategory",
        "id": "12"
      },
      "is_published": true
    },
    {
      "__typename": "RestaurantTag",
      "id": "452",
      "name": "South American",
      "category": {
        "__typename": "RestaurantTagCategory",
        "id": "12"
      },
      "is_published": true
    },
    {
      "__typename": "RestaurantTag",
      "id": "336",
      "name": "Gluten free",
      "category": {
        "__typename": "RestaurantTagCategory",
        "id": "8"
      },
      "is_published": true
    },
    {
      "__typename": "RestaurantTag",
      "id": "2155",
      "name": "Lactose intolerance",
      "category": {
        "__typename": "RestaurantTagCategory",
        "id": "8"
      },
      "is_published": true
    },
    {
      "__typename": "RestaurantTag",
      "id": "2107",
      "name": "Vegan dishes",
      "category": {
        "__typename": "RestaurantTagCategory",
        "id": "8"
      },
      "is_published": true
    },
    {
      "__typename": "RestaurantTag",
      "id": "470",
      "name": "Vegetarian dishes",
      "category": {
        "__typename": "RestaurantTagCategory",
        "id": "8"
      },
      "is_published": true
    },
    {
      "__typename": "RestaurantTag",
      "id": "2565",
      "name": "Burrito",
      "category": {
        "__typename": "RestaurantTagCategory",
        "id": "6"
      },
      "is_published": true
    },
    {
      "__typename": "RestaurantTag",
      "id": "658",
      "name": "Ceviche",
      "category": {
        "__typename": "RestaurantTagCategory",
        "id": "6"
      },
      "is_published": true
    },
    {
      "__typename": "RestaurantTag",
      "id": "2284",
      "name": "Chicken",
      "category": {
        "__typename": "RestaurantTagCategory",
        "id": "6"
      },
      "is_published": true
    },
    {
      "__typename": "RestaurantTag",
      "id": "999",
      "name": "Salad",
      "category": {
        "__typename": "RestaurantTagCategory",
        "id": "6"
      },
      "is_published": true
    },
    {
      "__typename": "RestaurantTag",
      "id": "2613",
      "name": "Tacos",
      "category": {
        "__typename": "RestaurantTagCategory",
        "id": "6"
      },
      "is_published": true
    },
    {
      "__typename": "RestaurantTag",
      "id": "4337",
      "name": "Super YUMS",
      "category": {
        "__typename": "RestaurantTagCategory",
        "id": "16"
      },
      "is_published": true
    },
    {
      "__typename": "RestaurantTag",
      "id": "4339",
      "name": "YUMS x2",
      "category": {
        "__typename": "RestaurantTagCategory",
        "id": "16"
      },
      "is_published": true
    },
    {
      "__typename": "RestaurantTag",
      "id": "56",
      "name": "Buttes Chaumont - Belleville",
      "category": {
        "__typename": "RestaurantTagCategory",
        "id": "4"
      },
      "is_published": true
    },
    {
      "__typename": "RestaurantTag",
      "id": "86",
      "name": "Père Lachaise - Ménilmontant",
      "category": {
        "__typename": "RestaurantTagCategory",
        "id": "4"
      },
      "is_published": true
    },
    {
      "__typename": "RestaurantTag",
      "id": "5859",
      "name": "France",
      "category": {
        "__typename": "RestaurantTagCategory",
        "id": "20"
      },
      "is_published": true
    },
    {
      "__typename": "RestaurantTag",
      "id": "1752",
      "name": "Ile-de-France",
      "category": {
        "__typename": "RestaurantTagCategory",
        "id": "20"
      },
      "is_published": true
    },
    {
      "__typename": "RestaurantTag",
      "id": "350",
      "name": "Bar",
      "category": {
        "__typename": "RestaurantTagCategory",
        "id": "10"
      },
      "is_published": true
    },
    {
      "__typename": "RestaurantTag",
      "id": "2591",
      "name": "Cocktail",
      "category": {
        "__typename": "RestaurantTagCategory",
        "id": "10"
      },
      "is_published": true
    },
    {
      "__typename": "RestaurantTag",
      "id": "348",
      "name": "Dog-Friendly",
      "category": {
        "__typename": "RestaurantTagCategory",
        "id": "10"
      },
      "is_published": true
    },
    {
      "__typename": "RestaurantTag",
      "id": "359",
      "name": "English spoken",
      "category": {
        "__typename": "RestaurantTagCategory",
        "id": "10"
      },
      "is_published": true
    },
    {
      "__typename": "RestaurantTag",
      "id": "2133",
      "name": "Open in August",
      "category": {
        "__typename": "RestaurantTagCategory",
        "id": "10"
      },
      "is_published": true
    },
    {
      "__typename": "RestaurantTag",
      "id": "897",
      "name": "Open sunday",
      "category": {
        "__typename": "RestaurantTagCategory",
        "id": "10"
      },
      "is_published": true
    },
    {
      "__typename": "RestaurantTag",
      "id": "2287",
      "name": "Spanish spoken",
      "category": {
        "__typename": "RestaurantTagCategory",
        "id": "10"
      },
      "is_published": true
    },
    {
      "__typename": "RestaurantTag",
      "id": "375",
      "name": "Wifi",
      "category": {
        "__typename": "RestaurantTagCategory",
        "id": "10"
      },
      "is_published": true
    },
    {
      "__typename": "RestaurantTag",
      "id": "5349",
      "name": "Card payments accepted",
      "category": {
        "__typename": "RestaurantTagCategory",
        "id": "23"
      },
      "is_published": true
    },
    {
      "__typename": "RestaurantTag",
      "id": "5337",
      "name": "Contactless, digital or single use menus",
      "category": {
        "__typename": "RestaurantTagCategory",
        "id": "23"
      },
      "is_published": true
    },
    {
      "__typename": "RestaurantTag",
      "id": "5347",
      "name": "Extra cleaning services implemented at the tables, toilets and kitchen",
      "category": {
        "__typename": "RestaurantTagCategory",
        "id": "23"
      },
      "is_published": true
    },
    {
      "__typename": "RestaurantTag",
      "id": "5353",
      "name": "Food served only at the table",
      "category": {
        "__typename": "RestaurantTagCategory",
        "id": "23"
      },
      "is_published": true
    },
    {
      "__typename": "RestaurantTag",
      "id": "5325",
      "name": "Guest spacing 1m",
      "category": {
        "__typename": "RestaurantTagCategory",
        "id": "23"
      },
      "is_published": true
    },
    {
      "__typename": "RestaurantTag",
      "id": "5331",
      "name": "Hand sanitizer for customers",
      "category": {
        "__typename": "RestaurantTagCategory",
        "id": "23"
      },
      "is_published": true
    },
    {
      "__typename": "RestaurantTag",
      "id": "5333",
      "name": "Staff wearing masks & gloves",
      "category": {
        "__typename": "RestaurantTagCategory",
        "id": "23"
      },
      "is_published": true
    },
    {
      "__typename": "RestaurantTag",
      "id": "2293",
      "name": "Cosy",
      "category": {
        "__typename": "RestaurantTagCategory",
        "id": "11"
      },
      "is_published": true
    },
    {
      "__typename": "RestaurantTag",
      "id": "5779",
      "name": "Gift cards",
      "category": {
        "__typename": "RestaurantTagCategory",
        "id": "11"
      },
      "is_published": true
    },
    {
      "__typename": "RestaurantTag",
      "id": "1",
      "name": "Good for families",
      "category": {
        "__typename": "RestaurantTagCategory",
        "id": "11"
      },
      "is_published": true
    },
    {
      "__typename": "RestaurantTag",
      "id": "1467",
      "name": "Homemade cuisine",
      "category": {
        "__typename": "RestaurantTagCategory",
        "id": "11"
      },
      "is_published": true
    },
    {
      "__typename": "RestaurantTag",
      "id": "5777",
      "name": "Lunch",
      "category": {
        "__typename": "RestaurantTagCategory",
        "id": "11"
      },
      "is_published": true
    },
    {
      "__typename": "RestaurantTag",
      "id": "5",
      "name": "Romantic",
      "category": {
        "__typename": "RestaurantTagCategory",
        "id": "11"
      },
      "is_published": true
    },
    {
      "__typename": "RestaurantTag",
      "id": "6246",
      "name": "Top Host",
      "category": {
        "__typename": "RestaurantTagCategory",
        "id": "9"
      },
      "is_published": true
    },
    {
      "__typename": "RestaurantTag",
      "id": "2051",
      "name": "Valentine's Day",
      "category": {
        "__typename": "RestaurantTagCategory",
        "id": "9"
      },
      "is_published": true
    }
  ],
  "id": "739f155b-81d4-4fe9-b66b-5140c50de150",
  "is_bookable": true,
  "is_start_package": false,
  "legacy_id": 515549,
  "main_photo_url": "https://cdn.thefork.com/tf-lab/image/upload/restaurant/739f155b-81d4-4fe9-b66b-5140c50de150/25fc1e29-128d-4fb8-920c-1466194f36c1.jpg",
  "name": "Barrio Meshica Village Jourdain",
  "photos": [
    {
      "__typename": "RestaurantPhoto",
      "alt": null,
      "id": "25fc1e29-128d-4fb8-920c-1466194f36c1",
      "src": "https://cdn.thefork.com/tf-lab/image/upload/restaurant/739f155b-81d4-4fe9-b66b-5140c50de150/25fc1e29-128d-4fb8-920c-1466194f36c1.jpg"
    },
    {
      "__typename": "RestaurantPhoto",
      "alt": null,
      "id": "9bf3acb3-21ad-47df-b99a-0695755e3717",
      "src": "https://cdn.thefork.com/tf-lab/image/upload/restaurant/739f155b-81d4-4fe9-b66b-5140c50de150/9bf3acb3-21ad-47df-b99a-0695755e3717.jpg"
    },
    {
      "__typename": "RestaurantPhoto",
      "alt": null,
      "id": "5518f3ba-382d-44ed-931c-f2351ae7d390",
      "src": "https://cdn.thefork.com/tf-lab/image/upload/restaurant/739f155b-81d4-4fe9-b66b-5140c50de150/5518f3ba-382d-44ed-931c-f2351ae7d390.jpg"
    },
    {
      "__typename": "RestaurantPhoto",
      "alt": null,
      "id": "65e37238-e3ff-46b8-97aa-2b42d716c74a",
      "src": "https://cdn.thefork.com/tf-lab/image/upload/restaurant/739f155b-81d4-4fe9-b66b-5140c50de150/65e37238-e3ff-46b8-97aa-2b42d716c74a.jpg"
    },
    {
      "__typename": "RestaurantPhoto",
      "alt": null,
      "id": "2501575d-4914-4508-b3fe-6c388785e363",
      "src": "https://cdn.thefork.com/tf-lab/image/upload/restaurant/739f155b-81d4-4fe9-b66b-5140c50de150/2501575d-4914-4508-b3fe-6c388785e363.jpg"
    },
    {
      "__typename": "RestaurantPhoto",
      "alt": null,
      "id": "7de46f91-8fc6-4b10-a543-554d8f614cca",
      "src": "https://cdn.thefork.com/tf-lab/image/upload/restaurant/739f155b-81d4-4fe9-b66b-5140c50de150/7de46f91-8fc6-4b10-a543-554d8f614cca.jpg"
    },
    {
      "__typename": "RestaurantPhoto",
      "alt": null,
      "id": "2f6934c2-ad2c-4928-b377-470b4e293cb3",
      "src": "https://cdn.thefork.com/tf-lab/image/upload/restaurant/739f155b-81d4-4fe9-b66b-5140c50de150/2f6934c2-ad2c-4928-b377-470b4e293cb3.jpg"
    },
    {
      "__typename": "RestaurantPhoto",
      "alt": null,
      "id": "62ecd9d1-de43-423b-8b1b-66fdcb6731e4",
      "src": "https://cdn.thefork.com/tf-lab/image/upload/restaurant/739f155b-81d4-4fe9-b66b-5140c50de150/62ecd9d1-de43-423b-8b1b-66fdcb6731e4.jpg"
    }
  ],
  "payment_accepted": [
    "American Express",
    "Mastercard",
    "TheFork Pay",
    "UnionPay",
    "Visa"
  ],
  "price_range_level": 2,
  "avg_price": {
    "__typename": "Money",
    "currency": {
      "__typename": "Currency",
      "decimal_position": 2,
      "iso_currency": "EUR"
    },
    "value": 2300
  },
  "serves_cuisine": "Mexican",
  "slug": "barrio-meshica-village-jourdain",
  "top_chart": null,
  "has_reservations": {
    "__typename": "RestaurantReservationHistory",
    "today": 0
  },
  "from_url": "https://www.thefork.com/restaurants/paris-c415144?p=2"
}
```

Each restaurant returns a record with 21 fields:

#### Identity & Discovery

| Field | Meaning |
|---|---|
| `ID` | Unique TheFork internal identifier for the restaurant |
| `Legacy ID` | Older identifier retained for backward compatibility |
| `Name` | Restaurant display name as shown on the platform |
| `Slug` | URL-friendly version of the restaurant name used in permalinks |

#### Location & Contact

| Field | Meaning |
|---|---|
| `Address` | Full street address of the restaurant |
| `Geolocation` | Latitude and longitude coordinates — useful for map-based analysis |

#### Ratings & Reviews

| Field | Meaning |
|---|---|
| `Reviews Summary` | Aggregated review counts and score breakdown (e.g., total reviews, score distribution) |
| `Aggregate Ratings` | Overall rating score (typically on a scale used by TheFork, e.g., out of 10) |
| `Top Chart` | Whether the restaurant appears in TheFork's curated top charts or rankings |

#### Cuisine & Dining

| Field | Meaning |
|---|---|
| `Serves Cuisine` | Cuisine type(s) offered (e.g., French, Italian, Sushi) |
| `Tags` | Descriptive tags associated with the restaurant (e.g., "romantic", "business lunch", "terrace") |
| `Attributes` | Additional dining attributes such as ambiance, features, or awards |
| `Price Range Level` | Numeric price tier indicator (e.g., 1–4, from budget to luxury) |
| `Average Price` | Estimated average spend per person in local currency |
| `Payment Accepted` | Accepted payment methods (e.g., card types, cash) |

#### Media

| Field | Meaning |
|---|---|
| `Main Photo URL` | Primary listing image URL |
| `Photos` | Array of additional photo URLs for the venue |

#### Booking & Program Flags

| Field | Meaning |
|---|---|
| `Is Bookable` | Whether the restaurant accepts online reservations via TheFork |
| `Has Reservations` | Whether reservation data is available/active for this listing |
| `Has Loyalty Program` | Whether the restaurant participates in TheFork's loyalty/points program |
| `Is Start Package` | Indicates if the restaurant is on TheFork's entry-level subscription package |

***

### How to Use

1. **Find target pages** — Search for restaurants by city or cuisine on TheFork.com. Copy the search results URL (e.g., `https://www.thefork.com/restaurants/paris-c415144`).
2. **Add pagination if needed** — Append `?p=2`, `?p=3`, etc. for additional pages, adding each as a separate URL entry.
3. **Configure the input** — Set `max_items_per_url` to match how many results you need. The default is `20`; set higher (e.g., `200`) for large city pages.
4. **Enable `ignore_url_failures`** — Keeps bulk runs from stopping on a single bad URL.
5. **Run and export** — Download results as JSON, CSV, or Excel.

**Common issues:**

- Ensure URLs point to **search/listing pages**, not individual restaurant profile pages.
- If results are fewer than expected, the page may have fewer listings than `max_items_per_url` — this is normal.

***

### Use Cases & Business Value

- **City-level restaurant mapping:** Extract full venue lists with coordinates for geographic analysis
- **Pricing intelligence:** Compare average spend and price tiers across cuisines or neighborhoods
- **Review benchmarking:** Track aggregate ratings to identify market leaders
- **Booking trend analysis:** Filter bookable vs. non-bookable venues by region
- **Loyalty program research:** Identify adoption rates of TheFork's loyalty scheme across markets

***

### Conclusion

The **TheFork.com Restaurants Search Scraper** delivers structured, analysis-ready restaurant data from one of Europe's top dining platforms. With 21 output fields spanning location, ratings, pricing, media, and booking status, it provides everything needed to power market research, competitive analysis, or data-driven hospitality products. Configure your target city, set your item limit, and start extracting in minutes.

# Actor input Schema

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

Add the URLs of the restaurants list urls you want to scrape. You can paste URLs one by one, or use the Bulk edit section to add a prepared list.

## `ignore_url_failures` (type: `boolean`):

If true, the scraper will continue running even if some URLs fail to be scraped.

## `max_items_per_url` (type: `integer`):

The maximum number of items to scrape per URL.

## Actor input object example

```json
{
  "urls": [
    "https://www.thefork.com/restaurants/paris-c415144?p=2"
  ],
  "ignore_url_failures": true,
  "max_items_per_url": 20
}
```

# 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.thefork.com/restaurants/paris-c415144?p=2"
    ],
    "ignore_url_failures": true,
    "max_items_per_url": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("stealth_mode/thefork-restaurants-search-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.thefork.com/restaurants/paris-c415144?p=2"],
    "ignore_url_failures": True,
    "max_items_per_url": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("stealth_mode/thefork-restaurants-search-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 '{
  "urls": [
    "https://www.thefork.com/restaurants/paris-c415144?p=2"
  ],
  "ignore_url_failures": true,
  "max_items_per_url": 20
}' |
apify call stealth_mode/thefork-restaurants-search-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Thefork Restaurants Search Scraper",
        "description": "Scrape restaurant listings from TheFork.com search pages with ease. Collect names, ratings, cuisine types, pricing, photos, geolocation, booking availability, and 20+ fields per restaurant — perfect for market research and food industry analytics.",
        "version": "0.0",
        "x-build-id": "FqdC3OJXJrFjDhXaM"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/stealth_mode~thefork-restaurants-search-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-stealth_mode-thefork-restaurants-search-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/stealth_mode~thefork-restaurants-search-scraper/runs": {
            "post": {
                "operationId": "runs-sync-stealth_mode-thefork-restaurants-search-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/stealth_mode~thefork-restaurants-search-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-stealth_mode-thefork-restaurants-search-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "urls": {
                        "title": "URLs of the restaurants list urls to scrape",
                        "type": "array",
                        "description": "Add the URLs of the restaurants list urls you want to scrape. You can paste URLs one by one, or use the Bulk edit section to add a prepared list.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "ignore_url_failures": {
                        "title": "Continue running even if some URLs fail to be scraped",
                        "type": "boolean",
                        "description": "If true, the scraper will continue running even if some URLs fail to be scraped."
                    },
                    "max_items_per_url": {
                        "title": "Max items per URL",
                        "type": "integer",
                        "description": "The maximum number of items to scrape per URL."
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
