Show by ID
const url = 'https://api.wink.travel/reference-data/geo/1609350';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/1609350 \ --header 'Authorization: Bearer <token>' \ --header 'Wink-Version: 2.0'Returns a single geo-name by its GeoNames identifier, throwing 404 if none exists.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”GeoNames database identifier (numeric string)
Example
1609350Header Parameters
Section titled “Header Parameters ”Responses
Section titled “ Responses ”Successfully retrieved geo-name by ID
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
GeoName identifier
GeoNameLightweight type
Name of city
Url name
Ascii name of city
Array of alternate name
Coordinate points of the city
object
GeoNames broad feature category (e.g. P=populated place, A=administrative, L=parks, H=water, T=terrain)
GeoNames specific feature code identifying the place type (e.g. PPL=populated place, PPLC=national capital, ISL=island)
ISO 3166-1 alpha-2 country code for the country this location belongs to
Secondary ISO country codes for locations that span or border multiple countries
GeoNames first-level administrative division code, typically a state or province abbreviation (e.g. NY for New York)
GeoNames second-level administrative division code, typically a county or district
GeoNames third-level administrative division code, typically a municipality
GeoNames fourth-level administrative division code, typically a neighbourhood
Population of the city
City elevation
Digital elevation model height in meters above sea level from the SRTM dataset
IANA timezone identifier for the location
Date when this GeoNames record was last modified in the GeoNames dataset
Search radius in meters used for proximity queries around this location (defaults to 50,000 m / 50 km)
Country
object
ISO code
3 character ISO code
Numeric ISO code
FIPS country code
Country name
Country capital
Area in square kilometers
Country population
Continent code
Country TLD
Currency code
Currency name
Calling code
Postal code format
Postal code regular expression
Country languages
Country GeoNames identifier
Neighboring countries
Country sub division
object
Code
Country code
Sub-country code
Sub-country name
Sub-country ascii name
Sub-country GeoNames identifier
Country sub sub division
object
Fully qualified subdivision code combining country, sub-country, and sub-sub-country codes
ISO 3166-1 alpha-2 country code
First-level subdivision (state/province) code within the country
Second-level subdivision (county/district) code within the state or province
Official name of the county or district in its local script
ASCII-transliterated name of the county or district, safe for URLs and sorting
GeoNames.org unique identifier for this subdivision
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
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
Geo-name with the specified ID not found
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