酒店 API

酒店搜索、报价与预订

解析目的地、列出房源、校验报价并确认。一套 REST 流程,价格统一为美元。

POST /v2/Hotel/HotelAvailability
{
  "CheckIn": "2026-11-14",
  "CheckOut": "2026-11-16",
  "CityId": 11111111456928,
  "Occupancies": [ { "AdultCount": 2 } ],
  "Sort": "price"
}
概览

酒店库存庞大且价格变动快。此住宿 API 提供公开地点搜索、城市与酒店两种模式的库存、带保留时窗的报价校验,以及先预订后确认的清晰流程。

一套住宿 API 立于数百万家酒店之前,从全球连锁到独立精品。可用性、餐食类型、取消政策与税费以统一的结构和币种返回,让你的酒店预订网站或 App 无需协调十几种供应商格式。

你将获得

1

公开地点搜索可直接接入自动补全输入框。

2

一个库存接口即可列出整座城市,或展开单家酒店及其房型。

3

校验报价、锁定房间,随后确认并扣款,全部以美元计。

4

一个端点同时支持按城市和按酒店搜索,从整座目的地到单个酒店。

5

运价校验会打开一个短暂的锁定窗口,让你展示的价格就是下单的价格。

流程如何运作

01

Resolve

Turn a destination string into a place id with public place search.

02

Search

List availability for a whole city, or open a single property with its rooms.

03

Validate

Confirm the live rate and open a short hold window.

04

Book

Place the order and confirm; your balance is charged on confirmation.

关键接口

GET/Hotel/PlaceSearchResolve a destination into a place id.
POST/v2/Hotel/HotelAvailabilityList availability in city or hotel mode.
POST/Hotel/RateValidateValidate the selected rate and hold it.
POST/Hotel/HotelBookCreate and confirm the booking.
GET/Hotel/BookingDetailsRetrieve a booking and its status.

请求与响应

Request · POST /v2/Hotel/HotelAvailability
{
  "CheckIn": "2026-11-14",
  "CheckOut": "2026-11-16",
  "CityId": 11111111456928,
  "Occupancies": [ { "AdultCount": 2 } ],
  "Sort": "price"
}
Response · 200 OK
{
  "hotels": [
    {
      "hotelId": "HTL-9931",
      "name": "Marina Suites",
      "stars": 4,
      "lowestRate": {
        "amount": 180.00, "currency": "USD", "board": "BB"
      },
      "rooms": [ { "code": "DLX-K", "refundable": true } ]
    }
  ]
}

响应包含什么

hotelId
Stable id for the property.
lowestRate
Cheapest bookable rate, in USD, with board type.
rooms
Room options with codes and refundability.
cancellationPolicy
Deadlines and penalties that apply to the rate.
hold
Minutes the validated rate stays bookable.
500万+

全球酒店

常见问题

如何把目的地变成一次搜索?

调用公开地点搜索把文本解析为 id,再把该 id 传给库存接口。

校验后的报价有效多久?

十五分钟。请在该时窗内使用返回的票价代码完成预订。

何时扣除我的余额?

仅在你下单确认时扣款。预订只会锁定房间而不扣款。

运价包含税费吗?

包含。每个运价都带有币种、餐食类型以及税费明细,全部归一化为美元。

可以直接打开单个酒店吗?

可以。酒店模式打开一个酒店及其房型,城市模式列出整座目的地。

用一个 API 打造你的旅游产品。

接入免费。每张票 1%,每单最高 10 美元。航班、酒店与活动的实时覆盖。