v1

latestOpenAPI 3.0.02026-08-065741.5 KB
Geographic coordinates of populated place

Returns geographic coordinates for the given placename (region, city, village, etc.). The method returns the place whose name is most similar to the search string. Service based on GeoNames database.

get/{lang}/places/geoname

Path parameters

langstring required

Two-letter language code (ISO639-1). The following values are available: en (english), ru (russian)

Query parameters

namestring required

Placename

countrystring

Two-letter country code, ISO-3166 (optional). Default is all countries.

Response

Returns geographic coordinates

namestring required

The name of the place

countrystring required

ISO-3166 2-letter country code

lonnumber double required

Longitude

latnumber double required

Latitude

timezonestring

The iana timezone id

populationinteger

Population count

partial_matchboolean

A sign that the method did not return an exact match for the requested name

Example response

{
  "country": "RU",
  "timezone": "Europe/Moscow",
  "name": "Moscow",
  "lon": 37.61556,
  "lat": 55.75222,
  "population": 10381222
}