# Search hotels (/api-reference/hotels/search)

`GET https://api.voyagelabs.ai/v1/hotels/search`

**Hotels for a place and a stay, one price each**

Needs a key: `X-API-Key: vl_live_...` (or `vl_test_...`), or `Authorization: Bearer <key>`.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `city` | query | string | no | A city by name. With country. |
| `country` | query | string | no | The city's 2-letter country code. |
| `latitude` | query | number | no | A point. With longitude. |
| `longitude` | query | number | no | With latitude. |
| `radius_km` | query | number | no | How far around the point to look. |
| `place_id` | query | string | no | A Google place id, such as ChIJIQBpAG2ahYAR_6128GcTUEo. |
| `hotel_ids` | query | string | no | Up to 200 hotel ids from earlier answers, comma-separated. |
| `check_in` | query | string | yes | First night, YYYY-MM-DD. Not before yesterday, at most 500 days ahead. |
| `check_out` | query | string | yes | Departure day, YYYY-MM-DD. 1 to 30 nights after check_in. |
| `adults` | query | integer | no | Adults in the one room. Use rooms for more than one room. |
| `child_ages` | query | string | no | Each child's age in the one room, comma-separated, such as 7,4. |
| `rooms` | query | string | no | More than one room: a JSON list such as [{"adults":2,"child_ages":[7]},{"adults":1}]. Not with adults or child_ages. |
| `currency` | query | string | no | 3-letter currency of the prices. |
| `nationality` | query | string | no | The guests' 2-letter country code. Some rates depend on it. |
| `sort` | query | `price` \| `rating` | no | The order of the hotels: cheapest first, or best rated first. |
| `limit` | query | integer | no | Hotels in this response. |
| `cursor` | query | string | no | The next_cursor of the previous page. |
| `response_mode` | query | `complete` \| `partial` | no | complete waits for the supplier. partial answers at once; read the rest by search_id. |
| `wait_ms` | query | integer | no | Exactly how long to wait for a running search. |
| `max_age_s` | query | integer | no | The oldest stored answer to accept, in seconds. 0 forces a new search. A stored answer is never reused past 900 seconds, so a larger value is read as 900. |

## Responses

- `200`: The page asked for. status is running while the supplier has not answered.
- `400`: The request cannot be read.
- `401`: No key, or one nobody issued.
- `403`: The key may not do this, or not from this network.
- `429`: Over a limit. Retry-After says when.
- `502`: The supplier failed.
- `503`: Temporarily unavailable. Retry-After says when.
- `504`: The supplier took too long.