Hotels

Build a durable wego.com hotel search link

Builds a shareable wego.com hotel-search URL from the caller's own city, dates and occupancy. A pure, stateless string build: no search created. It carries no search-scoped id, so it does not expire: whoever opens it runs the search live.

get/v1/hotels/search-link

Query parameters

cityCodestring required
Example:BKK

City code the link searches, e.g. BKK. Take it from a places result's code or cityCode, never its numeric id. A lat/lng pair cannot be shared: wego.com serves no coordinate search URL. To link one hotel instead of a search, use the pageUrl that hotel carries.

checkInstring required

Check-in date, YYYY-MM-DD. Not in the past.

checkOutstring required

Check-out date, YYYY-MM-DD. Must be after checkIn.

adultsinteger

Adults across the link's rooms (1-9). Defaults to 2.

childreninteger

Children across the link's rooms (0-8). Defaults to 0. Sending more than 0 requires childrenAges.

childrenAgesstring

Per-child ages as a comma-separated list of integers 0-17, e.g. 5,9. The count must equal children, and it is required whenever children is above 0: the create body prices a missing age at 8, and a durable link would show that guess to a recipient who cannot correct it.

roomsinteger

Rooms the link asks for (1-4). Defaults to 1, and cannot be more than adults. Guests spread evenly and fill the earlier rooms first, so 3 adults in 2 rooms give 2 then 1, matching the way a search prices the same stay.

currencystring

Optional pricing currency as a 3-letter ISO 4217 code. When omitted the page prices in whatever the recipient's own session uses.

localestring

Page language tag (e.g. en, ar). Defaults to en.

siteCodestring

Wego market (point of sale) as a 2-letter code, e.g. AE; defaults to US. It selects the wego.com host the link points at.

Response

The durable wego.com hotel-search URL.

searchUrlstring required

A wego.com hotel-search URL for this city, dates and occupancy. Opening it runs the search live.

expiresfalse required

Always false: the URL carries no search-scoped id, so it keeps working. The prices behind it are whatever a live search returns when it is opened.

Changes

Changed in 1 of the 8 revisions of this API.1