v2

latestOpenAPI 3.1.02026-08-0176498.0 KB
Location endpoints

Returns the nearest named location for a given GPS coordinates.

Search for nearest place by coordinates

You can use this endpoint to find the nearest place from given coordinates.

Note: If you specify coordinates of a secluded place (e.g. middle of the ocean), the nearest point can be very far from the coordinates.

get/nearest_place

Query parameters

latstring required

Latitude in format 12N, 12.3N, 12.3, or 13S, 13.2S, -13.4

Latitude in format 12N, 12.3N, 12.3, or 13S, 13.2S, -13.4

lonstring required

Longitude in format 12E, 12.3E, 12.3, or 13W, 13.2W, -13.4

Longitude in format 12E, 12.3E, 12.3, or 13W, 13.2W, -13.4

language'cs' | 'en' | 'de' | 'es' | 'fr' | 'pl' | 'pt'

The language of text summaries and place names (variable names are never translated). Available languages are:

  • en: English
  • es: Spanish
  • fr: French
  • de: German
  • pl: Polish
  • pt: Portuguese
  • cs: Czech
keystring

Your unique API key. You can either specify it in this parameter, or set it in X-API-Key header.

Your unique API key. You can either specify it in this parameter, or set it in X-API-Key header.

Response

Successful Response

namestring

name of the place

place_idstring

unique identifier of the place, which can be used in /point and /map endpoints

adm_area1string nullable

first-level administrative area (a US state, for example)

adm_area2string nullable

second-level administrative area (a US county, for example)

countrystring nullable

name of the country

latstring

Latitude of the point, always in the format <float><N/S>, for example 23.5S

lonstring

Longitude of the point, always in format <float><E/W>, for example 23.5W

timezonestring nullable

Timezone of the point in tzinfo format.

typestring

The character of the place. May be one of the following values:

  • administrative areas (states, counties, districts...): administrative_area
  • country: country
  • a different political entity from a country (for example, a dependent teritory): political_entity
  • villages, towns and cities: settlement
  • air industry locations: airbase, airfield, heliport, airport, airport_terminal
  • places related to water: bay, channel, fjord, lake, pond, falls, gulf, harbor, reservoir, sea, dam, cape, island, peninsula
  • places related to mountain areas: hill, mountain, peak, valley, volcano, canyon
  • other places related to nature: park, reserve, resort, desert
  • places based on postcodes: postcode