Sand AISand AI MAGI-2MAGI-2 现已上线 SandBase:支持原生音频的 1080p 视频立即试用

Google Hotels Search

API 文档
https://api.sandbase.ai/v1/api/google-hotels/search

Google Hotels results for a destination and stay dates: hotels, nightly rates, ratings, amenities and offers.

价格
$0.015美元 / 次调用
方法
POST
响应
JSON
参数
4 个必填 · 0 个可选

Playground

输入
q
YYYY-MM-DD
YYYY-MM-DD
adults
输出就绪

您的输出将显示在这里

完成输入,然后点击运行。

API README

Google Hotels Search API

Returns Google Hotels results for a search phrase and stay dates. Send a destination or query in q, the check_in_date and check_out_date, and the number of adults. The response lists matching hotels with nightly rates, ratings, amenities and review data, plus a list of sponsored offers.

Use cases

  • Compare nightly rates for resorts in one destination on a given pair of dates.
  • Build a shortlist of top-rated 5-star hotels near an airport or beach using ratings and nearby places.
  • Track deals by reading the deal and deal_description fields for properties priced below their usual rate.
  • Map hotel locations from gps_coordinates to show options on a travel planning page.

Request

curl -X POST "https://api.sandbase.ai/v1/api/google-hotels/search" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"q": "Bali Resorts", "check_in_date": "2026-12-15", "check_out_date": "2026-12-16", "adults": 2}'

The result is returned in outputs[0].data.

Parameters

NameTypeRequiredDescription
adultsintegerYesadults
check_in_datestringYesYYYY-MM-DD
check_out_datestringYesYYYY-MM-DD
qstringYesq

Example response

Real response for the request above, trimmed: lists keep their first item and long strings are cut.

{
  "ads": [
    {
      "amenities": [
        "Hot tub"
      ],
      "extracted_price": 31,
      "gps_coordinates": {
        "latitude": -8.545097,
        "longitude": 115.48575900000002
      },
      "link": "https://www.google.com/aclk?sa=l&ai=DChsSEwi48L3VpOuXAxUtakcBHU6xNy0YACICCAEQERo…",
      "name": "Bhalance Hotel Retreat",
      "overall_rating": 4.7,
      "price": "$31",
      "property_token": "CgsI1eid…",
      "reviews": 167,
      "source": "Booking.com",
      "source_icon": "https://www.gstatic.com/travel-hotels/branding/icon_184.png",
      "thumbnail": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTvjG2IR0PzonYXe8V7wELVznFu…"
    }
  ],
  "brands": [
    {
      "children": [
        {
          "id": 67,
          "name": "Banyan Tree"
        }
      ],
      "id": 33,
      "name": "Accor Live Limitless"
    }
  ],
  "properties": [
    {
      "amenities": [
        "Breakfast"
      ],
      "check_in_time": "3:00 PM",
      "check_out_time": "12:00 PM",
      "deal": "46% less than usual",
      "deal_description": "Great Deal",
      "description": "Upscale oceanfront retreat with elegant rooms, suites & villas, plus 9 restauran…",
      "extracted_hotel_class": 5,
      "gps_coordinates": {
        "latitude": -8.786196799999999,
        "longitude": 115.1392512
      },
      "hotel_class": "5-star hotel",
      "images": [
        {
          "original_image": "https://lh3.googleusercontent.com/grass-cs/AABkmLc314DkNzZrU8uGbTczw8WfncDhg6d2S…",
          "thumbnail": "https://lh3.googleusercontent.com/grass-cs/AABkmLc314DkNzZrU8uGbTczw8WfncDhg6d2S…"
        }
      ],
      "link": "https://www.ayana.com/",
      "location_rating": 4.1
    }
  ],
  "search_information": {
    "total_results": 15000
  }
}

Response fields

FieldMeaning
properties[].nameName of the hotel or resort.
properties[].overall_rating / properties[].reviewsAverage guest rating and the total number of reviews for the property.
properties[].rate_per_night.extracted_display_price / properties[].rate_per_night.extracted_lowestNightly price as a number. The first is the displayed price before taxes and fees. The second is the lowest figure, which matches the after_taxes_fees value in the sample.
properties[].total_rateSame structure as rate_per_night, with price strings such as display_price and numeric extracted_ versions.
properties[].deal / properties[].deal_descriptionText such as 46% less than usual and a label such as Great Deal. Present only on some properties.
properties[].hotel_class / properties[].extracted_hotel_classStar class as text (5-star hotel) and as a number (5).
properties[].amenities[] / properties[].check_in_time / properties[].check_out_timeListed amenities and the check-in and check-out times of the property.
properties[].reviews_breakdown[]Per-category review counts (positive, neutral, negative, total_mentioned) for topics such as Property, Service and Nature.
properties[].nearby_places[]Nearby landmarks, each with a travel type (for example Taxi or Walking) and a duration.
ads[].name / ads[].extracted_price / ads[].sourceSponsored listings with the hotel name, a numeric price and the booking site shown for the offer. free_cancellation appears on some.
properties[].property_token / ads[].property_tokenIdentifier for a single property.

Notes

  • All four parameters are required. Dates use the format YYYY-MM-DD.
  • The brands array lists hotel brand groups with an id, a name and children sub-brands.
  • Prices in the sample are strings with a $ sign, and each has a matching extracted_ number you can use directly.
  • The result is returned in outputs[0].data.

Pricing

$0.015 per successful call. Failed calls are not charged.

探索更多

相关 APIs

全部 APIs
API价格响应
Google Hotels$0.015 每次调用JSON
Google Hotels$0.01 每次调用JSON
Google Hotels$0.01 每次调用JSON
Google Hotels$0.01 每次调用JSON
Google Hotels$0.01 每次调用JSON

问题

常见问题

如何使用 Google Hotels Search API?

向 https://api.sandbase.ai/v1/api/google-hotels/search 发送 POST 请求,在 Authorization 请求头中使用您的 SandBase API key(Bearer),并将参数作为 JSON 请求体传入。您也可以直接在本页的 Playground 中试用,无需编写代码。

Google Hotels Search API 的价格是多少?

每次调用 $0.015,从您的 SandBase 余额中扣费。您只需为实际调用付费;无需订阅。

Google Hotels Search API 接受哪些参数?

必填:q (string), check_in_date (string), check_out_date (string) 和 adults (integer)。 Parameters 表和本页的 Playground 列出了每个字段。

Google Hotels Search API 返回什么?

在同一个 HTTP 请求中返回的 JSON 响应(同步)。 本页的 README 包含一个示例响应。

我需要 Google Hotels 开发者账户或 API key 吗?

不需要。Google Hotels Search 通过 SandBase 运行,因此一个 SandBase API key 即可覆盖此端点以及目录中的其他所有 API 和模型。您无需单独申请 Google Hotels API 访问权限。