{
  "openapi": "3.0.1",
  "info": {
    "title": "Booking.com Scraper — Rate & Value Report",
    "description": "Scrape Booking.com property rates, room details, availability, ratings, reviews, amenities, and value indicators. Compare hotel pricing and value across properties and dates to support travel research, competitor analysis, market intelligence, and pricing strategies.",
    "version": "0.1",
    "x-build-id": "pOXhqPJiitfiJcauj"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/api-empire~booking-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-api-empire-booking-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/api-empire~booking-scraper/runs": {
      "post": {
        "operationId": "runs-sync-api-empire-booking-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/api-empire~booking-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-api-empire-booking-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": {
          "location": {
            "title": "🗺️ Destination to compare",
            "type": "string",
            "description": "City, region or landmark whose accommodation you want value-ranked (e.g. Amsterdam, Lisbon). Ignored when Stay URLs are provided. (Base alias: `search`.)",
            "default": ""
          },
          "stayUrls": {
            "title": "🔗 Or paste Stay URLs",
            "type": "array",
            "description": "One or more Booking.com URLs — hotel detail pages or search-results pages. Detail-page rate breakdown needs stay dates (below). (Base alias: `startUrls`.)",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxProperties": {
            "title": "🎯 Max properties to rank",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "How many properties to scrape and value-rank per destination / URL. Example: 15. Default is 10.",
            "default": 10
          },
          "sortResultsBy": {
            "title": "📊 Order the report by",
            "enum": [
              "bestValue",
              "lowestPrice",
              "highestRating",
              "asFound"
            ],
            "type": "string",
            "description": "Output ordering. `bestValue` re-ranks by the derived value score (guest rating ÷ nightly price, percentile-ranked). Example: bestValue puts the property with the strongest rating-for-price at the top.",
            "default": "bestValue"
          },
          "includeRateBreakdown": {
            "title": "🧾 Parse per-room rate breakdown",
            "type": "boolean",
            "description": "Extract each room's rate options — base price, discounted price, discount %, taxes & fees, board type, refundable flag — from Booking's room blocks. Requires stay dates to be set; otherwise Booking serves no priced availability and this stays empty. Default is on.",
            "default": true
          },
          "includePropertyDetails": {
            "title": "📦 Include full property details",
            "type": "boolean",
            "description": "Include rooms, facilities, images, breadcrumbs and trader/contact info. Turn off for a lean value-only report (name, price, rating, value score). Default is on. (Base alias: `scrapeAdditionalHotelData` — now actually honoured.)",
            "default": true
          },
          "stayCheckIn": {
            "title": "📥 Check-in",
            "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 date (YYYY-MM-DD) or relative (e.g. 2 weeks). Leave empty for a dateless value scan. (Base alias: `checkIn`.)",
            "default": ""
          },
          "stayCheckOut": {
            "title": "📤 Check-out",
            "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 date (YYYY-MM-DD) or relative (e.g. 3 weeks). Leave empty for a dateless value scan. (Base alias: `checkOut`.)",
            "default": ""
          },
          "dateFlexibility": {
            "title": "🔄 Date flexibility (days)",
            "enum": [
              "0",
              "1",
              "2",
              "3",
              "7"
            ],
            "type": "string",
            "description": "Allow the stay dates to shift by this many days. Use 0 for exact dates. (Base alias: `flexWindow`.)",
            "default": "0"
          },
          "guestsAdults": {
            "title": "👤 Adults",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "Adult guests the rate is quoted for. (Base alias: `adults`.)",
            "default": 2
          },
          "guestsChildren": {
            "title": "👶 Children",
            "minimum": 0,
            "maximum": 30,
            "type": "integer",
            "description": "Children the rate is quoted for. (Base alias: `children`.)",
            "default": 0
          },
          "roomsNeeded": {
            "title": "🛏️ Rooms",
            "minimum": 1,
            "maximum": 9,
            "type": "integer",
            "description": "Number of rooms for the stay. (Base alias: `rooms`.)",
            "default": 1
          },
          "stayCategory": {
            "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": "Restrict the comparison to one accommodation type. (Base alias: `propertyType`.)",
            "default": "none"
          },
          "searchOrder": {
            "title": "🧭 Booking search order (server-side)",
            "enum": [
              "distance_from_search",
              "price",
              "review_score_and_price",
              "review_score",
              "class"
            ],
            "type": "string",
            "description": "How Booking orders the raw search results before value re-ranking is applied. (Base alias: `sortBy`.)",
            "default": "review_score_and_price"
          },
          "minGuestRating": {
            "title": "⭐ Minimum guest rating",
            "type": "string",
            "description": "Only compare properties at or above this guest rating (e.g. 8). Leave empty for no floor. (Base alias: `minimumRating`.)",
            "default": ""
          },
          "starRating": {
            "title": "🌟 Star rating",
            "enum": [
              "any",
              "1",
              "2",
              "3",
              "4",
              "5"
            ],
            "type": "string",
            "description": "Filter by official star class. (Base alias: `starsCountFilter`.)",
            "default": "any"
          },
          "priceBand": {
            "title": "💰 Nightly price band",
            "type": "string",
            "description": "Min-max nightly price filter, e.g. 60-250 or 100+ for a floor only. (Base alias: `minMaxPrice`.)",
            "default": "0-999999"
          },
          "resultCurrency": {
            "title": "💱 Currency",
            "enum": [
              "USD",
              "EUR",
              "GBP",
              "CAD",
              "AUD",
              "CHF",
              "JPY",
              "CNY",
              "INR",
              "BRL",
              "MXN"
            ],
            "type": "string",
            "description": "Currency the prices and rate breakdown are quoted in. (Base alias: `currency`.)",
            "default": "EUR"
          },
          "resultLanguage": {
            "title": "🌐 Language",
            "enum": [
              "en-gb",
              "en-us",
              "de",
              "fr",
              "es",
              "it",
              "pt-br",
              "nl",
              "pl",
              "ru",
              "ja",
              "zh"
            ],
            "type": "string",
            "description": "Booking interface language for the request. (Base alias: `language`.)",
            "default": "en-gb"
          },
          "proxyConfiguration": {
            "title": "🌐 Proxy configuration",
            "type": "object",
            "description": "Residential proxy is used by default; the actor also falls back RESIDENTIAL → DATACENTER → NO_PROXY on repeated blocks.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}