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 type application/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
geoNameId

GeoName identifier

string
""
type

GeoNameLightweight type

string
""
Allowed values: CITY ISLAND OTHER
name

Name of city

string
""
urlName

Url name

string
"" /^[a-z0-9][a-z0-9-]*[a-z0-9]$/
asciiName

Ascii name of city

string
""
alternateNames

Array of alternate name

Array<string>
location

Coordinate points of the city

object
x
number format: double
y
number format: double
type
string
coordinates
Array<number>
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
""
countryCode

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

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

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

Array<string>
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
""
population

Population of the city

integer format: int64
""
elevation

City elevation

integer format: int32
""
digitalElevationModel

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

string
""
timezone

IANA timezone identifier for the location

string
""
modificationDate

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

string format: date
""
radiusInMeters

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

integer format: int64
""
country

Country

object
iso

ISO code

string
""
iso3

3 character ISO code

string
""
isoNumeric

Numeric ISO code

integer format: int32
""
fips

FIPS country code

string
""
name

Country name

string
""
capital

Country capital

string
""
area

Area in square kilometers

number format: float
""
population

Country population

integer format: int64
""
continent

Continent code

string
""
topLevelDomain

Country TLD

string
""
currencyCode

Currency code

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

Currency name

string
""
phone

Calling code

string
""
postalCodeFormat

Postal code format

string
""
postalCodeRegEx

Postal code regular expression

string
""
languages

Country languages

Array<string>
geoNameId

Country GeoNames identifier

string
""
neighbors

Neighboring countries

Array<string>
subCountry

Country sub division

object
code

Code

string
""
countryCode

Country code

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

Sub-country code

string
""
name

Sub-country name

string
""
asciiName

Sub-country ascii name

string
""
geoNameId

Sub-country GeoNames identifier

string
""
subSubCountry

Country sub sub division

object
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}$/
subCountryCode

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

string
""
subSubCountryCode

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

string
""
name

Official name of the county or district in its local script

string
""
asciiName

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

string
""
geoNameId

GeoNames.org unique identifier for this subdivision

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

Bad Request — missing or invalid request parameter or body

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

Unauthorized — authentication is required or the session has expired

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

Forbidden — authenticated but lacking the required permission or scope

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

Not Found — the requested resource does not exist

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

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

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

Unsupported Media Type — use application/json

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

Internal Server Error — an unexpected failure occurred on the server

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

Service Unavailable — a downstream dependency is unreachable

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