City search
A type-ahead city search over a global gazetteer. It returns the matched city name, its country, and coordinates.
GET/Geo/cities/search
Access public, no session
This is a general geographic lookup, matched against city names and their known aliases in many languages. It is not tied to hotel or flight inventory. For a bookable hotel destination, use hotel place search instead.
Path parameters
None.
Query parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
q | string | Yes | - | The typed text, 1 to 128 characters. |
limit | integer | No | 10 | Maximum results, 1 to 50. |
country | string | No | - | Restrict to a two-letter country code, for example FR. |
Request
curl "https://api.hermeseus.com/api/Geo/cities/search?q=munch&limit=5&country=DE"
const params = new URLSearchParams({ q: "munch", limit: "5", country: "DE" });
const res = await fetch("https://api.hermeseus.com/api/Geo/cities/search?" + params);
const data = await res.json();import requests
res = requests.get(
"https://api.hermeseus.com/api/Geo/cities/search",
params={"q": "munch", "limit": 5, "country": "DE"},
)
data = res.json()Response
| Field | Type | Description |
|---|---|---|
data | array of object | Matching cities, best match first. See below. |
meta | object | query, count, limit. |
{
"data": [
{
"term": "Munchen",
"name": "Munich",
"asciiname": "Munich",
"geonameid": 2867714,
"country_code": "DE",
"admin1_code": "02",
"population": 1260391,
"latitude": 48.13743,
"longitude": 11.57549,
"feature_code": "PPLA",
"timezone": "Europe/Berlin"
}
],
"meta": { "query": "munch", "count": 1, "limit": 5 }
}
