FREE Client Side Reverse Geocoding to City API
Introduction
The Free Client-Side Reverse Geocode to City API converts a user’s current latitude and longitude into structured locality data (for example, country, state, city) in the browser. If coordinates aren’t available—such as when the user declines permission—the same endpoint can be called without coordinates to return a best-effort locality via IP geolocation. In both cases you receive the same JSON schema, simplifying integration.
This endpoint is client-side only and free to use with no API key. To ensure reliability for everyone, usage must follow our Fair Use Policy: calls originate directly from the client environment, use the device’s current location (not pre-stored or third-party coordinates), and employ platform-appropriate methods (e.g., the HTML5 Geolocation API on the web). If your use case requires server-side processing or batch inputs, use the Server-side Reverse Geocoding API, which provides equivalent functionality with API-key authentication and a monthly free allocation.
- Endpoint.
GET /data/reverse-geocode-clientfor both “with coordinates” and “no coordinates” flows. - Consistent fields. Typical properties include
countryName,principalSubdivision,city/locality,postcode, andlookupSource(reverseGeocodingoripGeolocation). - Language control. Use
localityLanguageto return labels in your preferred language.
Why is it free?
There’s no trick. When you call the client-side endpoint with permission, the browser supplies accurate coordinates; we observe the IP address used for that call. This anonymous pairing of “current GPS” and “observed IP” helps us continuously validate and improve our IP geolocation accuracy, including inputs to the Daily IP Geolocation Accuracy Report. We do not require an API key for the free client endpoint and we do not link the location data to identifiable individuals—see Why is the Reverse Geocoding API free? for details.
Policy compliance and misuse handling
Requests that breach the Fair Use Policy (for example, server-side calls to the client endpoint or processing pre-stored coordinates) may trigger a temporary IP-level ban. In such cases, the endpoint returns HTTP 402 with guidance to switch to the Server-side Reverse Geocoding API. If your application now complies, contact support to review and lift the ban.
For a high-level explanation of permission handling and the unified response, see Client-Side Reverse Geocoding with IP Fallback . To explore the broader product family, visit Reverse Geocoding and IP Geolocation.
Get Started
This API is part of the FREE API Package and is available in free and paid plans. Please visit the FREE API Package package page for limits and pricing information.
Endpoint
Request
Responses
200OK
Sample Query
Schema
latitudenumberRequested Latitude
lookupSourcestringIndicates whether the results are based on reverse geocoding or IP Geolocation
longitudenumberRequested Longitude
localityLanguageRequestedstringlocalityLanguage input parameter received
continentstringLocalised Continent name in the requested language, if available
continentCodestringContinent code
countryNamestringLocalised Country name in the requested language, if available
countryCodestringCountry code as defined by ISO 3166-1 standard
principalSubdivisionstringLocalised principal subdivision name in the requested language, if available
principalSubdivisionCodestringPrincipal subdivision code as defined by ISO 3166-2 standard
citystringThe most significant populated place this location belongs. It will likely be the City name in the language requested. If unavailable, use the locality name field as a failover
localitystringRepresents the smallest geographic area recognised to which the target belongs. The language, if available, is as defined by 'localityLanguage' request parameter
postcodestringPostcode, if available
plusCodestringOpen Location Code
fipsFIPS code object, omitted if unavailable. FIPS (Federal Information Processing Standards) Codes are codes used by the Census Bureau to uniquely identify places in the US. Visit FIPS FAQ page for more information.
statestringState-level FIPS codes have two digits
countystringA three digits County-level FIPS code.
countySubdivisionstringFIPS five digits County Subdivision Code
placestringFIPS five digits place code, omitted if unavailable
csdCodestringCSD (Census Subdivision) code, omitted if unavailable. Canadian Geographic Codes. Visit CSD FAQ page for more information.
localityInfolocalityInfo object
administrativearrayAdministrative authorities as ordered by area (most significant first). Omitted if no administrative boundaries are available
namestringLocalised name of the place in the requested language, if available. The language is as defined by the 'localityLanguage' request parameter
descriptionstringLocalised description of the place in the requested language, if available. The language is as defined by the 'localityLanguage' request parameter
isoNamestringISO 3166-2 standard name, if available
orderintegerOrder value consistent across all entities in the Locality Info parent object. Ordered by geographic area (most significant first)
adminLevelintegerAn administrative level as defined by OpenStreetMaps project
isoCodestringISO 3166-2 standard code, if available
wikidataIdstringWikidata item identifier, if available
geonameIdintegerUnique identifier given by GeoNames.org, if available
chinaAdminCodestringChina Administrative division code. Only available for locations based in China and omitted for others
informativearrayNon-administrative boundaries as ordered by area (most significant first). Omitted if unavailable
namestringLocalised name of the place in the requested language, if available. The language is as defined by the 'localityLanguage' request parameter
descriptionstringLocalised description of the place in the requested language, if available. The language is as defined by the 'localityLanguage' request parameter
isoNamestringISO 3166-2 standard name, if available
orderintegerOrder value consistent across all entities in the Locality Info parent object. Ordered by geographic area (most significant first)
adminLevelintegerAn administrative level as defined by OpenStreetMaps project
isoCodestringISO 3166-2 standard code, if available
wikidataIdstringWikidata item identifier, if available
geonameIdintegerUnique identifier given by GeoNames.org, if available
chinaAdminCodestringChina Administrative division code. Only available for locations based in China and omitted for others
Sample Response
400Bad request
Sample Response
401Invalid coordinates
Sample Response
402This endpoint does not support server-side operations
Sample Response
500An error has occurred and did not complete your request. Please try again
Sample Response