{
  "openapi": "3.0.1",
  "info": {
    "title": "Booking.com Scraper: Guest Review Sentiment Analysis",
    "description": "Booking.com Scraper: Extract guest reviews, ratings, dates, property details, and review text, then analyze sentiment to identify positive and negative feedback. Uncover recurring complaints, guest preferences, service issues, and hospitality trends for competitive research.",
    "version": "0.1",
    "x-build-id": "hstURvpwgp1U7z9Xd"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapier~BookingScraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapier-BookingScraper",
        "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/scrapier~BookingScraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapier-BookingScraper",
        "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/scrapier~BookingScraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapier-BookingScraper",
        "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": {
          "location": {
            "title": "🗺️ Destination to search",
            "type": "string",
            "description": "City, region or landmark to find hotels for (e.g. New York, Paris). Ignored when hotel/search URLs are provided below.",
            "default": ""
          },
          "startUrls": {
            "title": "🔗 Or paste Booking.com hotel / search URLs",
            "type": "array",
            "description": "One or more Booking.com hotel detail pages or search-results pages. Reviews are read from each hotel page.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxHotels": {
            "title": "🏨 Max hotels (parents)",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Maximum number of HOTELS to scrape per destination or start URL. Reviews are counted separately (see maxReviewsPerHotel).",
            "default": 10
          },
          "scrapeReviews": {
            "title": "💬 Fetch guest reviews",
            "type": "boolean",
            "description": "Turn on to emit per-review rows (liked/disliked text, score, traveller type, trip purpose, reviewer country, room type, date). Default true.",
            "default": true
          },
          "maxReviewsPerHotel": {
            "title": "🔢 Max reviews per hotel",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Cap the number of review child rows collected per hotel. Booking embeds up to ~10 recent reviews on each hotel page. Use 0 for all available. Example: maxHotels=5 + maxReviewsPerHotel=10 → up to 5 hotels and up to 50 review rows.",
            "default": 10
          },
          "reviewSortBy": {
            "title": "↕️ Order reviews by",
            "enum": [
              "most_relevant",
              "newest",
              "highest_score",
              "lowest_score"
            ],
            "type": "string",
            "description": "How to order each hotel's reviews before the per-hotel cap is applied.",
            "default": "most_relevant"
          },
          "analyzeSentiment": {
            "title": "🧠 Add sentiment rollup per hotel",
            "type": "boolean",
            "description": "Adds the `reviewSentiment` object to each hotel row. Keyless and always free. Default true.",
            "default": true
          },
          "aiEnhancement": {
            "title": "🤖 Enable AI review classification",
            "type": "boolean",
            "description": "Optional LLM sentiment + topic tags per review. Requires an API key below. Default false.",
            "default": false
          },
          "aiModel": {
            "title": "🤖 AI model / provider",
            "enum": [
              "claude-haiku-4-5",
              "claude-sonnet-5",
              "claude-opus-4-8",
              "gpt-4o-mini",
              "gpt-4o",
              "gpt-4.1-mini",
              "o3-mini",
              "gemini-2.0-flash-lite",
              "gemini-2.0-flash",
              "gemini-2.5-flash",
              "grok-3-mini",
              "deepseek-chat",
              "sonar",
              "mistral-small-latest"
            ],
            "type": "string",
            "description": "Only used when AI is enabled. Provider auto-detected from the name: claude-*=Anthropic, gpt-*/o1/o3=OpenAI, gemini-*=Google, grok-*=xAI, deepseek-*=DeepSeek, sonar*=Perplexity, mistral-*=Mistral. Cheaper mini/flash/haiku models are recommended for classification.",
            "default": "claude-haiku-4-5"
          },
          "aiApiKey": {
            "title": "🔑 AI API key",
            "type": "string",
            "description": "Only used when AI is enabled. Provider key matching the model (Anthropic / OpenAI / Google / xAI / DeepSeek / Perplexity / Mistral). If empty, the actor also checks the matching provider env var (e.g. ANTHROPIC_API_KEY, OPENAI_API_KEY). Stored securely."
          },
          "includeHotelDetails": {
            "title": "🏨 Include full hotel details",
            "type": "boolean",
            "description": "On: rooms, facilities, images, trader/host info, house-rule policies and breadcrumbs. Off: core identity only (name, price, rating, address, location, stars). Default true.",
            "default": true
          },
          "propertyType": {
            "title": "🏠 Property type",
            "enum": [
              "none",
              "hotels",
              "apartments",
              "hostels",
              "guest houses",
              "homestays",
              "bed and breakfasts",
              "holiday homes",
              "boats",
              "villas",
              "motels",
              "resorts",
              "holiday parks",
              "campsites",
              "luxury tents"
            ],
            "type": "string",
            "description": "Filter search results by type of accommodation.",
            "default": "none"
          },
          "sortBy": {
            "title": "📊 Order search results by",
            "enum": [
              "distance_from_search",
              "price",
              "review_score_and_price",
              "review_score",
              "class"
            ],
            "type": "string",
            "description": "How to sort the hotel search results.",
            "default": "distance_from_search"
          },
          "minimumRating": {
            "title": "⭐ Minimum guest rating",
            "type": "string",
            "description": "Minimum guest rating (e.g. 7, 8, 9). Leave empty for no filter.",
            "default": ""
          },
          "starsCountFilter": {
            "title": "🌟 Star rating",
            "enum": [
              "any",
              "1",
              "2",
              "3",
              "4",
              "5"
            ],
            "type": "string",
            "description": "Filter by number of stars.",
            "default": "any"
          },
          "currency": {
            "title": "💱 Preferred currency",
            "enum": [
              "USD",
              "EUR",
              "GBP",
              "CAD",
              "AUD",
              "CHF",
              "JPY",
              "CNY",
              "INR",
              "BRL",
              "MXN"
            ],
            "type": "string",
            "description": "Currency for displayed prices.",
            "default": "USD"
          },
          "language": {
            "title": "🌐 Language",
            "enum": [
              "en-gb",
              "en-us",
              "de",
              "fr",
              "es",
              "it",
              "pt-br",
              "nl",
              "pl",
              "ru",
              "ja",
              "zh"
            ],
            "type": "string",
            "description": "Interface / review language for Booking.com.",
            "default": "en-gb"
          },
          "checkIn": {
            "title": "📥 Check-in date",
            "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$|^(\\d+)\\s*(day|week|month|year)s?$|^$",
            "type": "string",
            "description": "Absolute (YYYY-MM-DD) or relative (e.g. 2 weeks). Leave empty for a flexible search.",
            "default": ""
          },
          "checkOut": {
            "title": "📤 Check-out date",
            "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$|^(\\d+)\\s*(day|week|month|year)s?$|^$",
            "type": "string",
            "description": "Absolute (YYYY-MM-DD) or relative (e.g. 1 week). Leave empty for a flexible search.",
            "default": ""
          },
          "flexWindow": {
            "title": "🔄 Stay date flexibility (days)",
            "enum": [
              "0",
              "1",
              "2",
              "3",
              "7"
            ],
            "type": "string",
            "description": "Allow the dates to shift by this many days. Use 0 for exact dates only.",
            "default": "0"
          },
          "rooms": {
            "title": "🛏️ Number of rooms",
            "minimum": 1,
            "maximum": 9,
            "type": "integer",
            "description": "Number of rooms for the stay.",
            "default": 1
          },
          "adults": {
            "title": "👤 Number of adults",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "Number of adult guests.",
            "default": 2
          },
          "children": {
            "title": "👶 Number of children",
            "minimum": 0,
            "maximum": 30,
            "type": "integer",
            "description": "Number of children.",
            "default": 0
          },
          "minMaxPrice": {
            "title": "💰 Price range",
            "type": "string",
            "description": "Min-max price filter, e.g. 50-200 or 100+ for minimum only.",
            "default": "0-999999"
          },
          "proxyConfiguration": {
            "title": "🌐 Proxy configuration",
            "type": "object",
            "description": "Residential proxy is strongly recommended (required to pass Booking's bot protection).",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}