API reference
Search
Create a search, read its ranked results, and fetch full rate sheets for individual products.
Check capabilities
/api/v1/search/capabilitiesWhich product types are on sale in a market. Query: market, a 2-letter country code (default US). Anything else returns 400 validation_error.
{ "data": { "productTypes": ["hotel", "flight", "activity", "transfer"] }, "meta": {}, "error": null }Create a search
/api/v1/searchReturns 201 with a searchId. Hotel searches return once the first batch is priced, or after about 4 seconds if that takes longer, and keep filling in the background; other products return complete. A hotel search that matches no hotels still returns 201 and completes with no results.
Common fields
| Field | Description |
|---|---|
productType"hotel" | "flight" | "activity" | "transfer"required | What to search for. |
occupancyarray, 1–9 entriesrequired | Hotels: one entry per room, up to 9. Other products: one entry for the whole party (at most 8 entries). Each entry has adults (1–8; hotels 1–6) and childrenAges (integers 0–17, up to 6; hotels up to 4). Send [] for no children. |
currencyISO 4217required | Currency to price in. Use your wallet currency. |
marketISO 3166-1 alpha-2required | Your point of sale. |
residencyISO 3166-1 alpha-2hotels | Lead guest's passport country. Required for hotels, optional otherwise. |
destinationstring, 2–80hotels, activities, flights | Place name, or the arrival IATA code for flights. Not used for transfers or multi-city flights. |
checkInYYYY-MM-DDhotels, activities, flights | Hotel check-in (up to 730 days ahead), activity date, or outbound flight date. |
checkOutYYYY-MM-DDhotels | Hotel check-out, after checkIn and at most 30 nights later. For flights, the return date. |
Hotel fields
| Field | Description |
|---|---|
destinationCountryCodeISO alpha-2 | Country of the destination. Disambiguates names. |
destinationCityRegionIdinteger ≥ 1 | A city's cityRegionId from suggest. |
destinationCityRegionIdsinteger[], up to 50 | Several region IDs, e.g. a city and its surroundings (cityRegionIds from suggest). |
hotelIdstring, 1–120 | Price a single hotel: its canonicalId from suggest. Hotels only. |
nearobject | lat (−90–90), lng (−180–180), radiusKm (0.5–50). Hotels near a point. |
propertyTypesstring[] | Any of hotel, resort, aparthotel, vacation_home, bed_and_breakfast, hostel, unique, other. |
rateMode"net" | "commissionable" | Rate model, when your agency lets advisors choose. Otherwise ignored. |
querystring, up to 120 | Free-text search of the hotel catalogue. Without hotelId or near, it replaces the destination filter. Prefer region IDs from suggest. |
Flight fields
| Field | Description |
|---|---|
originIATA codeone-way/return | Departure airport or city. |
slicesarray, up to 6multi-city | Legs as origin, destination, date. |
cabinClass"economy" | "premium_economy" | "business" | "first" | Preferred cabin. |
Activity fields
| Field | Description |
|---|---|
destinationCodestring, 1–20 | Destination code from GET /destinations?productType=activity. Strongly recommended. |
Transfer fields
| Field | Description |
|---|---|
pickupLocationobjectrequired | type: airport | hotel | address; code: IATA code, hotel canonicalId, or "lat,lng". |
dropoffLocationobjectrequired | Same shape as pickupLocation. |
pickupAtISO 8601 date-timerequired | Pickup date and time. |
returnAtISO 8601 date-time | Return pickup, for a return journey. |
passengersinteger ≥ 1 | Overrides the adult count only; children from childrenAges are still added. Leave it out to use occupancy. |
luggageinteger ≥ 0 | Accepted but not currently used. |
{ "data": { "searchId": "66f1c0a2e4b0c1d2e3f4a5b6" }, "meta": {}, "error": null }Errors: 400 validation_error, 400 unknown_destination (activities only), 400 invalid_hotel_selection, 404 not_found (unknown hotelId), 403 api_key_owner_missing.
Read results
/api/v1/search/:searchId/results| Query | Description |
|---|---|
limit | Rows per page. Default 20. Values above 500 are capped at 500; zero, negative or non-integer values return 400 invalid_limit. |
cursor | meta.nextCursor from the previous page. |
groupByProduct | true to page by product: limit counts products, and every listing row for each product on the page is returned, in rank order across the page. Group rows by canonicalProductId; the first row you meet for a product is its top-ranked rate. For hotels, the listing holds each source's cheapest rate for the hotel — the full rate sheet has the rest. |
data is an array of rows, ranked. Hotels are priced in batches of 300: within a batch, rows are cheapest first, with refundable rates preferred when prices are within 2%. Rows from later batches and slower sources come after.
| Field | Description |
|---|---|
_idstring | Row ID. |
productTypestring | As searched. |
canonicalProductIdstring | The product: a hotel's canonicalId, or an activity, transfer or flight option. Use it for rate sheets and content. |
rateQuoteIdstring | The ID you price-check and book. |
supplierstring | An opaque source alias such as src-3fa1c2. Tells you two rates come from different sources; it is stable for a deployment but carries no other meaning. |
rankinteger | Position in the ranking; lower is better. |
sellAmountMinorinteger | Price in minor units. |
sellCurrencyISO 4217 | Currency of sellAmountMinor. |
refundableboolean | Whether the rate can be cancelled for a refund at all. |
summaryobject | Display fields. Hotels: hotelName, starRating, cityName, neighborhoodName, coordinates, roomName, roomDescription, boardBasis, rateName, roomGroupKey, roomGroupLabel, cancellationPolicy, excludedTaxes, rateComments, isPackage (always a boolean), requiresGuestTitle (when true, send a title on every traveller), agencyCommission (commissionable rates; otherwise null). Rate-sheet rows don't carry coordinates. Transfers include tripType ("round" when one row covers both directions). See each product guide for its fields. Fields a source doesn't provide are null. roomGroupKey only groups rooms of one hotel within one search: group rows only when both canonicalProductId and roomGroupKey match, because different hotels can share a key for a common room name. It can change on the next search, so don't store it or compare it across searches. |
"meta": {
"nextCursor": "MjA",
"session": {
"status": "partial",
"batchProgress": { "done": 1, "total": 3 },
"lateArrivals": 0,
"supplierOutcomes": [
{ "supplier": "src-3fa1c2", "status": "success", "latencyMs": 812, "rateCount": 143 }
]
}
}meta.session.status is pending, partial (still filling), completed or failed. lateArrivals counts every row that arrived late from a slower source — re-read from the first page when it rises. It is absent until something arrives late.
Errors: 404 not_found, 403 forbidden (another agency's search), 400 invalid_cursor, 400 invalid_limit.
Get a hotel's rate sheet
/api/v1/search/:searchId/hotels/:productId/ratesQueries live inventory for one hotel in the search and returns every room and rate, as an array of rows in the same shape as results. :productId is the hotel's canonicalProductId. No body. It queries every source live, so it can take several seconds.
The rows it returns are fresh quotes, each valid for 20 minutes, and the search itself is extended by 20 minutes. Quote IDs you got earlier — from results or a previous rate sheet — keep their original expiry.
Errors: 400 invalid_product_type (not a hotel search), 410 search_expired, 404 not_found, 403 forbidden.
Get all options for a product
/api/v1/search/:searchId/products/:productId/ratesEvery option the search saved for one product — all modalities and sessions of an activity, all vehicles for a transfer. For these it returns the rows you already have, with their original quote IDs: it doesn't query live inventory, create new quotes or extend the search. A product with no saved options returns an empty array. For hotels it behaves like the rate sheet above.
Errors: 410 search_expired, 404 not_found (unknown search), 403 forbidden.