{
  "openapi": "3.0.1",
  "info": {
    "title": "Booking.com Rate Calendar & Booking Curve",
    "description": "Build a price-by-date matrix for any Booking.com market: nightly rate, taxes, refundability and rank versus the market median for every property on every check-in date, plus per-date medians, quartiles and supply movement. Weekend premiums and the forward booking curve included.",
    "version": "0.0",
    "x-build-id": "hOK2EktImfTsP9nUF"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/apt_marble~booking-rate-calendar-scanner/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-apt_marble-booking-rate-calendar-scanner",
        "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/apt_marble~booking-rate-calendar-scanner/runs": {
      "post": {
        "operationId": "runs-sync-apt_marble-booking-rate-calendar-scanner",
        "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/apt_marble~booking-rate-calendar-scanner/run-sync": {
      "post": {
        "operationId": "run-sync-apt_marble-booking-rate-calendar-scanner",
        "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",
        "required": [
          "destinations"
        ],
        "properties": {
          "destinations": {
            "title": "Destinations",
            "maxItems": 20,
            "type": "array",
            "description": "Markets to scan. Type place names (Austin, Lisbon, Bali) or coordinate pairs (30.2672,-97.7431). Each destination is scanned across every check-in date you choose.",
            "default": [
              "Austin"
            ],
            "items": {
              "type": "string"
            }
          },
          "destinationType": {
            "title": "Destination type",
            "enum": [
              "CITY",
              "REGION",
              "COUNTRY",
              "DISTRICT",
              "AIRPORT",
              "LANDMARK",
              "LATLONG"
            ],
            "type": "string",
            "description": "How to read your place names. City covers most needs; use Region for a state or province, District for a neighbourhood, and Coordinates when you pass lat,lon pairs. Coordinate pairs are always read as coordinates whatever you pick here.",
            "default": "CITY"
          },
          "startDate": {
            "title": "First check-in date",
            "type": "string",
            "description": "First check-in date of the scan, as YYYY-MM-DD. Leave empty to start seven days from the day the run begins, which keeps scheduled runs rolling forward instead of drifting into the past.",
            "default": ""
          },
          "horizonDays": {
            "title": "Number of check-in dates",
            "minimum": 1,
            "maximum": 90,
            "type": "integer",
            "description": "How many consecutive check-in dates to scan, starting from the first check-in date. Each date is checked on its own, so this is the main thing that drives how long a run takes.",
            "default": 30
          },
          "checkInDates": {
            "title": "Specific check-in dates",
            "maxItems": 90,
            "type": "array",
            "description": "An explicit list of check-in dates as YYYY-MM-DD. When this is filled in it replaces the first check-in date and the horizon, which is handy for scanning only event weekends or the first of each month.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "lengthsOfStay": {
            "title": "Lengths of stay (nights)",
            "maxItems": 4,
            "type": "array",
            "description": "Stay lengths to price, in nights. Every extra length multiplies the whole scan, so up to four are allowed, each between 1 and 14 nights. A one-night stay gives the cleanest nightly curve.",
            "default": [
              "1"
            ],
            "items": {
              "type": "string"
            }
          },
          "daysOfWeek": {
            "title": "Only these check-in weekdays",
            "maxItems": 7,
            "type": "array",
            "description": "Keep only check-in dates that fall on these weekdays (Mon, Tue, Wed, Thu, Fri, Sat, Sun). Leave empty for every day. Narrowing to Fri and Sat cuts a 90-date scan to 26 dates.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "adults": {
            "title": "Adults",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "Adults the rates are priced for. Party size changes which properties and rates qualify, so keep it fixed across scheduled runs.",
            "default": 2
          },
          "rooms": {
            "title": "Rooms",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "Rooms to price for the party.",
            "default": 1
          },
          "children": {
            "title": "Children",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Children travelling with the party. Add their ages below for accurate rates — Booking.com prices children by age.",
            "default": 0
          },
          "childrenAges": {
            "title": "Children's ages",
            "maxItems": 10,
            "type": "array",
            "description": "One age per child, 0 to 17. When these are filled in they set the number of children too.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "sortBy": {
            "title": "Result order",
            "enum": [
              "price",
              "bayesian_review_score",
              "popularity",
              "class_descending",
              "class_ascending",
              "distance_from_search"
            ],
            "type": "string",
            "description": "Which slice of the market each date returns. Cheapest first is the default and is pinned deliberately: the same ordering on every date is what makes the curve comparable.",
            "default": "price"
          },
          "maxPropertiesPerDate": {
            "title": "Properties per date",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "How many properties to collect for each check-in date. Anything above 100 reads several slices of the market for that date.",
            "default": 100
          },
          "pageToCompletion": {
            "title": "Read each market to completion",
            "type": "boolean",
            "description": "Read as much of the market as Booking.com will show for every date. This is what makes \"this property is sold out on this date\" a sound answer instead of a guess — without it, a property missing from a date is simply not reported for that date. It also makes a run considerably longer.",
            "default": false
          },
          "pinnedHotelIds": {
            "title": "Pinned property ids",
            "maxItems": 200,
            "type": "array",
            "description": "Track a fixed comp set. Only these properties are saved, picked out of each market's results, and a date where one of them does not appear is saved with notFoundOnDate set so gaps in the curve are visible.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "emitMarketRow": {
            "title": "Add a market row per date",
            "type": "boolean",
            "description": "Adds one row per market per date with the median, the quartiles, the cheapest rate, the share of refundable offers and how supply moved against the previous date. Costs no extra work.",
            "default": true
          },
          "deriveCurveMetrics": {
            "title": "Add forward-curve metrics",
            "type": "boolean",
            "description": "Adds per-property curve figures once the scan finishes: date-over-date change, weekend premium, minimum, maximum and median rate, rate volatility, and how many dates were observed or missing.",
            "default": true
          },
          "maxRequests": {
            "title": "Maximum work per run",
            "minimum": 1,
            "maximum": 4000,
            "type": "integer",
            "description": "A hard ceiling on how much scanning a single run may do. The projected amount is worked out and logged before anything starts, and a run that would exceed this stops immediately and names the setting to lower.",
            "default": 400
          },
          "maxConcurrency": {
            "title": "Dates at a time",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "How many check-in dates are worked on simultaneously. Three is the balance point: higher is faster but more dates get turned away, and the run eases off automatically when that starts happening. Any date that is turned away is retried once before it is reported as missing.",
            "default": 3
          },
          "currency": {
            "title": "Currency",
            "type": "string",
            "description": "Three-letter currency code every rate is reported in. It is pinned for the whole run, because a series priced in a shifting currency is meaningless.",
            "default": "USD"
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Language for names and labels, such as en-us, en-gb, de or fr. Non-English languages are untested.",
            "default": "en-us"
          },
          "proxyCountry": {
            "title": "Country to appear to browse from",
            "type": "string",
            "description": "Two-letter country code for the market view the run should use, for example us, gb or de. Rates can differ slightly by country, so keep it fixed between runs.",
            "default": "us"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}