Skip to the content
EnrichedNowDocs

    Type to search every page.

    Menu

    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.

    Inputs of thefork.search
    FieldTypeDescription
    cityrequiredstringThe 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.
    pageintegerThe page of the list, from 1 to 14. A page holds up to 25 restaurants.Limit: 1 to 14. Default: 1.
    max_resultsintegerReturn 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 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.

    Record fields of thefork.search
    FieldTypeNotes
    restaurant_idintegerTheFork's id of the restaurant: the number after -r in its page's address.
    namestringThe restaurant's name.
    urlstringThe restaurant's page on TheFork.
    cuisinestring or nullThe restaurant's main cuisine, e.g. French.
    addressstring or nullThe street address.
    postal_codestring or nullThe postal code.
    citystring or nullThe city, as the address writes it.
    countrystring or nullThe country.
    latitudenumber or nullThe latitude, in decimal degrees.
    longitudenumber or nullThe longitude.
    ratingnumber or nullTheFork's rating, out of 10. Null for a restaurant not rated yet.
    review_countinteger or nullHow many ratings it is of.
    average_pricenumber or nullThe average price of a meal, as the restaurant states it, in currency.
    currencystring or nullThe currency of the prices, an ISO 4217 code such as EUR.
    top_chart_rankinteger or nullThe restaurant's place in TheFork's chart of the city's top 100, when it is in it.
    bookableboolean or nullTrue when a table can be booked through TheFork.
    uuidstring or nullTheFork's other, long id of the restaurant.
    distinctionsarray of objectThe distinctions the card shows: a MICHELIN award, TheFork's own marks.
    label (in distinctions[])stringThe distinction as TheFork names it: MICHELIN, INSIDER, TOPHOST, TOPCHART, NEW, …
    kind (in distinctions[])string or nullIts grade where it has one, e.g. MICHELIN_1_star, or the text shown with it.
    rank (in distinctions[])integer or nullThe restaurant's place in TheFork's chart of the city, for TOPCHART.
    payment_methodsarray of stringThe means of payment the restaurant accepts, as TheFork lists them.
    price_rangeinteger or nullTheFork's price band, 1 (cheapest) to 4.
    offersarray of stringThe offers the card shows, e.g. a discount on the bill or TheFork's loyalty points.
    booked_todayinteger or nullHow many times the card says the restaurant was booked today.
    tagsarray of stringTheFork's tags on the restaurant: cuisines, dishes, area, features and occasions.
    imagestring or nullThe restaurant's main photo.
    positionintegerThe restaurant's position on the page, from 1.
    pageintegerThe page it was on.
    fetched_atstring (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:

    JSON
    {
      "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 lists every status and the reasons every scraper shares; the reasons of the TheFork scrapers are in their own section there.