{
  "openapi": "3.0.1",
  "info": {
    "title": "TheFork Restaurant Intelligence Scrapper",
    "description": "Comprehensive restaurant intelligence from TheFork platform. Get detailed venue data, pricing, reviews, ratings, and availability across 11 European countries. Enterprise-grade reliability with 99.9 % success rate.",
    "version": "3.5",
    "x-build-id": "1K1Bdev3ZkDNkmLSA"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/jdtpnjtp~thefork-restaurant-scraper-advanced/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-jdtpnjtp-thefork-restaurant-scraper-advanced",
        "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/jdtpnjtp~thefork-restaurant-scraper-advanced/runs": {
      "post": {
        "operationId": "runs-sync-jdtpnjtp-thefork-restaurant-scraper-advanced",
        "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/jdtpnjtp~thefork-restaurant-scraper-advanced/run-sync": {
      "post": {
        "operationId": "run-sync-jdtpnjtp-thefork-restaurant-scraper-advanced",
        "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",
        "required": [
          "urls"
        ],
        "properties": {
          "urls": {
            "title": "TheFork URLs",
            "minItems": 1,
            "maxItems": 10,
            "type": "array",
            "description": "Paste any TheFork URLs (1-10). City pages extract restaurants, restaurant pages extract reviews. Mix both types freely!",
            "items": {
              "type": "string"
            }
          },
          "maxRestaurants": {
            "title": "Max Restaurants per City",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum restaurants to extract from each city URL. For large cities (1000+), extraction uses automatic pagination. Paris has ~3500, London ~2800, Madrid ~2200 restaurants.",
            "default": 100
          },
          "startPage": {
            "title": "Start Page",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Starting page for pagination (1-based). Use this to resume scraping from a specific page. Page 1 = restaurants 1-25, Page 2 = 26-50, etc.",
            "default": 1
          },
          "includeMenu": {
            "title": "Include Menu Data (+$0.003/restaurant)",
            "type": "boolean",
            "description": "Extract full menu with all dishes, prices, preset menus, and FAQs. Adds $0.003 per restaurant. For 100 restaurants = $0.30 extra.",
            "default": false
          },
          "includeReviewsForRestaurants": {
            "title": "Include Reviews (+$0.001/review)",
            "type": "boolean",
            "description": "Fetch reviews for each restaurant. Billed per review at $0.001. For 100 restaurants x 50 reviews = $5.00 extra. Use maxReviewsPerRestaurant to control.",
            "default": false
          },
          "maxReviewsPerRestaurant": {
            "title": "Max Reviews per Restaurant",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Limit reviews fetched per restaurant. Cost = restaurants x reviews x $0.001. Example: 100 restaurants x 20 reviews = $2.00. Keep low to control costs.",
            "default": 50
          },
          "includeFoodPhotos": {
            "title": "Include Food Photos (adds cost)",
            "type": "boolean",
            "description": "Extract professional food photos. Billed at $0.001 per 10 photos. For 100 restaurants with 30 photos each = $0.30 extra. Set maxFoodPhotos to control costs.",
            "default": false
          },
          "maxFoodPhotos": {
            "title": "Max Food Photos",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Limit food photos per restaurant. Lower = lower cost. Set to 10 for samples, 30 for moderate coverage, 100 for complete galleries.",
            "default": 30
          },
          "includeCustomerPhotos": {
            "title": "Include Customer Photos (adds cost)",
            "type": "boolean",
            "description": "Extract customer-uploaded photos. Same billing as food photos: $0.001 per 10 photos. Can significantly increase costs for restaurants with many customer photos.",
            "default": false
          },
          "maxCustomerPhotos": {
            "title": "Max Customer Photos",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Limit customer photos per restaurant. Restaurants may have 100+ customer photos - set a reasonable limit to control costs.",
            "default": 30
          },
          "maxReviews": {
            "title": "Max Reviews per Restaurant",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum reviews to extract from each restaurant URL.",
            "default": 100
          },
          "reviewsOffset": {
            "title": "Skip First N Reviews",
            "minimum": 0,
            "maximum": 50000,
            "type": "integer",
            "description": "Skip the first N reviews and start from review #(N+1). Useful for incremental syncing or fetching the next batch after a previous run. Default 0 = start from newest. Combined with 'Max Reviews per Restaurant' you get reviews [N+1 .. N+Max].",
            "default": 0
          },
          "reviewsTimeframe": {
            "title": "Reviews Timeframe",
            "enum": [
              "1d",
              "7d",
              "1m",
              "6m",
              "1y",
              "all"
            ],
            "type": "string",
            "description": "Filter reviews by time period. Select 'All Time' for complete history.",
            "default": "7d"
          },
          "reviewsWithText": {
            "title": "Reviews Filter",
            "enum": [
              "ALL",
              "WITH_REVIEW"
            ],
            "type": "string",
            "description": "Filter reviews by content type.",
            "default": "WITH_REVIEW"
          },
          "reviewsOrderBy": {
            "title": "Sort Reviews By",
            "enum": [
              "MEAL_DATE",
              "RATING"
            ],
            "type": "string",
            "description": "Primary sort field for reviews.",
            "default": "MEAL_DATE"
          },
          "reviewsSortDirection": {
            "title": "Sort Direction",
            "enum": [
              "DESC",
              "ASC"
            ],
            "type": "string",
            "description": "Sort order for reviews.",
            "default": "DESC"
          },
          "reviewsLanguage": {
            "title": "Reviews Language",
            "pattern": "^(all|[a-z]{2})$",
            "type": "string",
            "description": "Filter reviews by language. Use 'all' for all languages, or a two-letter code (en, fr, de, es, it, pt, nl, etc.).",
            "default": "all"
          },
          "reviewsOccasion": {
            "title": "Dining Occasion Filter",
            "enum": [
              "",
              "BUSINESS",
              "FRIENDS",
              "ROMANTIC",
              "FAMILY",
              "ALONE"
            ],
            "type": "string",
            "description": "Filter reviews by dining occasion. Leave empty for all occasions.",
            "default": ""
          },
          "webhookUrl": {
            "title": "Webhook URL (Coming Soon)",
            "pattern": "^https?://.+",
            "type": "string",
            "description": "Receive real-time notifications when data changes. PRICING: $20/month base (up to 3 URLs) + $5/month per additional URL. This feature is coming soon."
          },
          "debugMode": {
            "title": "Debug Mode",
            "type": "boolean",
            "description": "Enable detailed logging for troubleshooting. Shows API requests and response details.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}