{
  "openapi": "3.0.1",
  "info": {
    "title": "Booking.com Search Scraper",
    "description": "Scrape hotel listings, prices, ratings, and detailed descriptions from Booking.com with support for search by location, specific hotel URLs, and deep details extraction.",
    "version": "1.1",
    "x-build-id": "o9Qqf71yMenkqynJ6"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/w3crawler~booking-com-search-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-w3crawler-booking-com-search-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/w3crawler~booking-com-search-scraper/runs": {
      "post": {
        "operationId": "runs-sync-w3crawler-booking-com-search-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/w3crawler~booking-com-search-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-w3crawler-booking-com-search-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": {
          "mode": {
            "title": "Scraping Mode",
            "enum": [
              "search",
              "hotelUrl",
              "searchUrl"
            ],
            "type": "string",
            "description": "Select the type of input: search by location, direct hotel URLs, or a custom search URL.",
            "default": "search"
          },
          "searchQuery": {
            "title": "Search Location",
            "type": "string",
            "description": "City or region to search for hotels (e.g., 'Paris', 'New Delhi'). Used when mode is 'search'.",
            "default": "Paris"
          },
          "destination": {
            "title": "Destination alias",
            "type": "string",
            "description": "Compatibility alias for searchQuery."
          },
          "startUrls": {
            "title": "Booking.com URL aliases",
            "maxItems": 25,
            "type": "array",
            "description": "Optional public Booking.com hotel or search-result URLs. The mode is inferred when omitted.",
            "items": {
              "type": "object",
              "properties": {
                "url": {
                  "type": "string",
                  "title": "Url",
                  "description": "Url value."
                }
              },
              "required": [
                "url"
              ]
            }
          },
          "checkInDate": {
            "title": "Check-in Date",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Check-in date in YYYY-MM-DD format. When omitted, the Actor uses a date 30 days in the future."
          },
          "checkIn": {
            "title": "Check-in alias",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Compatibility alias for checkInDate."
          },
          "checkOutDate": {
            "title": "Check-out Date",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Check-out date in YYYY-MM-DD format. When omitted, the Actor uses the day after the generated check-in date."
          },
          "checkOut": {
            "title": "Check-out alias",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Compatibility alias for checkOutDate."
          },
          "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": 10,
            "type": "integer",
            "description": "Number of children guests.",
            "default": 0
          },
          "childrenAges": {
            "title": "Children ages alias",
            "type": "array",
            "description": "Compatibility input; the number of entries is used as the child count.",
            "items": {
              "type": "string"
            }
          },
          "rooms": {
            "title": "Number of Rooms",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "Number of rooms to book.",
            "default": 1
          },
          "currency": {
            "title": "Currency",
            "type": "string",
            "description": "Currency code for prices (e.g. USD, EUR, GBP, INR).",
            "default": "USD"
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Language code for the Booking.com interface (e.g. en-gb, en-us, de, fr).",
            "default": "en-gb"
          },
          "hotelUrls": {
            "title": "Hotel URLs",
            "maxItems": 25,
            "type": "array",
            "description": "Array of Booking.com hotel page URLs. Used when mode is 'hotelUrl'.",
            "items": {
              "type": "string"
            }
          },
          "searchUrl": {
            "title": "Custom Search URL",
            "type": "string",
            "description": "Full Booking.com search URL with all filters already applied. Used when mode is 'searchUrl'."
          },
          "maxItems": {
            "title": "Max Items",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum number of hotels to scrape (1-1000).",
            "default": 20
          },
          "maxResults": {
            "title": "Maximum results alias",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Compatibility alias for maxItems."
          },
          "deepScraping": {
            "title": "Deep Detail Scraping",
            "type": "boolean",
            "description": "Visit each hotel page to extract full details: description, amenities, rooms, policies, images, coordinates, and more.",
            "default": true
          },
          "includeRooms": {
            "title": "Include room details alias",
            "type": "boolean",
            "description": "Compatibility flag; false disables deep detail scraping.",
            "default": true
          },
          "includeReviews": {
            "title": "Include Guest Review Highlights",
            "type": "boolean",
            "description": "Extract up to 5 guest review text snippets from each hotel page.",
            "default": false
          },
          "headless": {
            "title": "Headless Mode",
            "type": "boolean",
            "description": "Run browser in headless mode (recommended for production).",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Optional proxy settings. Direct public requests are used by default.",
            "default": {
              "useApifyProxy": 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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}