# Reverse Geocode API

> Reverse Geocode converts latitude and longitude coordinates into US, Canada and Australia location details. Pass geographic coordinates to retrieve the corresponding city, state, postal code, country code, time zone and US county. Paid plans can add the point's geohash, plus code and degrees-minutes-seconds notation.

**Endpoint:** `GET https://api.apiverve.com/v1/reversegeocode`  
**Category:** Geography  
**Cost:** 6 credits per call  
**Canonical page:** https://apiverve.com/marketplace/reversegeocode

## Overview

A reverse geocoding API for US, Canadian and Australian coordinates. Send a latitude and longitude and get back the nearest city, state or province, the ZIP or postal code and the country code, so you can get city from coordinates or convert coordinates to location details without a mapping SDK. It returns a place, not a street address: the answer is the closest known postal location to the point you sent.

Apps use it to label GPS coordinates in check-ins and delivery logs, find state from lat long for tax or compliance rules, fill in city and ZIP fields from a phone's location, and group sensor or fleet data by area. Each response also echoes the coordinates you sent.

The Free plan returns the city, state, state abbreviation, ZIP or postal code and country code. Paid plans add the coordinates of the matched location and its distance from your point, an estimated-city flag, and a list of the nearest city names ordered by distance.

## Authentication

Every call carries your key in an `x-api-key` header. The same key works across the whole
APIVerve catalog — there are no per-API subscriptions. Responses always use the same three
top-level keys: `status`, `error`, and `data`.

## Example request

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

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `lat` | number | Yes | The latitude of the coordinates. range -90-90 |
| `lon` | number | Yes | The longitude of the coordinates. range -180-180 |
| `geocodes` | boolean | No | Add a geocodes object with the point's geohash, plus code (Open Location Code) and degrees-minutes-seconds notation. Premium field |

## Response fields

- `zipcode` — string · 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_abbr` — string · Two-letter state abbreviation code
- `city` — string · Primary city name at coordinates
- `state` — string · Full state name
- `distance` — number · Distance to closest coordinates in miles · (premium)
- `latitudeClosest` — string · Latitude of closest mapped coordinate · (premium)
- `longitudeClosest` — string · Longitude of closest mapped coordinate · (premium)
- `countryCode` — string · ISO country code for location
- `latitude` — number · Input latitude coordinate
- `longitude` — number · Input longitude coordinate
- `estimatedCity` — boolean · Whether city is estimated or exact match · (premium)
- `nearestCities` — array · List of nearby cities ordered by proximity · (premium)
- `timezone` — string · IANA time zone at the requested coordinates (e.g., America/New_York)
- `county` — string · Primary county of the matched ZIP code (US only, null elsewhere)
- `countyFips` — string · Five-digit FIPS code of that county (US only) · (premium)
- `geocodes` — object · Encodings of the requested point (only when geocodes=true) · (premium)
  - `geocodes.geohash` — string · 9-character geohash (about 5 m precision) · (premium)
  - `geocodes.plusCode` — string · 10-digit global plus code (Open Location Code, about 14 m precision), e.g., 87G8P27Q+MC · (premium)
  - `geocodes.dms` — object · Latitude and longitude in degrees, minutes and seconds · (premium)
    - `geocodes.dms.latitude` — string · Latitude in DMS notation, e.g., 40°42'51.2"N · (premium)
    - `geocodes.dms.longitude` — string · Longitude in DMS notation, e.g., 73°57'41.2"W · (premium)

## Sample response

```json
{
  "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"
      }
    }
  }
}
```

## 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.

## SDKs

- **npm** — `npm install @apiverve/reversegeocode` (https://www.npmjs.com/package/@apiverve/reversegeocode)
- **PyPI** — `pip install apiverve-reversegeocode` (https://pypi.org/project/apiverve-reversegeocode/)
- **NuGet** — `dotnet add package APIVerve.API.ReverseGeocode` (https://www.nuget.org/packages/APIVerve.API.ReverseGeocode)
- **Source** — https://github.com/apiverve/reversegeocode-api

## More

- Full reference: https://docs.apiverve.com/ref/reversegeocode
- Get an API key: https://dashboard.apiverve.com
- Full catalog: https://apiverve.com/marketplace
