Search cities by name
const url = 'https://api.wink.travel/reference-data/geo-ip/city/Bangkok';const options = { method: 'GET', headers: {'Wink-Version': '2.0', Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.wink.travel/reference-data/geo-ip/city/Bangkok \ --header 'Authorization: Bearer <token>' \ --header 'Wink-Version: 2.0'Return all cities whose name matches the given search term, as lightweight geo records with coordinates, geoname identifiers, and timezone information.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Partial city name (case-insensitive substring match)
Example
BangkokHeader Parameters
Section titled “Header Parameters”Responses
Section titled “Responses”Matching cities returned
Uses MaxMind’s city lite db to persist GeoIpLightweight objects in our own db.
object
GeoNameLightweight identifiers taken from https://geonames.org.
Locale code
Continent code
Continent name
Country ISO code
Country name
City name
Timezone
Sub-division 1 code
Sub-division 1 name
Sub-division 2 code
Sub-division 2 name
Example
[ { "geoNameId": "1609350", "localeCode": "en", "continentCode": "AS", "continentName": "Asia", "countryIsoCode": "TH", "countryName": "Thailand", "cityName": "Bangkok", "timezone": "Asia/Bangkok", "subDivision1Code": "10", "subDivision1Name": "Bangkok", "subDivision2Code": "1001", "subDivision2Name": "Phra Nakhon" }]Bad Request — missing or invalid request parameter or body
object
object
Example
Unauthorized — authentication is required or the session has expired
object
object
Example
Forbidden — authenticated but lacking the required permission or scope
object
object
Example
Not Found — the requested resource does not exist
object
object
Example
Method Not Allowed — the HTTP verb is not supported on this endpoint
object
object
Example
Unsupported Media Type — use application/json
object
object
Example
Internal Server Error — an unexpected failure occurred on the server
object
object
Example
Service Unavailable — a downstream dependency is unreachable
