Docs/APIs/Reverse Geocode

Reverse Geocode

Get location US from coordinates

OperationalCredits 6 per callp50 846msGeographyStar

Overview

Lookup runs in two steps, both against bundled offline data. First the point given by `lat` and `lon` is placed in a country using country boundary polygons. Then the nearest entry in a US, Canada and Australia postal location dataset is found for that country, and its `city`, `state`, `state_abbr` and `zipcode` are returned. Coordinates in any other country are outside the dataset and are not supported.

Results are only as fine-grained as the dataset: the answer is the closest postal-code location, not the containing boundary, so points near a town or ZIP line can resolve to the neighbouring one. `latitudeClosest` and `longitudeClosest` are the matched location's coordinates, returned as strings, and `distance` is how far it lies from your point. `latitude` and `longitude` echo the input and `countryCode` is the two-letter code from the first step.

`nearestCities` holds up to 20 unique city names from a worldwide city list, ordered by distance from your point, closest first, so it usually starts with the city you are in and continues with its neighbours. `distance`, the closest coordinates, `estimatedCity` and `nearestCities` are null on the Free plan.

Live Test Reverse Geocode API →

Endpoint

One host, one path per API. The block below shows this call in four languages; every one of them is the same HTTP request. Making requests covers the timeouts, retries and parameter rules that apply to all of them. The SDKs wrap the same call in a typed client.

GEThttps://api.apiverve.com/v1/reversegeocode
curl "https://api.apiverve.com/v1/reversegeocode?lat=40.714224&lon=-73.961452&geocodes=true" \
  -H "x-api-key: your_api_key_here"

Replace your_api_key_here with the key from your dashboard. When the inputs arrive as a list rather than one at a time, batch requests run up to 200 of them through this same API in a single call.

Authentication

Send your key in the x-api-key header. That is the only auth step — there is no token exchange and no per-endpoint scope to configure. Authentication covers creating, rotating and revoking keys.

401 is the only auth verdict

A 401 means the key is missing, invalid or expired. A 403 means the key is valid but not permitted here — blocked by a key restriction or an IP allow-list. Running out of credits is a 429.

Parameters

Sent in the query string. Premium parameters are accepted on every plan but only take effect on plans that include them.

ParameterTypeDescription
latRequirednumberThe latitude of the coordinates
range -90–90
lonRequirednumberThe longitude of the coordinates
range -180–180
geocodesOptionalPremiumbooleanAdd a geocodes object with the point's geohash, plus code (Open Location Code) and degrees-minutes-seconds notation

Response

Every API returns the same three top-level keys, so one response handler covers your whole integration: status, error and data. Only data changes shape. Response format covers the envelope, the other output formats and how premium fields are withheld.

Sample response
{
  "status": "ok",
  "error": null,
  "data": {
    "zipcode": "11211",
    "state_abbr": "NY",
    "city": "Brooklyn",
    "state": "New York",
    "distance": 0.6501757300758664,
    "latitudeClosest": "40.712090",
    "longitudeClosest": "-73.95427",
    "countryCode": "US",
    "latitude": 40.714224,
    "longitude": -73.961452,
    "estimatedCity": true,
    "nearestCities": [
      "Brooklyn",
      "Brooklyn Park",
      "East Brooklyn",
      "Brooklyn Center",
      "Brooklyn Heights"
    ],
    "timezone": "America/New_York",
    "county": "Kings County",
    "countyFips": "36047",
    "geocodes": {
      "geohash": "dr5rsgyct",
      "plusCode": "87G8P27Q+MC",
      "dms": {
        "latitude": "40°42'51.2\"N",
        "longitude": "73°57'41.2\"W"
      }
    }
  }
}

Response fields

Paths are relative to data. Premium fields are absent rather than zeroed on plans that do not include them, so check for presence instead of comparing to 0.

FieldTypeExampleDescription
zipcodestring"11211"ZIP or postal code for the location. Australian postcodes are returned as numbers, so ones starting with 0 (Darwin, 0800) lose the leading zero
state_abbrstring"NY"Two-letter state abbreviation code
citystring"Brooklyn"Primary city name at coordinates
statestring"New York"Full state name
distancePremiumnumber0.6501757300758664Distance to closest coordinates in miles
latitudeClosestPremiumstring"40.712090"Latitude of closest mapped coordinate
longitudeClosestPremiumstring"-73.95427"Longitude of closest mapped coordinate
countryCodestring"US"ISO country code for location
latitudenumber40.714224Input latitude coordinate
longitudenumber-73.961452Input longitude coordinate
estimatedCityPremiumbooleantrueWhether city is estimated or exact match
nearestCitiesPremiumarray[Brooklyn, ...]List of nearby cities ordered by proximity
timezonestring"America/New_York"IANA time zone at the requested coordinates (e.g., America/New_York)
countystring"Kings County"Primary county of the matched ZIP code (US only, null elsewhere)
The county holding most of the matched ZIP code's land, from the Census 2020 ZCTA-to-county file. A point in a ZIP that crosses a county line can sit in a neighbouring county.
countyFipsPremiumstring"36047"Five-digit FIPS code of that county (US only)
geocodesPremiumobject{...}Encodings of the requested point (only when geocodes=true)
geohashPremiumstring"dr5rsgyct"9-character geohash (about 5 m precision)
plusCodePremiumstring"87G8P27Q+MC"10-digit global plus code (Open Location Code, about 14 m precision), e.g., 87G8P27Q+MC
dmsPremiumobject{...}Latitude and longitude in degrees, minutes and seconds
latitudePremiumstring"40°42'51.2"N"Latitude in DMS notation, e.g., 40°42'51.2"N
longitudePremiumstring"73°57'41.2"W"Longitude in DMS notation, e.g., 73°57'41.2"W

Errors

Read the HTTP status first, then error for the specific reason. The body names the parameter that has to change. Error handling covers the full status list and which of them are worth retrying.

StatusMeaningWhat to do
400Input was rejectedRead error; it names the parameter.
401Key missing or invalidCheck the header name and the key value.
403Key valid, but not permittedA key restriction or IP allow-list; see key scoping.
429Rate limited, or out of creditsRead error to tell them apart; see rate limits.

Use cases

Fleet Telematics Tracking
Logistics systems match vehicle GPS pings against city and state boundaries to generate human-readable trip summaries for dispatchers.
Mobile Photo Geotagging
Camera apps read coordinate metadata from uploaded photos to display the city and state where each picture was taken.
Delivery Address Autofill
When a customer shares device coordinates at checkout, ecommerce apps automatically populate the city, state, and ZIP code fields.
Field Service Dispatch
To assign incoming repair tickets, maintenance platforms convert technician coordinates into local municipality names and postal codes.

Other ways to use Reverse Geocode

Set up Reverse Geocode on APIVerve, or reach the same source a different way. Your APIVerve account and credits work on all of them — one key, one balance.

Give it to an AI agentConnect over MCP and your agent calls it as a native tool — Claude, Cursor, ChatGPT.VerveKit →Reference →
Google Sheets or ExcelA =VERVE() formula fills a column — no script, no export, recalculates in place.VerveSheets →Reference →
Ground an agent on itA cited, machine-checkable fact your model can't produce on its own.VerveContext →Reference →

More in Geography:

Was this page helpful?