# thefork.search

The restaurants on a page of TheFork's list for a city: address, cuisine, rating, average price, offers and distinctions.

TheFork restaurants in a city, one of the TheFork scrapers.

| | |
| --- | --- |
| Id | `thefork.search` |
| Version | 1 |
| Billed per | request — 1 unit for a charged run |
| Runs | within one request |

Start it with `POST /v1/scrapers/thefork.search/runs`. How runs work is in [Running a scraper](https://docs.enrichednow.com/running-a-scraper.md); what a run costs is in [Usage and units](https://docs.enrichednow.com/usage-and-units.md).

## Inputs

The fields of `input`. A field that is not listed here is refused.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `city` | string | yes | The city, as TheFork's id of it (`415144` for Paris) or the address of its page on TheFork (`https://www.thefork.com/restaurants/paris-c415144`). Limit: at least 1 characters, at most 300 characters. |
| `page` | integer | no | The page of the list, from 1 to 14. A page holds up to 25 restaurants. Limit: 1 to 14. Default: `1`. |
| `max_results` | integer | no | Return at most this many restaurants of the page; all of them when not given. Limit: 1 to 25. |

- `city` is the number after `-c` in the address of the city's page on TheFork (`thefork.com/restaurants/paris-c415144` is `415144`), or that address. An id TheFork has no city under ends `failed` with `unknown_city`.
- One run reads one page, up to 25 restaurants, in TheFork's own order. `page` goes from `1` to `14`; a page past the last one of a small town ends `ok` with zero records.
- `rating` is out of 10. `average_price` is the price of an average meal as the restaurant states it, in `currency`.
- `distinctions` are the marks the card shows: a MICHELIN award (its grade in `kind`), `INSIDER`, `TOPHOST`, `NEW`, and `TOPCHART` with the restaurant's `rank` in the city.
- Pass a record's `restaurant_id` to [`thefork.restaurant`](https://docs.enrichednow.com/scrapers/thefork.restaurant.md) for the menu, the opening hours and the ratings for food, service and ambience.

## Record fields

Every record of a run has these fields. A value that is not known is `null` — never an empty string and never `0`.

| Field | Type | Notes |
| --- | --- | --- |
| `restaurant_id` | integer | TheFork's id of the restaurant: the number after `-r` in its page's address. |
| `name` | string | The restaurant's name. |
| `url` | string | The restaurant's page on TheFork. |
| `cuisine` | string or null | The restaurant's main cuisine, e.g. `French`. |
| `address` | string or null | The street address. |
| `postal_code` | string or null | The postal code. |
| `city` | string or null | The city, as the address writes it. |
| `country` | string or null | The country. |
| `latitude` | number or null | The latitude, in decimal degrees. |
| `longitude` | number or null | The longitude. |
| `rating` | number or null | TheFork's rating, out of 10. Null for a restaurant not rated yet. |
| `review_count` | integer or null | How many ratings it is of. |
| `average_price` | number or null | The average price of a meal, as the restaurant states it, in `currency`. |
| `currency` | string or null | The currency of the prices, an ISO 4217 code such as `EUR`. |
| `top_chart_rank` | integer or null | The restaurant's place in TheFork's chart of the city's top 100, when it is in it. |
| `bookable` | boolean or null | True when a table can be booked through TheFork. |
| `uuid` | string or null | TheFork's other, long id of the restaurant. |
| `distinctions` | array of object | The distinctions the card shows: a MICHELIN award, TheFork's own marks. |
| `distinctions[].label` | string | The distinction as TheFork names it: `MICHELIN`, `INSIDER`, `TOPHOST`, `TOPCHART`, `NEW`, … |
| `distinctions[].kind` | string or null | Its grade where it has one, e.g. `MICHELIN_1_star`, or the text shown with it. |
| `distinctions[].rank` | integer or null | The restaurant's place in TheFork's chart of the city, for `TOPCHART`. |
| `payment_methods` | array of string | The means of payment the restaurant accepts, as TheFork lists them. |
| `price_range` | integer or null | TheFork's price band, 1 (cheapest) to 4. |
| `offers` | array of string | The offers the card shows, e.g. a discount on the bill or TheFork's loyalty points. |
| `booked_today` | integer or null | How many times the card says the restaurant was booked today. |
| `tags` | array of string | TheFork's tags on the restaurant: cuisines, dishes, area, features and occasions. |
| `image` | string or null | The restaurant's main photo. |
| `position` | integer | The restaurant's position on the page, from 1. |
| `page` | integer | The page it was on. |
| `fetched_at` | string (date-time) | When the page was read, in UTC. |

## Example request

It starts a run with this scraper's example input and waits up to 60 seconds for it. The key is read from `ENRICHEDNOW_API_KEY`.

```bash
curl -X POST "https://api.enrichednow.com/v1/scrapers/thefork.search/runs?wait=60" \
  -H "Authorization: Bearer $ENRICHEDNOW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"input":{"city":"415144"}}'
```

## Example response

The run, once it has ended. A run that has not ended within `wait` comes back with `202` and the status `queued` or `running`.

```json
{
  "id": "run_841742f37553189ff9c27ba1",
  "scraper_id": "thefork.search",
  "scraper_version": 1,
  "status": "ok",
  "reason": null,
  "input": {
    "city": "415144"
  },
  "record_count": 1,
  "units": 1,
  "units_per_request": 1,
  "units_per_record": null,
  "units_per_page": null,
  "diagnostics": {
    "requests": 1,
    "bytes": 259214,
    "wall_ms": 885,
    "facts": {}
  },
  "created_at": "2026-11-16T22:37:50.170950Z",
  "started_at": "2026-11-16T22:37:50.178331Z",
  "finished_at": "2026-11-16T22:37:51.066313Z"
}
```

Its records, from `GET /v1/runs/{id}/records`. The record is a real one: this scraper's own parser read it from a page recorded from the site.

```json
{
  "records": [
    {
      "restaurant_id": 122,
      "name": "La Grande Cascade",
      "url": "https://www.thefork.com/restaurant/la-grande-cascade-r122",
      "cuisine": "French",
      "address": "Bois de Boulogne, allée de Longchamp",
      "postal_code": "75016",
      "city": "Paris",
      "country": "France",
      "latitude": 48.86379,
      "longitude": 2.24011,
      "rating": 9.6,
      "review_count": 5779,
      "average_price": 200,
      "currency": "EUR",
      "top_chart_rank": 52,
      "bookable": true,
      "uuid": "27f03599-3039-41a7-9a7e-36cb359eff77",
      "distinctions": [
        {
          "label": "MICHELIN",
          "kind": "MICHELIN_1_star",
          "rank": null
        },
        {
          "label": "TOPCHART",
          "kind": null,
          "rank": 52
        }
      ],
      "payment_methods": [
        "Credit Card",
        "Mastercard",
        "TheFork Pay"
      ],
      "price_range": 4,
      "offers": [
        "Up to -40%",
        "Yums x2"
      ],
      "booked_today": 7,
      "tags": [
        "Paris 16th",
        "INSIDER",
        "SELECTION INSIDER - Gourmet tables"
      ],
      "image": "https://cdn.thefork.com/tf-lab/image/upload/restaurant/27f03599-3039-41a7-9a7e-36cb359eff77/aade8655-1779-47bc-96f5-1bd402c4597f.jpg",
      "position": 7,
      "page": 1,
      "fetched_at": "2026-11-19T18:07:41.440604Z"
    }
  ],
  "next_cursor": null
}
```

What was done to the record for this page, and nothing else — the API returns every value whole. A text that was cut ends with `… [truncated]`.

- Shortened: `payment_methods`: 5 items, the first 3 shown.
- Shortened: `tags`: 40 items, the first 3 shown.

A run does not always end `ok`. [Results and statuses](https://docs.enrichednow.com/results-and-statuses.md#reason-codes) lists every status and the reasons every scraper shares; [the reasons of the TheFork scrapers](https://docs.enrichednow.com/results-and-statuses.md#thefork) are in their own section there.
