Skip to content

Match cities

GET
/reference-data/geo/city/search
curl --request GET \
--url 'https://api.wink.travel/reference-data/geo/city/search?term=Bangkok' \
--header 'Authorization: Bearer <token>' \
--header 'Wink-Version: 2.0'

Returns cities and islands whose name phonetically matches the supplied term using a sounds-like search.

term
required
string
""

City name term for phonetic matching

Example
Bangkok
Wink-Version
string
default: 2.0.0
Allowed values: 2.0

Successfully retrieved cities with phonetic match

Media typeapplication/json
Array<object>

GeoNames have been created at https://geonames.org and contain geographical destinations we use as geoname data to associate travel inventory with a location.

object
admin1Code

GeoNames first-level administrative division code, typically a state or province abbreviation (e.g. NY for New York)

string
""
admin2Code

GeoNames second-level administrative division code, typically a county or district

string
""
admin3Code

GeoNames third-level administrative division code, typically a municipality

string
""
admin4Code

GeoNames fourth-level administrative division code, typically a neighbourhood

string
""
alternateCountryCodes

Secondary ISO country codes for locations that span or border multiple countries

Array<string>
alternateNames

Array of alternate name

Array<string>
asciiName

Ascii name of city

string
""
country

Country

object
area

Area in square kilometers

number format: float
""
capital

Country capital

string
""
continent

Continent code

string
""
currencyCode

Currency code

string
"" /^[A-Z]{3}$/
currencyName

Currency name

string
""
fips

FIPS country code

string
""
geoNameId

Country GeoNames identifier

string
""
iso

ISO code

string
""
iso3

3 character ISO code

string
""
isoNumeric

Numeric ISO code

integer format: int32
""
languages

Country languages

Array<string>
name

Country name

string
""
neighbors

Neighboring countries

Array<string>
phone

Calling code

string
""
population

Country population

integer format: int64
""
postalCodeFormat

Postal code format

string
""
postalCodeRegEx

Postal code regular expression

string
""
topLevelDomain

Country TLD

string
""
countryCode

ISO 3166-1 alpha-2 country code for the country this location belongs to

string
"" /^[A-Z]{2}$/
digitalElevationModel

Digital elevation model height in meters above sea level from the SRTM dataset

string
""
elevation

City elevation

integer format: int32
""
featureClass

GeoNames broad feature category (e.g. P=populated place, A=administrative, L=parks, H=water, T=terrain)

string
""
featureCode

GeoNames specific feature code identifying the place type (e.g. PPL=populated place, PPLC=national capital, ISL=island)

string
""
geoNameId

GeoName identifier

string
""
location

Coordinate points of the city

object
coordinates
Array<number>
type
string
x
number format: double
y
number format: double
modificationDate

Date when this GeoNames record was last modified in the GeoNames dataset

string format: date
""
name

Name of city

string
""
population

Population of the city

integer format: int64
""
radiusInMeters

Search radius in meters used for proximity queries around this location (defaults to 50,000 m / 50 km)

integer format: int64
""
subCountry

Country sub division

object
asciiName

Sub-country ascii name

string
""
code

Code

string
""
countryCode

Country code

string
"" /^[A-Z]{2}$/
geoNameId

Sub-country GeoNames identifier

string
""
name

Sub-country name

string
""
subCountryCode

Sub-country code

string
""
subSubCountry

Country sub sub division

object
asciiName

ASCII-transliterated name of the county or district, safe for URLs and sorting

string
""
code

Fully qualified subdivision code combining country, sub-country, and sub-sub-country codes

string
""
countryCode

ISO 3166-1 alpha-2 country code

string
"" /^[A-Z]{2}$/
geoNameId

GeoNames.org unique identifier for this subdivision

string
""
name

Official name of the county or district in its local script

string
""
subCountryCode

First-level subdivision (state/province) code within the country

string
""
subSubCountryCode

Second-level subdivision (county/district) code within the state or province

string
""
timezone

IANA timezone identifier for the location

string
""
type

GeoNameLightweight type

string
""
Allowed values: CITY ISLAND OTHER
urlName

