{
  "openapi": "3.0.1",
  "info": {
    "title": "Booking.com Room-Level Hotel Price Scraper",
    "description": "Scrape and track Booking.com hotel prices by room type and date, up to 365 days ahead. Extract rate options, availability, sold-out dates, meal plans, discounts, refundable rates, and geo-pricing. Built for hotel revenue management and competitive rate analysis. Export JSON, CSV, Excel, or HTML.",
    "version": "0.0",
    "x-build-id": "99hiSvf5w9KsSrXgM"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/noraview~Booking-price-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-noraview-Booking-price-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/noraview~Booking-price-scraper/runs": {
      "post": {
        "operationId": "runs-sync-noraview-Booking-price-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/noraview~Booking-price-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-noraview-Booking-price-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": {
          "searchText": {
            "title": "🔤 Search by text (auto-build URL)",
            "type": "string",
            "description": "e.g. 'riad with pool in fes'. Used only if searchUrl and hotelUrls are empty. Builds the Booking search URL automatically."
          },
          "searchUrl": {
            "title": "Search URL (paste from browser)",
            "type": "string",
            "description": "Paste a Booking.com search results URL with all your filters applied (stars, meal plan, distance, etc). Must be a booking.com link — Google Travel, Traveloka, and other sites are not supported."
          },
          "hotelUrls": {
            "title": "🏨 Target Hotels (direct mode)",
            "type": "array",
            "description": "Add Booking.com hotel URLs here to scrape specific hotels directly. If provided, destination mode is skipped.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "maxProperties": {
            "title": "📊 Max Properties to Discover",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum number of hotels to scrape from search results.",
            "default": 50
          },
          "startDate": {
            "title": "📅 Start Date",
            "type": "string",
            "description": "Check-in date. Leave empty for today."
          },
          "daysAhead": {
            "title": "📆 Days to Scrape",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "Number of days to scan forward.",
            "default": 3
          },
          "includeSoldOut": {
            "title": "🔴 Track Sold-Out Rooms",
            "type": "boolean",
            "description": "Detect which rooms are sold out. Essential for demand analysis and revenue management.",
            "default": true
          },
          "currency": {
            "title": "Currency",
            "enum": [
              "USD",
              "EUR",
              "GBP",
              "MAD",
              "AED",
              "SAR",
              "CAD",
              "AUD",
              "JPY",
              "BRL",
              "INR",
              "SGD",
              "HKD",
              "COP",
              "IDR",
              "CNY",
              "PLN",
              "KRW",
              "THB",
              "TWD",
              "CHF",
              "MXN",
              "ZAR"
            ],
            "type": "string",
            "description": "Output currency for all prices. The scraper handles all currency formats automatically (Indian Lakh, European thousands, etc).",
            "default": "USD"
          },
          "propertyType": {
            "title": "🏡 Property Type Filter",
            "enum": [
              "",
              "hotel",
              "apartment",
              "hostel",
              "villa",
              "guesthouse",
              "resort",
              "homestay",
              "campsite",
              "motel",
              "riad",
              "boutique"
            ],
            "type": "string",
            "description": "Filter by property type (only applies when using destinationId, not searchUrl)."
          },
          "minReviewScore": {
            "title": "⭐ Min Review Score",
            "minimum": 0,
            "maximum": 10,
            "type": "number",
            "description": "Minimum review score (0-10). Example: 8.5",
            "default": 0
          },
          "maxReviewScore": {
            "title": "⭐ Max Review Score",
            "minimum": 0,
            "maximum": 10,
            "type": "number",
            "description": "Maximum review score (0-10). Leave 0 for no limit.",
            "default": 0
          },
          "adults": {
            "title": "Adults",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Number of adults.",
            "default": 2
          },
          "children": {
            "title": "Children",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Number of children.",
            "default": 0
          },
          "rooms": {
            "title": "Rooms",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Number of rooms.",
            "default": 1
          },
          "proxyConfiguration": {
            "title": "🔒 Proxy configuration",
            "type": "object",
            "description": "Standard Apify proxy picker. Residential is strongly recommended — Booking.com blocks datacenter and shared IPs within a request or two. The country chosen here is used only when 'Proxy Countries' below is empty; set that field to scrape the same hotel from several source markets in one run."
          },
          "useApifyProxy": {
            "title": "Use Apify Proxy (legacy, hidden)",
            "type": "boolean",
            "description": "Deprecated and hidden from the form — 'Proxy configuration' above replaces it and is read first. Kept so saved tasks and API callers that send this key keep working: when proxyConfiguration is absent from the input, this boolean still decides whether a RESIDENTIAL proxy is used.",
            "default": true
          },
          "proxyCountries": {
            "title": "Proxy Countries (multi-market)",
            "type": "array",
            "description": "OPTIONAL. Leave empty to use the single country from 'Proxy configuration' above. Fill it to scrape the same hotels once PER country and compare geo-pricing — each result is tagged with proxy_country. Accepts any 2-letter code your Apify Residential proxy offers (not a fixed list): FR, US, GB, DE, ES, IT, NL, BE, PL, CH, CN, HK, SG, JP, KR, AE, SA, MA, IN, ID, AU, CA, BR… A code your plan lacks falls back to a weaker proxy and says so in the log. Keep the same currency across countries for a clean cohort comparison.",
            "default": [
              "US"
            ],
            "items": {
              "type": "string"
            }
          },
          "concurrency": {
            "title": "⚡ Parallel Hotels (concurrency)",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "How many hotels to scrape at the same time (per country). Higher = faster runs, but more RAM/CPU and a heavier hit on your proxy pool. Each hotel uses its own proxy IP, so this is safe up to 5.",
            "default": 3
          },
          "delayBetweenRequests": {
            "title": "Delay Between Requests (seconds)",
            "minimum": 2,
            "maximum": 10,
            "type": "integer",
            "description": "Wait time between each date scrape (per hotel). Higher = safer but slower.",
            "default": 3
          },
          "includeLosAnalysis": {
            "title": "Include Length-of-Stay Analysis",
            "type": "boolean",
            "description": "Extract multi-night pricing to detect LOS discounts.",
            "default": false
          },
          "includeWholesaleRates": {
            "title": "Include Wholesale/Partner Rates (bbasic)",
            "type": "boolean",
            "description": "Capture partner/wholesale rates (Hotelbeds, Expedia, etc). Important for Asian markets. Tagged separately as is_wholesale, never mixed with retail rates.",
            "default": false
          },
          "tieredCadence": {
            "title": "Tiered Scrape Cadence (cost saver)",
            "type": "boolean",
            "description": "Scrape near dates daily, mid dates every 2 days, far dates every 3 days. Reduces cost ~50%. Best for your own monitoring.",
            "default": false
          },
          "webhookUrl": {
            "title": "Alert Webhook URL (Optional)",
            "type": "string",
            "description": "Slack/Discord webhook for error alerts."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}