{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Hotels Scraper (leads, emails, phones, prices)",
    "description": "Google Hotels scraper for hotel leads worldwide: emails, phone numbers, websites, WhatsApp and social profiles, ratings, amenities and OTA prices - plus a daily price & availability matrix (any dates, 1-6 guests, any currency). Multi-city or single-hotel. Pay per result.",
    "version": "0.1",
    "x-build-id": "2ErNOkH7OCBmMou0d"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/songd~hotel-leads-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-songd-hotel-leads-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/songd~hotel-leads-scraper/runs": {
      "post": {
        "operationId": "runs-sync-songd-hotel-leads-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/songd~hotel-leads-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-songd-hotel-leads-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": {
          "searches": {
            "title": "City Searches",
            "type": "array",
            "description": "One entry per city to discover and enrich. Each item: city (required), country (required, ISO alpha-2), region (optional disambiguation, e.g. 'TX' or 'Bavaria'), checkInDate/checkOutDate (optional, YYYY-MM-DD — falls back to the top-level dates), maxHotels (optional cap for this city).",
            "items": {
              "type": "object",
              "properties": {
                "city": {
                  "title": "City",
                  "type": "string",
                  "description": "City name as you would type it into Google Hotels (e.g. 'Lisbon', 'Belo Horizonte')."
                },
                "country": {
                  "title": "Country (ISO alpha-2)",
                  "type": "string",
                  "description": "Two-letter ISO country code used as the Google Travel point-of-sale for this search (e.g. 'PT', 'BR')."
                },
                "region": {
                  "title": "Region",
                  "type": "string",
                  "description": "Optional disambiguation for same-named cities (e.g. 'Illinois' for Springfield, 'Bavaria' for Munich)."
                },
                "checkInDate": {
                  "title": "Check-in date",
                  "type": "string",
                  "description": "First check-in date for prices and the matrix anchor (YYYY-MM-DD). Falls back to the top-level dates."
                },
                "checkOutDate": {
                  "title": "Check-out date",
                  "type": "string",
                  "description": "Check-out date of the reference stay (YYYY-MM-DD). Also bounds the matrix window: every check-in date starting a stay inside [checkIn, checkOut) is swept. Falls back to the top-level dates."
                },
                "matrixStartDate": {
                  "title": "Matrix start date",
                  "type": "string",
                  "description": "First matrix check-in date for THIS search (overrides top-level matrixStartDate)."
                },
                "matrixEndDate": {
                  "title": "Matrix end date",
                  "type": "string",
                  "description": "Last matrix check-in date for THIS search (inclusive; overrides top-level matrixEndDate)."
                },
                "matrixNights": {
                  "title": "Nights per stay",
                  "type": "integer",
                  "description": "Overrides top-level matrixNights for THIS search."
                },
                "maxHotels": {
                  "title": "Max hotels",
                  "type": "integer",
                  "minimum": 1,
                  "description": "Cap for this city. When capping, the most informative hotels are kept first (priced and named). An explicit cap also skips the adaptive grid growth — it doubles as a cost control."
                }
              },
              "required": [
                "city",
                "country"
              ]
            }
          },
          "hotels": {
            "title": "Specific Hotels",
            "type": "array",
            "description": "Google Travel entity tokens (Ch...) or hotel names. When set, ONLY these hotels are price-scraped/enriched and city discovery is skipped (single-hotel price-matrix parity).",
            "items": {
              "type": "string"
            }
          },
          "country": {
            "title": "Point-of-sale Country",
            "type": "string",
            "description": "Two-letter ISO code of the Google Travel point-of-sale used for Specific Hotels lookups and as the default for city searches (prices/currency presentation). City searches may carry their own country.",
            "default": "US"
          },
          "minRating": {
            "title": "Min Google Rating",
            "minimum": 0,
            "maximum": 5,
            "type": "number",
            "description": "Only push hotels whose Google rating is at least this value (0 disables the filter). Filters the dataset, not the crawl."
          },
          "scope": {
            "title": "City Area",
            "enum": [
              "municipality",
              "metro"
            ],
            "type": "string",
            "description": "municipality (default) or metro — metro sweeps the wider metropolitan area where the gazetteer has it (Brazil always; elsewhere best-effort).",
            "default": "municipality"
          },
          "gridSize": {
            "title": "Discovery Grid Size",
            "minimum": 1,
            "maximum": 6,
            "type": "integer",
            "description": "Base tile grid side N (N x N area tiles swept per city, 1-6). Bigger grids surface more of Google's rank-truncated results on large cities. Leave empty for adaptive coverage: the actor grows the grid automatically until results cover Google's own reported count for the city."
          },
          "fpMaxDepth": {
            "title": "Grid Escalation Depth (first pages)",
            "minimum": 1,
            "maximum": 6,
            "type": "integer",
            "description": "How deep the batched first-page grid escalation grows (level N = gridSize x 2^N tiles per axis). First pages are the cheapest discovery phase (~1 POST per 48 tiles) and measured ~10x more entries per request than chained tiles, so this bound sits above the chain depth. Default 4 (gridSize 3 -> up to 48x48 tiles).",
            "default": 4
          },
          "chainMaxDepth": {
            "title": "Grid Escalation Depth (chained tiles)",
            "minimum": 1,
            "maximum": 6,
            "type": "integer",
            "description": "Escalation levels (gridSize x 2^N) that also run per-tile pagination chains — the expensive completeness phase (~7-10 requests per tile). Keep at or below fpMaxDepth. Default 2 (gridSize 3 -> chains up to the 12x12 grid).",
            "default": 2
          },
          "escalateMinNew": {
            "title": "Escalation Stop Threshold",
            "minimum": 0,
            "type": "integer",
            "description": "Marginal-yield stop: when an escalation phase adds fewer NEW hotels than this, the walk stops (deeper uniform grids are density-exhausted). Default 30.",
            "default": 30
          },
          "partitionSweep": {
            "title": "Query-Partition Sweep",
            "type": "boolean",
            "description": "After the grid escalation, re-sweep the deepest productive grid under partition phrases (\"hostels in X\", \"guest houses in X\", \"apartments in X\", ...). Google truncates its ranked list per QUERY, not per city, so each partition surfaces properties the generic ranking never shows. Adds one batched request per ~48 tiles per phrase.",
            "default": true
          },
          "queryPartitions": {
            "title": "Query Partitions",
            "type": "array",
            "description": "Partition phrases swept before the city name (see Query-Partition Sweep). Each phrase becomes \"<phrase> in <city>\".",
            "items": {
              "type": "string"
            },
            "default": [
              "hostels",
              "guest houses",
              "apartments",
              "budget hotels",
              "luxury hotels"
            ]
          },
          "includeContacts": {
            "title": "Enrich Entity Pages (contacts)",
            "type": "boolean",
            "description": "Fetch each hotel's Google Travel entity page: phone, email, website, WhatsApp, socials, amenities and OTA references. Charged per hotel-detail event.",
            "default": true
          },
          "includeMatrix": {
            "title": "Price / Availability Matrix",
            "type": "boolean",
            "description": "Sweep a daily price/availability matrix. For city searches: every check-in date in the matrix window (explicit matrixStartDate..matrixEndDate range if given, else the stay range, else matrixDays from check-in) x each guests combination. For specific hotels: prices for every check-in date in the window. Charged per price-rows event.",
            "default": false
          },
          "matrixStartDate": {
            "title": "Matrix Start Date",
            "pattern": "^$|^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "First check-in date of the price matrix (YYYY-MM-DD). Overrides the stay-date window and matrixDays; a per-search matrixStartDate in the search entry wins over this top-level value. Leave empty to keep the default window behavior."
          },
          "matrixEndDate": {
            "title": "Matrix End Date",
            "pattern": "^$|^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Last check-in date of the price matrix (YYYY-MM-DD, INCLUSIVE). Requires matrixStartDate. Without it, matrixDays dates are swept from matrixStartDate."
          },
          "matrixDays": {
            "title": "Matrix Days",
            "minimum": 1,
            "maximum": 366,
            "type": "integer",
            "description": "Number of consecutive check-in dates swept when no explicit matrix range (matrixStartDate/matrixEndDate) and no explicit check-out range is given. Ignored when matrixStartDate or an explicit checkOutDate defines the window.",
            "default": 14
          },
          "matrixNights": {
            "title": "Nights per Matrix Stay",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "Length of each priced stay in nights (1-30, default 1). Applies to matrix combos AND to featured prices when the stay dates don't define the length.",
            "default": 1
          },
          "checkInDate": {
            "title": "Check-in Date (fallback)",
            "pattern": "^$|^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Top-level fallback check-in date (YYYY-MM-DD) for Specific Hotels mode and for city searches without their own dates. Empty = rolling +30 days from today."
          },
          "checkOutDate": {
            "title": "Check-out Date (fallback)",
            "pattern": "^$|^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Top-level fallback check-out date (YYYY-MM-DD). Empty = rolling +31 days from today."
          },
          "guests": {
            "title": "Guests Combinations",
            "type": "array",
            "description": "Adult counts swept in the price matrix (1-6 per combination).",
            "items": {
              "type": "integer",
              "minimum": 1,
              "maximum": 6
            },
            "default": [
              1,
              2
            ]
          },
          "currency": {
            "title": "Currency",
            "type": "string",
            "description": "ISO currency code used for all prices (Google Travel point-of-sale parameter).",
            "default": "USD"
          },
          "locale": {
            "title": "Locale",
            "type": "string",
            "description": "UI locale for Google Travel (e.g. en-US, pt-BR).",
            "default": "en-US"
          },
          "maxResults": {
            "title": "Max Results per Search",
            "minimum": 1,
            "type": "integer",
            "description": "Cap the hotels pushed per city search (default 20). When capping, the most informative hotels are kept first (priced and named), so a capped run is still lead-ready. An explicit cap also skips the adaptive grid growth — it doubles as a cost control. Empty the field for no cap (uncapped city-wide discovery).",
            "default": 20
          },
          "skipSiteCrawl": {
            "title": "Skip Hotel Website Crawl",
            "type": "boolean",
            "description": "Disable crawling hotel websites for extra contacts/marketing signals (faster, cheaper runs).",
            "default": false
          },
          "resume": {
            "title": "Resume Previous State",
            "type": "boolean",
            "description": "Restore the crawl state (matrix combos already swept, recently enriched hotels) from the previous run's snapshot in the actor's Key-Value store. Use for crash recovery; scheduled price monitoring should keep this OFF so prices are fresh every run.",
            "default": false
          },
          "debug": {
            "title": "Debug Logging",
            "type": "boolean",
            "description": "Enable verbose DEBUG logging for the run.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}