Hotels
Search hotels
Find hotels with indicative prices.
Usage
fortrip hotels search --check-in YYYY-MM-DD --check-out YYYY-MM-DD [options]Options
| Flag | Field | Description |
|---|---|---|
-q, --query <text> | query | Hotel name, brand or city to search for. Provide at least one of --query, --city-code or --near. |
--city-code <n> | cityCode | Catalogue city code, as returned in hotels[].cityCode. |
--near <lat,lng,km> | near | Search around a point, as lat,lng,radiusKm (radius up to 200), e.g. 13.75,100.5,5. |
--check-in YYYY-MM-DD | checkIn | Check-in date, yyyy-MM-dd. |
--check-out YYYY-MM-DD | checkOut | Check-out date, yyyy-MM-dd. Stays are 1 to 15 nights. |
--star-min <n> | starMin | Lowest star rating to include. |
--star-max <n> | starMax | Highest star rating to include. |
--facility <name>... | facilities | Facilities every hotel must have. Names must match the catalogue exactly (case-insensitive), e.g. Swimming pool, Parking. |
--price-min <n> | priceMin | Lowest average nightly price, in currency. Applied to indicative prices. |
--price-max <n> | priceMax | Highest average nightly price, in currency. |
--sort recommended|price-asc|price-desc|star-desc|distance | sortBy | Result order. recommended sorts by distance with near, by relevance with query, otherwise by catalogue weight. distance requires near. |
--page <n> | page | Page number. |
--page-size <n> | pageSize | Hotels per page. |
--currency CNY|USD | currency | Currency to show prices in. Prices are converted from the supplier's at Stripe's exchange rate; the response's fx says how. |
--body <json|@file.json> | — | The raw request body as a JSON object, or @file.json to read it from a file. Flags override its fields. |
Output
Prints the Search result object on stdout. Errors go to stderr with an exit code.