{
  "openapi": "3.0.1",
  "info": {
    "title": "Booking.com Occupancy Scraper — Room Rates & Calendar",
    "description": "Booking.com occupancy scraper for public room rates and availability calendars. Paste hotel URLs or a city search and export occupancy % (30/90 days), sold-out nights, nightly rates, and lead room inventory as JSON — a Booking.com calendar API alternative for revenue teams.",
    "version": "0.1",
    "x-build-id": "BUxPdOwk4bQ6X8jpN"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/crawloop~booking-com-occupancy-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-crawloop-booking-com-occupancy-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/crawloop~booking-com-occupancy-scraper/runs": {
      "post": {
        "operationId": "runs-sync-crawloop-booking-com-occupancy-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/crawloop~booking-com-occupancy-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-crawloop-booking-com-occupancy-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": {
          "hotels": {
            "title": "Hotels",
            "type": "array",
            "description": "Booking.com hotel URLs, slugs (gb/gardencourthotel), or numeric hotel IDs. One per line.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Hotel pages and/or Booking.com search URLs (searchresults.html with dest_id). Search pages yield hotels, then calendars are fetched for each.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "location": {
            "title": "Location",
            "type": "string",
            "description": "City or area name used to discover hotels when you do not have URLs yet. Example: Paris, France or Marbella, Spain."
          },
          "lookAheadDays": {
            "title": "Look-ahead days",
            "minimum": 1,
            "maximum": 366,
            "type": "integer",
            "description": "Forward nights of availability to read (1–366). Booking returns the calendar in 61-day chunks. Use 30 or 90 for occupancy windows.",
            "default": 90
          },
          "maxHotels": {
            "title": "Max hotels",
            "minimum": 0,
            "type": "integer",
            "description": "Hard cap on hotels processed in one run. 0 = unlimited.",
            "default": 25
          },
          "checkInDate": {
            "title": "Reference check-in",
            "type": "string",
            "description": "Stay start (YYYY-MM-DD) for the lead room snapshot (includeRooms). Defaults to about 14 days from today. Occupancy windows always start from today."
          },
          "checkOutDate": {
            "title": "Reference check-out",
            "type": "string",
            "description": "Stay end (YYYY-MM-DD) for the lead room snapshot. Defaults to one night after check-in."
          },
          "adults": {
            "title": "Adults",
            "minimum": 1,
            "maximum": 9,
            "type": "integer",
            "description": "Adults used for calendar availability and the lead room rate.",
            "default": 2
          },
          "children": {
            "title": "Children",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Child guests for the lead room snapshot.",
            "default": 0
          },
          "rooms": {
            "title": "Rooms",
            "minimum": 1,
            "maximum": 9,
            "type": "integer",
            "description": "Rooms requested on the public calendar.",
            "default": 1
          },
          "includeHotelDetails": {
            "title": "Include hotel details",
            "type": "boolean",
            "description": "Add name, city, stars, review score, and address from the public search card.",
            "default": true
          },
          "includeRooms": {
            "title": "Include lead rooms",
            "type": "boolean",
            "description": "Attach the lead bookable unit for the reference stay (room name, rate, occupancy, meal plan, sold-out for those dates).",
            "default": true
          },
          "includeCalendar": {
            "title": "Include daily calendar",
            "type": "boolean",
            "description": "Attach the per-day array (date, available/soldOut, min nights, cheapest rate when published).",
            "default": true
          },
          "monitor": {
            "title": "Monitor booking pace",
            "type": "boolean",
            "description": "Compare this run to the previous run in a named Key-Value store and emit newly sold-out / newly opened night counts. First run is the baseline (bookingPace.firstRun). Pair with a schedule and a stable monitorStoreName.",
            "default": false
          },
          "monitorStoreName": {
            "title": "Monitor store name",
            "type": "string",
            "description": "Named Key-Value store for booking-pace snapshots across scheduled runs. Default run storage is discarded after each run — a named store is required for deltas.",
            "default": "booking-occupancy-monitor"
          },
          "currency": {
            "title": "Currency",
            "type": "string",
            "description": "ISO currency requested from Booking.com (USD, EUR, GBP, …).",
            "default": "USD"
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Datacenter proxy is usually enough for the public GraphQL calendar. Switch to residential if Booking.com challenges the run.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}