qstring必填
Parameter defines the destination to search for: a city, a region, a district, a landmark, or an airport (e.g., `Paris`, `Tuscany`, `Manhattan`, or `Eiffel Tower`). Booking.com doesn't return results for most street addresses.
https://api.sandbase.ai/v1/api/booking/searchSearch Booking.com properties by destination and dates, with property name, price, rating, review score, address and photos.
您的輸出會顯示在這裡
完成輸入後,點擊執行。
Search Booking.com properties by destination and dates, with property name, price, rating, review score, address and photos.
curl -X POST "https://api.sandbase.ai/v1/api/booking/search" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"q": "Austin"}'
The result is returned in outputs[0].data as structured JSON.
| Name | Type | Required | Description |
|---|---|---|---|
q | string | Yes | Parameter defines the destination to search for: a city, a region, a district, a landmark, or an airport (e.g., Paris, Tuscany, Manhattan, or Eiffel Tower). Booking.com doesn't return results for most street addresses. |
hl | string | No | Parameter defines the language to use for the Booking.com search (e.g., en-us (default) for English (US), fr for French, or pt-br for Portuguese (Brazil)). Head to the Booking.com languages page for a full list of supported languages. |
currency | string | No | Parameter defines the currency of the returned prices. It defaults to hotel_currency, the currency of each property (e.g., EUR in Paris), returned in currency of each property. Head to the Booking.com currencies page for a full list o |
check_in_date | string | No | Parameter defines the check-in date. The format is YYYY-MM-DD (e.g., 2026-12-12). It must be used together with check_out_date. When dates aren't set, Booking.com returns properties without prices. |
check_out_date | string | No | Parameter defines the check-out date. The format is YYYY-MM-DD (e.g., 2026-12-15). It must be used together with check_in_date, and be up to 90 nights later than it. |
flex_window | string | No | Parameter defines how many days the check-in and check-out dates can move, earlier or later, for the best price of each property. Each property then has the dates of its price in check_in_date and check_out_date. It must be used togethe |
adults | string | No | Parameter defines the number of adults, from 1 to 30. It defaults to 2. |
children | string | No | Parameter defines the number of children, from 0 (default) to 10. Their ages must be set with children_ages. |
children_ages | string | No | Parameter defines the age of each child at check-out, from 0 to 17. It's a comma-separated list of ages (e.g., 5 for one child, or 5,9 for two children). When children isn't set, it's the number of ages. |
rooms | string | No | Parameter defines the number of rooms, from 1 (default) to 30. It can't be greater than the number of adults. |
sort_by | string | No | Parameter defines the sorting of the results. It defaults to popularity (Our top picks). Available options: popularity - Our top picks upsort_bh - Homes & apartments first price - Price (lowest first) price_from_high_to_low - Pric |
min_price | string | No | Parameter defines the minimum price per night, in the currency of the results (e.g., 100). It must be used together with a currency code. |
max_price | string | No | Parameter defines the maximum price per night, in the currency of the results (e.g., 300). It must be used together with a currency code. |
hotel_class | string | No | Parameter defines the property ratings to show: stars for hotels, or Booking.com's own rating for homes and apartments. It's a comma-separated list of ratings from 1 to 5 (e.g., 4,5 for 4 and 5-star properties). |
rating | string | No | Parameter defines the minimum review score of the properties. Available options: 9 - Wonderful: 9+ 8 - Very Good: 8+ 7 - Good: 7+ 6 - Pleasant: 6+ |
free_cancellation | string | No | Parameter defines whether to only show properties with free cancellation. It can be set to true or false (default). |
property_types | string | No | Parameter defines the property types to show. It's a comma-separated list of property type IDs (e.g., 204 for hotels, or 201,220 for apartments and vacation homes). Head to the Booking.com property types page for a full list of supporte |
nflt | string | No | Parameter defines any other Booking.com filters, like amenities, meals, districts, brands, or distance from the center. It's the value of the nflt parameter of Booking.com search URLs: a semicolon-separated list of filters (e.g., `hotelfa |
offset | string | No | Parameter defines the result offset. It skips the given number of results. It's used for pagination. (e.g., 0 (default) is the first page of results, 25 is the 2nd page of results with the default limit, etc.). It can be up to 1000: |
limit | string | No | Parameter defines the maximum number of results to return, from 1 to 100. It defaults to 25, like on Booking.com. Booking.com sometimes returns a few more properties: sponsored ones, or the searched property. |
session_token | string | No | Parameter defines the token that keeps the same Booking.com visitor between searches. Booking.com ranks properties differently for each visitor, so without it, the next pages can repeat properties of the previous ones. It's returned in `the |
device | string | No | Parameter defines the device to use to get the results. It can be set to desktop (default) to use a regular browser, tablet to use a tablet browser (currently using iPads), or mobile to use a mobile browser. |
json_restrictor | string | No | Parameter defines the fields you want to include in the output, reducing payload size for faster response. See the JSON Restrictor documentation for more details. |
$0.010 per successful call. Failed calls are not charged.
開始建置
具備統一驗證與用量追蹤的平台 API 端點。
curl -X POST "https://api.sandbase.ai/v1/api/booking/search" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"q": "Austin"
}'請將您的 SandBase API 金鑰設定在伺服器環境中。請求使用 Bearer 驗證。
export SANDBASE_API_KEY="YOUR_API_KEY"請將金鑰保留在伺服器端,不要在瀏覽器程式碼中公開。
qstring必填Parameter defines the destination to search for: a city, a region, a district, a landmark, or an airport (e.g., `Paris`, `Tuscany`, `Manhattan`, or `Eiffel Tower`). Booking.com doesn't return results for most street addresses.
hlstringParameter defines the language to use for the Booking.com search (e.g., `en-us` (default) for English (US), `fr` for French, or `pt-br` for Portuguese (Brazil)). Head to the Booking.com languages page for a full list of supported languages.
currencystringParameter defines the currency of the returned prices. It defaults to `hotel_currency`, the currency of each property (e.g., `EUR` in Paris), returned in `currency` of each property. Head to the Booking.com currencies page for a full list of supported currency codes.
check_in_datestringParameter defines the check-in date. The format is **YYYY-MM-DD** (e.g., `2026-12-12`). It must be used together with `check_out_date`. When dates aren't set, Booking.com returns properties without prices.
check_out_datestringParameter defines the check-out date. The format is **YYYY-MM-DD** (e.g., `2026-12-15`). It must be used together with `check_in_date`, and be up to 90 nights later than it.
flex_windowstringParameter defines how many days the check-in and check-out dates can move, earlier or later, for the best price of each property. Each property then has the dates of its price in `check_in_date` and `check_out_date`. It must be used together with `check_in_date` and `check_out_date`. Available options: `1` - ± 1 day `2` - ± 2 days `3` - ± 3 days `7` - ± 7 days
adultsstringParameter defines the number of adults, from `1` to `30`. It defaults to `2`.
childrenstringParameter defines the number of children, from `0` (default) to `10`. Their ages must be set with `children_ages`.
children_agesstringParameter defines the age of each child at check-out, from `0` to `17`. It's a comma-separated list of ages (e.g., `5` for one child, or `5,9` for two children). When `children` isn't set, it's the number of ages.
roomsstringParameter defines the number of rooms, from `1` (default) to `30`. It can't be greater than the number of `adults`.
sort_bystringParameter defines the sorting of the results. It defaults to `popularity` (Our top picks). Available options: `popularity` - Our top picks `upsort_bh` - Homes & apartments first `price` - Price (lowest first) `price_from_high_to_low` - Price (highest first) `review_score_and_price` - Best reviewed & lowest price `bayesian_review_score` - Top reviewed `class` - Property rating (high to low) `class_asc` - Property rating (low to high) `class_and_price` - Property rating and price `distance_from_search` - Distance from downtown `closest_beach_distance_v2` - Distance from closest beach `closest_sk
min_pricestringParameter defines the minimum price per night, in the currency of the results (e.g., `100`). It must be used together with a `currency` code.
max_pricestringParameter defines the maximum price per night, in the currency of the results (e.g., `300`). It must be used together with a `currency` code.
hotel_classstringParameter defines the property ratings to show: stars for hotels, or Booking.com's own rating for homes and apartments. It's a comma-separated list of ratings from `1` to `5` (e.g., `4,5` for 4 and 5-star properties).
ratingstringParameter defines the minimum review score of the properties. Available options: `9` - Wonderful: 9+ `8` - Very Good: 8+ `7` - Good: 7+ `6` - Pleasant: 6+
free_cancellationstringParameter defines whether to only show properties with free cancellation. It can be set to `true` or `false` (default).
property_typesstringParameter defines the property types to show. It's a comma-separated list of property type IDs (e.g., `204` for hotels, or `201,220` for apartments and vacation homes). Head to the Booking.com property types page for a full list of supported property types.
nfltstringParameter defines any other Booking.com filters, like amenities, meals, districts, brands, or distance from the center. It's the value of the `nflt` parameter of Booking.com search URLs: a semicolon-separated list of filters (e.g., `hotelfacility=107;mealplan=1;di=2286`). The filters available for a search, with their values, are in `filters` of the results.
offsetstringParameter defines the result offset. It skips the given number of results. It's used for pagination. (e.g., `0` (default) is the first page of results, `25` is the 2nd page of results with the default `limit`, etc.). It can be up to `1000`: Booking.com returns the same properties for larger offsets, even when it finds more properties.
limitstringParameter defines the maximum number of results to return, from `1` to `100`. It defaults to `25`, like on Booking.com. Booking.com sometimes returns a few more properties: sponsored ones, or the searched property.
session_tokenstringParameter defines the token that keeps the same Booking.com visitor between searches. Booking.com ranks properties differently for each visitor, so without it, the next pages can repeat properties of the previous ones. It's returned in `the API_pagination.session_token`, and the links of `the API_pagination` already include it.
devicestringParameter defines the device to use to get the results. It can be set to `desktop` (default) to use a regular browser, `tablet` to use a tablet browser (currently using iPads), or `mobile` to use a mobile browser.
json_restrictorstringParameter defines the fields you want to include in the output, reducing payload size for faster response. See the JSON Restrictor documentation for more details.
這是此 API 的已儲存範例回應;檢視時不會發出即時請求。
尚未發布已儲存回應。請在 Playground 中執行 API 以檢視其回應。
探索更多
| API | 價格 | 回應 |
|---|---|---|
Booking.com Search此 API Booking.com | 每次呼叫 $0.01 | JSON |
問題
使用 POST 請求將您的 SandBase API 金鑰放在 Authorization 標頭(Bearer)中,並以 JSON 主體傳入參數,即可呼叫 https://api.sandbase.ai/v1/api/booking/search。您也可以直接在本頁的 Playground 試用,不必撰寫程式碼。
每次 $0.01,並從您的 SandBase 餘額中扣款。您只會為實際發出的呼叫付費;沒有訂閱方案。
必要:q (string)。 選填:hl (string), currency (string), check_in_date (string), check_out_date (string), flex_window (string) 和 adults (string),以及另外 16 個。 本頁的 Parameters 表格與 Playground 會列出每個欄位。
在同一個 HTTP 請求中回傳的 JSON 回應(同步)。
不需要。Booking.com Search 是透過 SandBase 運作,因此一組 SandBase API 金鑰即可使用此端點以及目錄中的其他所有 API 和模型。您不需要另外申請 Booking.com API 存取權。