{
  "openapi": "3.0.1",
  "info": {
    "title": "TheFork Scraper - Restaurants, Reviews & Menus",
    "description": "Extract restaurant data, reviews, menus with prices, and photos from TheFork. Get ratings, Michelin stars, TripAdvisor scores, contact details, booking availability, and 100+ fields. Supports 5 languages. Export as JSON, CSV, Excel.",
    "version": "0.0",
    "x-build-id": "0rTmxuj2Vg5pyBkV7"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/clearpath~thefork-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-clearpath-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/clearpath~thefork-scraper/runs": {
      "post": {
        "operationId": "runs-sync-clearpath-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/clearpath~thefork-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-clearpath-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": {
          "startUrls": {
            "title": "TheFork URLs",
            "type": "array",
            "description": "TheFork URLs to scrape. Supports restaurant pages, city pages, and search URLs with embedded filters. Mix types freely.",
            "items": {
              "type": "string"
            }
          },
          "searchLocation": {
            "title": "Search location",
            "type": "string",
            "description": "Alternative to URLs. City, neighborhood, or address. Typos and non-English names work fine (e.g. \"Barclona\", \"Milano\").<br><br>Ignored when URLs are provided above."
          },
          "language": {
            "title": "Language",
            "enum": [
              "en",
              "fr",
              "de",
              "it",
              "es"
            ],
            "type": "string",
            "description": "Controls the language of descriptions, cuisine names, tags, and reviews. Also determines the TheFork domain used.",
            "default": "en"
          },
          "reviewLanguage": {
            "title": "Review language",
            "enum": [
              "all",
              "en",
              "fr",
              "de",
              "it",
              "es",
              "nl",
              "pt"
            ],
            "type": "string",
            "description": "Filter reviews by language. \"Default\" returns reviews in the language matching your selected domain.",
            "default": "all"
          },
          "includeReviews": {
            "title": "Include reviews",
            "type": "boolean",
            "description": "Fetch reviews for each restaurant. Turn off to skip reviews entirely and speed up scraping.",
            "default": true
          },
          "sort": {
            "title": "Sort by",
            "enum": [
              "popularity",
              "avgRate",
              "quality",
              "promotion",
              "newRestaurant",
              "price",
              "lastMonthAvg",
              "lastMonthReservation"
            ],
            "type": "string",
            "description": "Sort order for search results. Only applies to location-based searches, not to URLs.",
            "default": "popularity"
          },
          "bestRated": {
            "title": "Best rated only",
            "type": "boolean",
            "description": "Only return top-rated restaurants.",
            "default": false
          },
          "promotionsOnly": {
            "title": "Promotions only",
            "type": "boolean",
            "description": "Only return restaurants with active promotions or deals.",
            "default": false
          },
          "minPrice": {
            "title": "Min average price",
            "minimum": 1,
            "type": "integer",
            "description": "Minimum average price per person in euros. Leave empty for no minimum."
          },
          "maxPrice": {
            "title": "Max average price",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum average price per person in euros. Leave empty for no maximum."
          },
          "minRating": {
            "title": "Min rating",
            "minimum": 1,
            "maximum": 10,
            "type": "number",
            "description": "Minimum TheFork rating (1-10 scale). Leave empty for no minimum."
          },
          "maxRating": {
            "title": "Max rating",
            "minimum": 1,
            "maximum": 10,
            "type": "number",
            "description": "Maximum TheFork rating (1-10 scale). Leave empty for no maximum."
          },
          "cuisineTagIds": {
            "title": "Cuisine types",
            "type": "array",
            "description": "Filter by cuisine type. Select one or more. Leave empty for all cuisines.",
            "items": {
              "type": "string",
              "enum": [
                "459",
                "453",
                "387",
                "2143",
                "431",
                "430",
                "406",
                "389",
                "2139",
                "428",
                "895",
                "434",
                "450",
                "429",
                "451",
                "471",
                "436",
                "391",
                "789",
                "460",
                "458",
                "896",
                "437",
                "791",
                "452",
                "432",
                "393",
                "401",
                "468",
                "2375",
                "485",
                "394"
              ],
              "enumTitles": [
                "American",
                "Argentinian",
                "Asian",
                "Austrian",
                "Belgian",
                "British",
                "Catalan",
                "Chinese",
                "Dutch",
                "European",
                "Franco-Belgian",
                "French",
                "Fusion",
                "German",
                "Indian",
                "International",
                "Italian",
                "Japanese",
                "Mediterranean",
                "Middle Eastern",
                "Peruvian",
                "Pizzeria",
                "Portuguese",
                "Seafood",
                "South American",
                "Spanish",
                "Thai",
                "Traditional cuisine",
                "Turkish",
                "Vegan cuisine",
                "Vegetarian",
                "Vietnamese"
              ]
            },
            "default": []
          },
          "maxRestaurants": {
            "title": "Max restaurants (0 = unlimited)",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum restaurants to scrape. Set to <code>0</code> for no limit. Applies to both search results and direct restaurant URLs.",
            "default": 100
          },
          "maxReviews": {
            "title": "Max reviews per restaurant (0 = all)",
            "minimum": 0,
            "type": "integer",
            "description": "Reviews per restaurant, newest first. Set to <code>0</code> to get all reviews.",
            "default": 100
          },
          "maxPhotos": {
            "title": "Max customer photos per restaurant (0 = all)",
            "minimum": 0,
            "type": "integer",
            "description": "Customer photos per restaurant, paginated. Official restaurant photos (~19) are always included. Set to <code>0</code> to get all customer photos.",
            "default": 20
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}