Url name

string
"" /^[a-z0-9][a-z0-9-]*[a-z0-9]$/
Example
[
{
"admin1Code": "40",
"admin2Code": "2401",
"admin3Code": "",
"admin4Code": "",
"alternateCountryCodes": [],
"alternateNames": [
"Krung Thep",
"BKK"
],
"asciiName": "Bangkok",
"country": {
"area": 514000,
"capital": "Bangkok",
"continent": "AS",
"currencyCode": "THB",
"currencyName": "Baht",
"fips": "TH",
"geoNameId": "1605651",
"iso": "TH",
"iso3": "THA",
"isoNumeric": 764,
"languages": [
"th"
],
"name": "Thailand",
"neighbors": [
"LA",
"MM",
"KH",
"MY"
],
"phone": "66",
"population": 69428524,
"postalCodeFormat": "#####",
"postalCodeRegEx": "^(\\d{5})$",
"topLevelDomain": ".th"
},
"countryCode": "TH",
"digitalElevationModel": "3",
"elevation": 5,
"featureClass": "P",
"featureCode": "PPLC",
"geoNameId": "1609350",
"location": {
"coordinates": [
100.5581533,
13.7370197
],
"type": "POINT"
},
"modificationDate": "2023-06-15",
"name": "Bangkok",
"population": 10539415,
"radiusInMeters": 50000,
"subCountry": {
"asciiName": "Bangkok",
"code": "TH.40",
"countryCode": "TH",
"geoNameId": "1609350",
"name": "Bangkok",
"subCountryCode": "40"
},
"subSubCountry": {
"asciiName": "Bangkok District",
"code": "TH.40.2401",
"countryCode": "TH",
"geoNameId": "1609352",
"name": "Bangkok District",
"subCountryCode": "40",
"subSubCountryCode": "2401"
},
"timezone": "Asia/Bangkok",
"type": "CITY",
"urlName": "bangkok-thailand"
}
]

Bad Request — missing or invalid request parameter or body

Media typeapplication/problem+json
object
detail
string
instance
string format: uri
properties
object
key
additional properties
status
integer format: int32
title
string
type
string format: uri
key
additional properties
""
Example

Unauthorized — authentication is required or the session has expired

Media typeapplication/problem+json
object
detail
string
instance
string format: uri
properties
object
key
additional properties
status
integer format: int32
title
string
type
string format: uri
key
additional properties
""
Example

Forbidden — authenticated but lacking the required permission or scope

Media typeapplication/problem+json
object
detail
string
instance
string format: uri
properties
object
key
additional properties
status
integer format: int32
title
string
type
string format: uri
key
additional properties
""
Example

Not Found — the requested resource does not exist

Media typeapplication/problem+json
object
detail
string
instance
string format: uri
properties
object
key
additional properties
status
integer format: int32
title
string
type
string format: uri
key
additional properties
""
Example

Method Not Allowed — the HTTP verb is not supported on this endpoint

Media typeapplication/problem+json
object
detail
string
instance
string format: uri
properties
object
key
additional properties
status
integer format: int32
title
string
type
string format: uri
key
additional properties
""
Example

Conflict — the resource was modified by someone else since you read it; re-read it and retry with the new version

Media typeapplication/problem+json
object
detail
string
instance
string format: uri
properties
object
key
additional properties
status
integer format: int32
title
string
type
string format: uri
key
additional properties
""
Example

Unsupported Media Type — use application/json

Media typeapplication/problem+json
object
detail
string
instance
string format: uri
properties
object
key
additional properties
status
integer format: int32
title
string
type
string format: uri
key
additional properties
""
Example

Internal Server Error — an unexpected failure occurred on the server

Media typeapplication/problem+json
object
detail
string
instance
string format: uri
properties
object
key
additional properties
status
integer format: int32
title
string
type
string format: uri
key
additional properties
""
Example

Service Unavailable — a downstream dependency is unreachable

Media typeapplication/problem+json
object
detail
string
instance
string format: uri
properties
object
key
additional properties
status
integer format: int32
title
string
type
string format: uri
key
additional properties
""
Example