{
  "openapi": "3.0.1",
  "info": {
    "title": "TheFork Scraper - Restaurants, Discounts, Ratings & Prices",
    "description": "Scrape TheFork (LaFourchette, ElTenedor) restaurants by city or list URL on 12 sites: name, cuisine, address, coordinates, average price, rating, reviews, discounts (-30%, -50%), booking times, Michelin. Discounted-only mode checks each offer; monitors new restaurants and offers.",
    "version": "0.1",
    "x-build-id": "bmI00ThmE5tFmqUDU"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/amitaviv~thefork-restaurants-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-amitaviv-thefork-restaurants-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/amitaviv~thefork-restaurants-scraper/runs": {
      "post": {
        "operationId": "runs-sync-amitaviv-thefork-restaurants-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/amitaviv~thefork-restaurants-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-amitaviv-thefork-restaurants-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 list pages",
            "type": "array",
            "description": "City, district, cuisine, offers or region pages from any TheFork site, as you see them in your browser, e.g. https://www.thefork.fr/restaurants/paris-c415144, https://www.thefork.it/ristoranti/milano-c348156/promozioni, https://www.thefork.fr/restaurants/paris-c415144/11e-arrondissement-a537. Supported sites: thefork.fr, .it, .es, .co.uk, .com, .de, .nl, .be, .ch, .at, .pt, .se. Filters in the address after '?' are not applied. Give list pages, city names below, or both: at least one entry in either is required. Single restaurant pages and /search pages are refused.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "cities": {
            "title": "City names",
            "type": "array",
            "description": "Or type city names, written as on the chosen TheFork site (\"Lyon\", \"Milano\" on thefork.it, \"München\" on thefork.de). Looked up in the site's own city list; common English names (Brussels, Geneva, Munich, Milan, Rome, Lisbon, Vienna…) are also understood. A city TheFork has no page for is reported as failed. Empty by default.",
            "items": {
              "type": "string"
            }
          },
          "site": {
            "title": "TheFork site for city names",
            "enum": [
              "thefork.fr",
              "thefork.it",
              "thefork.es",
              "thefork.co.uk",
              "thefork.com",
              "thefork.de",
              "thefork.nl",
              "thefork.be",
              "thefork.ch",
              "thefork.at",
              "thefork.pt",
              "thefork.se"
            ],
            "type": "string",
            "description": "Which TheFork site the city names are looked up on (default thefork.fr). It also sets the language of cuisine names and tags. Ignored for pasted URLs, which keep their own site.",
            "default": "thefork.fr"
          },
          "offersOnly": {
            "title": "Only restaurants with a discount",
            "type": "boolean",
            "description": "Off by default. On: read TheFork's offers page of each city instead of the full list, and deliver only restaurants with a current percentage discount (such as -30% or TheFork Festival -50%). TheFork's list page leaves out the offer of a restaurant with no table left today, so each such restaurant is checked on its own restaurant page: its offer is added (offerSource \"restaurantPage\") or, if it has no discount, it is left out and not charged. Applies to city pages and city names; a pasted offers page is always read this way.",
            "default": false
          },
          "maxItemsPerQuery": {
            "title": "Max restaurants per city or URL",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Maximum number of restaurants to deliver for each city or URL, 1 to 20,000 (default 100; e.g. 1500 for all of a large city). TheFork lists 25 per page. You are charged only for delivered restaurants. A value outside 1 to 20,000 is replaced by the nearest allowed value, with a warning in the log.",
            "default": 100
          },
          "includeReviewsSummary": {
            "title": "Include TheFork's review summary",
            "type": "boolean",
            "description": "Add reviewsSummary, TheFork's machine-written summary of a restaurant's customer reviews. Off by default because the summary can name staff by first name (\"especially Albert, the maître d'\"). Reviewers are never named.",
            "default": false
          },
          "onlyNew": {
            "title": "Only new restaurants (monitoring)",
            "type": "boolean",
            "description": "Monitoring: return only restaurants that earlier runs of this actor in your account have not delivered for the same list. For a city or district it reads TheFork's own \"new restaurants\" list (restaurants recently added to TheFork; not on thefork.se, where the city list is read). With \"Only restaurants with a discount\" or an offers page it reads the offers page and also reports a restaurant again when the list shows it with a discount not delivered before (for example -20% became -50%). Other lists are read in full, up to their first 500 restaurants. Each list page read in this mode is charged as a \"List page checked\" event (TheFork's lists cannot be sorted by date, so every run reads them again), on top of the restaurants delivered. The first run delivers everything on the list. The memory is a key-value store named thefork-restaurants-scraper-monitor in your account; delete it to start over.",
            "default": false
          },
          "monitorKey": {
            "title": "Monitor name (optional)",
            "type": "string",
            "description": "Only with \"Only new restaurants\". A free-text name (e.g. paris-daily). Runs with the same list (and the same discount choice) and the same monitor name share one memory; give two schedules different names to keep their memories apart. Empty by default."
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}