Hotel place search
Resolve a destination the traveller types into an id you can search hotels with.
Place search and lookup are public. They need no session. Use search for a type-ahead box, and lookup to re-resolve ids you stored earlier.
Search places
GET/v2/Hotel/cities/search
Access public, no session
Pass what the user typed as q. You get places with an external_id. Carry that id into availability as CityId.
Query parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
q | string | No | - | The user's text. Up to 128 characters. Empty returns an empty list. |
limit | integer | No | 20 | Maximum results, 1 to 100. |
type | string | No | - | Restrict to one kind: city, district, region, country, landmark, hotel. |
curl "https://api.hermeseus.com/api/v2/Hotel/cities/search?q=paris&limit=20&type=city"
const res = await fetch("https://api.hermeseus.com/api/v2/Hotel/cities/search?q=paris&limit=20&type=city");
const data = await res.json();import requests
res = requests.get(
"https://api.hermeseus.com/api/v2/Hotel/cities/search",
params={"q": "paris", "limit": 20, "type": "city"},
)
data = res.json()Response
| Field | Type | Description |
|---|---|---|
data | array of object | Matching places. See below. |
meta | object | query, count, limit, type. |
{
"data": [
{
"id": 13,
"external_id": "11111111456928",
"type": "city",
"name": "Paris",
"label": "Paris, Ile de France, France",
"destination": "Paris, Ile de France, France",
"country": { "code": "FR", "name": "France" },
"nr_hotels": 25708
}
],
"meta": { "query": "paris", "count": 1, "limit": 20, "type": "city" }
}Look up saved ids
POST/v2/Hotel/cities/lookup
Access public, no session
Re-resolve ids you stored. Send an array of external_ids. You get one place object per id.
POST /api/v2/Hotel/cities/lookup
{ "external_ids": ["11111111456928", "7825691"] }Next step. Take the
external_id of the chosen place and search hotels with the hotel booking API.
