Google Hotels 搜索 API
Search Google Hotels by destination and dates and get hotels with their Google property ID, nightly price, rating, review count, coordinates, star class and photos as normalized JSON.
价格与服务商
Google Hotels 搜索 API 价格:一个 API,2 个可互换的服务商
最便宜的服务商优先响应。如果它失败,下一个会在同一次调用中接手。
试一试
一个请求获取 Google Hotels 搜索
{
"data": {
"currency": "USD",
"hotels": [
{
"amenities": [
"example"
],
"description": "A short example description of this item.",
"images": [
"https://example.com/image.jpg"
],
"latitude": 37.7749,
"longitude": -122.4194,
"name": "Example title",
"pricePerNight": 19.99,
"propertyToken": "a1b2c3d4",
"rating": 4.6,
"reviewsCount": 12500,
"stars": 5,
"totalPrice": 19.99
}
]
},
"found": true,
"reason": "not_found"
}完整的参数与响应参考:这个接口的每个字段、类型和示例。
参考
一个请求,一种响应结构。
你发送的每个字段和收到的每个字段,都附有真实示例。
最近验证于 2026-11-20 · 可用率和延迟按 30d 统计
请求体
JSON,POST 到这个接口。
- checkInstring
2026-12-20
Check-in date in YYYY-MM-DD format (e.g. 2027-04-13). Today or later.
- checkOutstring
2026-12-22
Check-out date in YYYY-MM-DD format (e.g. 2027-04-15). After the check-in date.
- countryenum
us
Two-letter lowercase ISO 3166-1 country code of the destination (e.g. us, pt, jp). It must be the country the hotels are in: results are searched from that country.
- querystring
hotels near times square new york
What to search for, usually a destination or landmark (e.g. hotels near times square new york).
- adultsinteger
Number of adult guests (default 2).
- childrenAgesarray
Age of each child guest, one entry per child (e.g. [5, 8] for two children aged 5 and 8). Omit it when no children are staying.
- currencystring
ISO 4217 currency code for prices (e.g. USD, EUR, JPY; default USD).
- requireFieldsarray
Optional; omit it and routing is unchanged, with the cheapest source serving. Name the output fields this request must be able to return, for example `totalPrice` or `amenities`, and it is served only by a source that returns every one of them. Fields you do not name are still returned whenever the serving source has them. This can raise your price: when the cheapest source cannot return a named field, a dearer source serves, and you are quoted and charged its price. A named field can still be absent on a hotel that genuinely lacks it. Naming a combination that no single source returns together is refused as invalid input, with no charge.
响应
JSON,每个字段一个示例值。
Result payload, or null when nothing was found.
- currencystring
ISO 4217 currency code every price in this response is in. Populated whenever the provider has data for the entity.
Hotels matching the search, in Google's order. Populated whenever the provider has data for the entity.
- amenitiesstring[]可设为必填
Highlighted amenities (e.g. Free Wi-Fi, Parking), or null when unknown.
- descriptionstring可设为必填
Short description of the hotel, or null when unknown.
- imagesstring[]
Preview photo URLs of the hotel.
- latitudenumber
Latitude of the hotel. Populated whenever the provider has data for the entity.
- longitudenumber
Longitude of the hotel. Populated whenever the provider has data for the entity.
- namestring
Hotel name.
- pricePerNightnumber
Lowest nightly price for the requested dates and guests, in the response currency, or null when no price is offered. Populated whenever the provider has data for the entity.
- propertyTokenstring
Google Hotels property ID. Pass it to google_hotels.details for this hotel's full record.
- ratingnumber
Average guest rating out of 5, or null when the hotel has no ratings. Populated whenever the provider has data for the entity.
- reviewsCountinteger
Number of guest reviews. Populated whenever the provider has data for the entity.
- starsinteger
Hotel star class (1-5), or null when the property has none.
- totalPricenumber可设为必填
Lowest total price for the whole stay, in the response currency, or null when unknown.
- foundboolean
Whether any hotels were found.
- reason"not_found"
Present only when `found` is false, and says why there is no result. `not_found`: the source states the target does not exist, or returned nothing for it. A `found: false` answer is a successful call, not an error, and `costUsd` is what it actually cost.
常见问题
关于 Google Hotels 搜索 API
AnyAPI 的 Google Hotels 搜索 API 只需一次 POST 请求 /v1/run/google_hotels.search,就以统一格式的 JSON 返回 Google Hotels 数据。Search Google Hotels by destination and dates and get hotels with their Google property ID, nightly price, rating, review count, coordinates, star class and photos as normalized JSON.AnyAPI 会在 2 个数据源之间路由每个请求,某个数据源失败时自动切换。费用:每千次请求 US$1.50 起,以美元计价,无需订阅,也没有每月最低消费。过去 30 天,通过 AnyAPI 发起的 Google Hotels 搜索 API 调用中有 99.4% 成功,响应时间中位数为 4.5 秒,共测量 180 次调用。