{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Hotels Scraper: Hotel Prices, Vendor Rates, History",
    "description": "Google Hotels scraper for hotel prices for any destination and dates: price per night, each booking vendor's price (opt-in), a sweep of up to 14 check-in dates (30 for named hotels), and stored price history for tracked hotels (no longer refreshed weekly). Not affiliated with Google.",
    "version": "0.1",
    "x-build-id": "EHsBv0LChMgx5LKif"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/yappman~google-hotels-prices/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-yappman-google-hotels-prices",
        "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/yappman~google-hotels-prices/runs": {
      "post": {
        "operationId": "runs-sync-yappman-google-hotels-prices",
        "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/yappman~google-hotels-prices/run-sync": {
      "post": {
        "operationId": "run-sync-yappman-google-hotels-prices",
        "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": "Mode",
            "enum": [
              "search",
              "hotel",
              "history",
              "tracked",
              "calendar",
              "alert"
            ],
            "type": "string",
            "description": "Required. search: hotels for destinations and dates (the usual choice). hotel: look up hotels by id or Google Travel URL for one pair of dates. history: stored lead-price snapshots for tracked hotels. tracked: list tracked hotel ids and dates, no Google request. calendar: one hotel, up to 60 consecutive check-in dates, one row per night, the cheapest night flagged. alert: a named watch that returns a row only when a hotel's price is below your target or has dropped by your percent. Default search. Cost: start fee $0.005 per GB of run memory, so $0.005 at the default 1 GB; tracked adds nothing; calendar is $0.0009 per night returned; alert is $0.01 per alert returned.",
            "default": "search"
          },
          "searches": {
            "title": "Searches",
            "maxItems": 20,
            "type": "array",
            "description": "search mode only. Up to 20 objects: destination (required; city, area or landmark), checkIn and checkOut (YYYY-MM-DD, future; both or neither), adults (1-12, default 2), rooms (must be 1), sweepDays (1-14: that many consecutive check-in dates, same length; at most 30 stays per run). No dates: 2 nights from 14 days after the run starts. Each hotel row is a hotel event, $0.003; maxItems caps all dates.",
            "default": [
              {
                "destination": "Lisbon",
                "adults": 2,
                "rooms": 1
              }
            ]
          },
          "hotels": {
            "title": "Hotels",
            "maxItems": 1000,
            "type": "array",
            "description": "hotel and history modes only. Google hotel ids (start with Ch) or Google Travel hotel page URLs containing /travel/hotels/entity/<id>. Up to 1,000 in hotel mode, 100 in history mode; other entries are skipped. Default empty. Cost: hotel mode $0.003 per returned row; history mode $0.01 per row with two or more snapshots, a one-snapshot row is free.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "dates": {
            "title": "Dates",
            "type": "object",
            "description": "hotel mode (optional) and history mode (required) only. Object {\"checkIn\": \"YYYY-MM-DD\", \"checkOut\": \"YYYY-MM-DD\", \"sweepDays\": 1-30}, checkOut after checkIn; hotel mode refuses a checkIn before today (UTC) before any request (history mode may use past dates); 2 adults, 1 room. hotel mode: checkIn alone gives 2 nights; no dates gives a stay 14 days out, 2 nights; sweepDays (hotel mode only) plans that many consecutive check-in dates, at most 60 hotels x sweepDays lookups per run. history mode needs both checkIn and checkOut, no sweepDays, and returns only stays stored for exactly these dates. No cost of its own."
          },
          "calendar": {
            "title": "Calendar (calendar mode)",
            "type": "object",
            "description": "calendar mode only. {checkIn, stayNights, maxNights}: checkIn is the first check-in date (14 days out if left out), stayNights 1 to 14 (default 1), maxNights 1 to 60 consecutive check-in dates (default 30). Use exactly one hotel in hotels. Each night returned is one calendar-night event ($0.0009 free tier); nights Google shows no price for are not returned or charged."
          },
          "watchName": {
            "title": "Watch name (alert mode)",
            "maxLength": 40,
            "type": "string",
            "description": "alert mode only. A name for this watch: lowercase letters, digits and hyphens, up to 40. The watch's prices are kept under this name in a key-value store called google-hotels-alerts in your own Apify account. Do not run two runs of the same watch at once."
          },
          "alert": {
            "title": "Alert targets (alert mode)",
            "type": "object",
            "description": "alert mode only. {belowPrice, dropPercent}, at least one: belowPrice alerts when the price per night (in your currency) is below it; dropPercent alerts when the price has fallen by at least that percent from its highest recent price (reset at each alert). Use 1 to 20 hotels in hotels, at most 30 hotel-dates per run (hotels times dates.sweepDays). Each alert returned is one price-alert event ($0.01 free tier); a run with no alert costs only the start fee."
          },
          "includeVendorRates": {
            "title": "Include vendor rates",
            "type": "boolean",
            "description": "search and hotel modes; rejected in history and tracked. Default false. true adds vendorRates per hotel: each booking vendor's cheapest price before taxes (perNight, total) and with taxes (perNightWithTaxes, totalWithTaxes). No booking links. Search mode: one more request per hotel. Hotel mode: no extra request; total, guests and vendorDomain are null. Cost: a $0.0025 vendor-rates event per hotel that returns rates.",
            "default": false
          },
          "filters": {
            "title": "Filters",
            "type": "object",
            "description": "search and hotel modes. Optional object, default {}: minPrice and maxPrice (per night, in the chosen currency), minRating (0-5), hotelClass (list of star classes 1-5). Applied by the Actor after fetching; hotels failing a filter are dropped, are not charged and do not count toward maxItems. freeCancellation and amenities are rejected for now.",
            "default": {}
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "relevance",
              "price",
              "rating",
              "reviews"
            ],
            "type": "string",
            "description": "search mode only. One of relevance (default), price (lowest first), rating (highest first) or reviews (most reviewed). Google's order; maxItems keeps the first hotels in that order. No cost of its own.",
            "default": "relevance"
          },
          "currency": {
            "title": "Currency",
            "pattern": "^[A-Z]{3}$",
            "type": "string",
            "description": "search and hotel modes. Three-letter uppercase code, default USD, e.g. EUR or GBP. Prices are Google's figures in that currency and are never converted. No cost of its own.",
            "default": "USD"
          },
          "language": {
            "title": "Language",
            "pattern": "^[a-z]{2}(-[A-Z]{2})?$",
            "type": "string",
            "description": "search and hotel modes. Language code sent to Google as hl: two lowercase letters, optionally with a region (en or en-GB). Default en. No cost of its own.",
            "default": "en"
          },
          "country": {
            "title": "Country",
            "pattern": "^[a-z]{2}$",
            "type": "string",
            "description": "search and hotel modes. Two-letter lowercase code sent to Google as gl. Default us. uk returned a normal results page when tested; gb is untested. No cost of its own.",
            "default": "us"
          },
          "maxItems": {
            "title": "Max hotels",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "search and hotel modes. Most hotels returned in one run across all searches, 1 to 1,000, default 20. Filtered-out hotels and duplicates do not count. History mode ignores it (up to 100 hotels). Caps cost: at most maxItems hotel events, $0.003 each, plus vendor-rates events if enabled.",
            "default": 20
          },
          "maxItemsPerDate": {
            "title": "Max hotels per date",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "search mode only. Most hotels admitted per check-in date, 1 to 20, no default. For calendar sweeps (searches[].sweepDays): caps each date's rows, so the first date cannot use up maxItems before later dates get a turn. maxItems still caps the run's total across every date."
          },
          "watch": {
            "title": "Watch for price changes",
            "type": "boolean",
            "description": "hotel mode only; rejected in other modes and on Standby. Compares each hotel's per-night price with the last one this Actor stored for the same hotel, dates, currency and country, in a key-value store named google-hotels-watch in your own Apify account. Adds previousPerNight, changePerNight and changePct to each row. No extra request; each hotel row is still one hotel event.",
            "default": false
          },
          "resumeKey": {
            "title": "Resume key (large pulls)",
            "pattern": "^[a-z0-9-]*$",
            "maxLength": 40,
            "type": "string",
            "description": "search or hotel mode only; cannot be combined with watch. A name you choose (lowercase letters, digits and hyphens, up to 40; leave it empty to switch this off). The Actor records the hotels and dates it has delivered under this name, after every batch of rows, for 48 hours in a key-value store named google-hotels-resume in your own Apify account, and skips them in the next run with the same name, so a capped run (maxItems, a spend limit, the page limit) never delivers or charges the same hotel and dates twice. maxItems counts only new hotels. Use one name per pull and never in two runs at once (the last to finish wins). The list holds at most 5,000 stays; the run summary says if it was cut or could not be saved. If the list cannot be read at the start, the run stops before any request or charge. A crash or restart can still lose the batch being written at that moment. If a batch fails after some of its rows were stored (for example the charge for vendor rates fails), that batch is not recorded, so a rerun with the same name can deliver and charge those rows again."
          },
          "rateTable": {
            "title": "Write a rate-parity table (rate-table.csv)",
            "type": "boolean",
            "description": "search or hotel mode with includeVendorRates on only. Also writes rate-table.csv to the run's key-value store: one line per hotel with one column per booking site (Google's before-taxes price per night), the cheapest site and the spread to the highest. Built from the rows already returned: no extra request and no extra charge.",
            "default": false
          },
          "csvFiles": {
            "title": "Write spreadsheet files (hotels.csv, offers.csv)",
            "type": "boolean",
            "description": "search or hotel mode only. Also writes hotels.csv (one line per hotel row returned) and offers.csv (one line per booking site's rate, for hotels returned with vendor rates) to the run's key-value store, built from the rows already returned: no extra request and no extra charge.",
            "default": false
          },
          "watchOnlyChanges": {
            "title": "Deliver only changed hotels (with watch)",
            "type": "boolean",
            "description": "hotel mode with watch on only. A hotel whose per-night price equals the stored one is not delivered and not charged; it is counted in the run summary as watchUnchangedSkipped. Hotels with no earlier price (first run for those dates, currency and country) are still delivered and charged, because they start the baseline. Each lookup still counts toward maxItems and the 60-lookup cap. A run where every hotel is unchanged ends as a success with no rows. The comparison is on the lead per-night price only; a change in a vendor rate alone is not delivered.",
            "default": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}