Scraper APITheFork
thefork.search
The restaurants on a page of TheFork's list for a city: address, cuisine, rating, average price, offers and distinctions.
- 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; what a run costs is in Usage and units.
Inputs
The fields of input. A field that is not listed here is refused.
| Field | Type | Description |
|---|---|---|
cityrequired | string | 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 | 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 | Return at most this many restaurants of the page; all of them when not given.Limit: 1 to 25. |
cityis the number after-cin the address of the city's page on TheFork (thefork.com/restaurants/paris-c415144is415144), or that address. An id TheFork has no city under endsfailedwithunknown_city.- One run reads one page, up to 25 restaurants, in TheFork's own order.
pagegoes from1to14; a page past the last one of a small town endsokwith zero records. ratingis out of 10.average_priceis the price of an average meal as the restaurant states it, incurrency.distinctionsare the marks the card shows: a MICHELIN award (its grade inkind),INSIDER,TOPHOST,NEW, andTOPCHARTwith the restaurant'srankin the city.- Pass a record's
restaurant_idtothefork.restaurantfor 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. |
label (in distinctions[]) | string | The distinction as TheFork names it: MICHELIN, INSIDER, TOPHOST, TOPCHART, NEW, … |
kind (in distinctions[]) | string or null | Its grade where it has one, e.g. MICHELIN_1_star, or the text shown with it. |
rank (in distinctions[]) | 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
# Start a run and wait up to 60 seconds for it to finish
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"}}'
# Read its records, with the id the first call answered
curl "https://api.enrichednow.com/v1/runs/$RUN_ID/records?limit=100" \
-H "Authorization: Bearer $ENRICHEDNOW_API_KEY"from enrichednow import EnrichedNow
client = EnrichedNow() # reads ENRICHEDNOW_API_KEY
# Start a run, wait for it to end, and get its records
result = client.scrape("thefork.search", {"city": "415144"})
print(result.run.id, result.run.status, result.run.record_count)
# Read its records: pages are fetched as you go
for record in result.records:
print(record)Install it with pip install enrichednow, then save as run.py and run python3 run.py
import EnrichedNow from "enrichednow";
const client = new EnrichedNow(); // reads ENRICHEDNOW_API_KEY
// Start a run, wait for it to end, and get its records
const { run, records } = await client.scrape("thefork.search", { city: "415144" });
console.log(run.id, run.status, run.record_count);
// Read its records: pages are fetched as you go
for await (const record of records) console.log(record);Install it with npm install enrichednow, then save as run.mjs and run node run.mjs
package main
import (
"context"
"fmt"
"log"
"time"
enrichednow "github.com/enrichednow/enrichednow-go"
)
func main() {
client, err := enrichednow.NewClient() // reads ENRICHEDNOW_API_KEY
if err != nil {
log.Fatal(err)
}
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Minute)
defer cancel()
// Start a run, wait for it to end, and get its records
run, records, err := client.Scrape(ctx, "thefork.search", map[string]any{"city": "415144"})
if err != nil {
log.Fatal(err)
}
fmt.Println(run.ID, run.Status, run.RecordCount)
// Read its records: pages are fetched as you go
for records.Next() {
fmt.Println(string(records.Current()))
}
if err := records.Err(); err != nil {
log.Fatal(err)
}
}Install it with go get github.com/enrichednow/enrichednow-go@latest, then save as run.go and run go run run.go
import com.enrichednow.EnrichedNowClient;
import com.enrichednow.ScrapeResult;
import java.util.Map;
public class Run {
public static void main(String[] args) {
EnrichedNowClient client = EnrichedNowClient.fromEnv(); // reads ENRICHEDNOW_API_KEY
// Start a run, wait for it to end, and get its records
ScrapeResult result = client.scrape("thefork.search", Map.of("city", "415144"));
System.out.println(result.run().id() + " " + result.run().status() + " " + result.run().recordCount());
// Read its records: pages are fetched as you go
for (Map<String, Object> record : result.records()) {
System.out.println(record);
}
}
}Add com.enrichednow:enrichednow-java:0.4.0 to your Maven or Gradle build, then save as Run.java
enrichednow run thefork.search --input-json '{"city":"415144"}'Install it with curl -fsSL https://raw.githubusercontent.com/enrichednow/enrichednow-cli/main/install.sh | sh
It starts a run with this scraper’s example input, waits for it to finish and reads its records a page at a time. The key is read from ENRICHEDNOW_API_KEY.
The body on its own:
{
"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.
{
"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.
{
"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 lists every status and the reasons every scraper shares; the reasons of the TheFork scrapers are in their own section there.