Reverse Geocoding to City API

Introduction

Reverse geocoding is the process of back (reverse) coding of a point location (Latitude, Longitude) to a readable address or a place.

Existing reverse geocoding providers look for the closest street address for the provided coordinates. In most use-cases, this level of detail is overkill, providing an incredibly slow service of minimal accuracy, with quality that varies wildy for mobile and regional users.

Our Reverse Geocoding API is the first to deliver administrative/non-administrative boundaries-based results and as such, it is the perfect choice when you need to resolve a user's practical area such as their city, state or country rather than their street address.

A prime use-case is when utilising client-side W3C geolocation and you need to recognise your customer's closest outlet, or what promotions are available in their region.

This API not only offers detailed locality information based on your customer's Latitude & Longitude, it is also exceptionally fast with each response being generated with sub-millisecond timing, allowing for true real-time applications.

 

Example Response

The response is only available in JSON format. The below response should be expected for the following request:



Awaiting request submission...

API Pricing

  1. Monthly Subscription
    FREE 50,000 queries/month
    Additional 50,000 queries US$2.00/month
  2. Annual Subscription
    FREE 50,000 queries/month
    Additional 50,000 queries US$1.60/month

Request Format

NEW! Payload compression is supported, simply add Accept-Encoding: gzip header.
Use the form below to try out this API.

Parameter Your Input Value Description
latitude

Latitude value as per WGS 84 reference system (GPS system). Expected values are in [-90, 90] range.

longitude

Longitude value as per WGS 84 reference system (GPS system). Expected values are in [-180, 180] range.

localityLanguage

Preferred language for locality names in ISO 639-1 format, such as 'en' for English, 'es' for Spanish etc. Please note: 147 common world languages are supported, full list here, but not all languages are available for every location. If requested language is not available for a requested location it will default to English, if no English is available, the native, local names will be provided

key Your API key

Don't have an API Key? Click here to register and get your free API Key

If you already have a BigDataCloud account, to automatically fill this field with your Api Key.



Response

Awaiting request submission...

Response Format


Field

Data type

Description

latitude

float

Requested Latitude

longitude

float

Requested Longitude

localityLanguageRequested

string

localityLanguage input parameter received

countryName

string

Country name. Omitted if not available

countryCode

string

Country code. Omitted if not available

principalSubdivision

string Principal subdivision. Omitted if not available

locality

string Locality name. Omitted if not available

postcode

string

Postcode. Omitted if not available

localityInfo

 <LocalityInfo> object

Detailed reverse geocoded locality information localised to the language as defined by ‘localityLanguage’ request parameter

Data Objects

Locality Info object

Field

Data type

Description

administrative

Aray of <LocalityProperty> objects

Administrative boundarires ordered by area (largest first). Omitted if no administrative boundaries are available

informative

Aray of <LocalityProperty> objects

Non-administrative boundarires ordered by area (largest first). Omitted if not available

Locality Property object

Field

Data type

Description

order

integer

Order value consistent across all entities in the Locality Info parent object. Ordered by area (largest first)

adminLevel

integer

An administrative level as defined by OpenStreetMaps project

name

string

Localised name. The language is as defined by ‘localityLanguage’ request parameter

description

string

Localised description. The language is as defined by ‘localityLanguage’ request parameter

isoName

string

ISO 3166-2 standard name, if available

isoCode

string

ISO 3166-2 standard code, if available

wikidataId

string

Wikidata item identifier, if available

 

Related APIs