{
  "openapi": "3.0.1",
  "info": {
    "title": "TheFork Scraper - Restaurants, Menus & Reviews",
    "description": "Extract restaurant data from TheFork: ratings, menus with prices, reviews, photos, cuisine tags, and booking info. Search any city or scrape specific restaurant URLs.",
    "version": "1.1",
    "x-build-id": "tFvjIcT4Xc7as0DNy"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/parsebird~thefork-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-parsebird-thefork-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/parsebird~thefork-scraper/runs": {
      "post": {
        "operationId": "runs-sync-parsebird-thefork-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/parsebird~thefork-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-parsebird-thefork-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": {
          "searchLocation": {
            "title": "Search location",
            "type": "string",
            "description": "City, neighborhood, or address to search on TheFork. Typos and non-English names are resolved automatically. Ignored if Start URLs is filled in."
          },
          "searchRadiusKm": {
            "title": "Search radius (km)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Radius around the location, in kilometers. Only applies to small towns/villages without their own TheFork city page — large cities always use their full city area.",
            "default": 10
          },
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "TheFork restaurant, city, or search-result URLs to scrape directly, e.g. https://www.thefork.com/restaurant/l-imperatif-r660609 or https://www.thefork.com/restaurants/paris-c415144. Overrides Search location when filled in.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "language": {
            "title": "Output language",
            "enum": [
              "en",
              "fr",
              "de",
              "it",
              "es"
            ],
            "type": "string",
            "description": "Which TheFork domain to scrape and which language the restaurant descriptions, tags, and UI text come back in.",
            "default": "en"
          },
          "reviewLanguage": {
            "title": "Review language",
            "enum": [
              "all",
              "en",
              "fr",
              "de",
              "it",
              "es",
              "nl",
              "pt"
            ],
            "type": "string",
            "description": "Only fetch reviews written in this language. 'All languages' returns every review regardless of language.",
            "default": "all"
          },
          "sort": {
            "title": "Sort restaurants by",
            "enum": [
              "popularity",
              "avgRate",
              "quality",
              "promotion",
              "newRestaurant",
              "price",
              "lastMonthAvg",
              "lastMonthReservation"
            ],
            "type": "string",
            "description": "Order search results are returned in.",
            "default": "popularity"
          },
          "bestRated": {
            "title": "Only top-rated restaurants",
            "type": "boolean",
            "description": "Keep only restaurants TheFork marks as Top Rated.",
            "default": false
          },
          "promotionsOnly": {
            "title": "Only restaurants with active promotions",
            "type": "boolean",
            "description": "Keep only restaurants that currently have a TheFork discount or special offer active.",
            "default": false
          },
          "minPrice": {
            "title": "Minimum average price",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum average price per person, in the local currency (e.g. EUR)."
          },
          "maxPrice": {
            "title": "Maximum average price",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum average price per person, in the local currency (e.g. EUR)."
          },
          "minRating": {
            "title": "Minimum TheFork rating",
            "minimum": 1,
            "maximum": 10,
            "type": "number",
            "description": "Minimum TheFork rating, on a 1-10 scale."
          },
          "maxRating": {
            "title": "Maximum TheFork rating",
            "minimum": 1,
            "maximum": 10,
            "type": "number",
            "description": "Maximum TheFork rating, on a 1-10 scale."
          },
          "cuisineTagIds": {
            "title": "Cuisine",
            "type": "array",
            "description": "Keep only restaurants matching at least one of the selected cuisines.",
            "items": {
              "type": "string",
              "enum": [
                "428",
                "434",
                "387",
                "436",
                "401",
                "391",
                "896",
                "460",
                "451",
                "389",
                "789",
                "393",
                "452",
                "471",
                "465",
                "450",
                "390",
                "459",
                "385",
                "394",
                "485",
                "444",
                "466",
                "432",
                "2375",
                "468",
                "791",
                "458",
                "398",
                "453",
                "435",
                "399"
              ],
              "enumTitles": [
                "European",
                "French",
                "Asian",
                "Italian",
                "Traditional cuisine",
                "Japanese",
                "Pizzeria",
                "Middle Eastern",
                "Indian",
                "Chinese",
                "Mediterranean",
                "Thai",
                "South American",
                "International",
                "Lebanese",
                "Fusion",
                "Korean",
                "American",
                "African",
                "Vietnamese",
                "Vegetarian",
                "Crêperie",
                "Moroccan",
                "Spanish",
                "Vegan",
                "Turkish",
                "Seafood",
                "Peruvian",
                "Caribbean",
                "Argentinian",
                "Greek",
                "Creole"
              ]
            },
            "default": []
          },
          "maxRestaurants": {
            "title": "Max restaurants",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum number of restaurants to scrape. Set to 0 for unlimited (every matching result). Ignored when Start URLs contains restaurant URLs directly.",
            "default": 5
          },
          "maxReviews": {
            "title": "Max reviews per restaurant",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum reviews to fetch per restaurant, newest first (0 to skip). TheFork's restaurant page reliably exposes its ~20 most recent reviews; the actor pages for more up to this limit, but most restaurants will return around 20 regardless of a higher setting. You are only charged for reviews actually returned -- see Pricing in the README.",
            "default": 5
          },
          "maxPhotos": {
            "title": "Max customer photos per restaurant",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum customer-submitted photos to include per restaurant. Official restaurant photos are always included regardless of this setting. Set to 0 to skip customer photos.",
            "default": 5
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "TheFork blocks direct traffic. Apify's UNBLOCKER proxy group is enabled by default and handles this without needing a browser -- you shouldn't need to change it.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "UNBLOCKER"
              ]
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}