Docs/Sources/Reverse Geocoding Grounding Data

Reverse Geocoding Grounding Data

Get location US from coordinates

OperationalCredits 6 per callp50 846msGeography

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 and Canada 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` is built by matching the resolved city name against a worldwide city list: it holds up to 20 unique city names that contain that name, such as Brooklyn Park and East Brooklyn for Brooklyn, in list order rather than by distance. `distance`, the closest coordinates, `estimatedCity` and `nearestCities` are null on the Free plan.

Live Test Reverse Geocoding Grounding Data Source →

The tool

Once your client is connected to the VerveContext server, this appears in its tool list as ReverseGeocodingGroundingData. It is read-only and open-world — it fetches and never mutates anything on your side — so most clients call it without asking you to confirm.

Tool call
{
  "name": "ReverseGeocodingGroundingData",
  "arguments": {
    "lat": "40.714224",
    "lon": "-73.961452"
  }
}

You do not name the tool yourself; the model picks it. Asking about 40.714224 in the terms this source covers is enough for it to reach for ReverseGeocodingGroundingData on its own — naming it explicitly also works, and is the way to force the call.

Connecting

One server URL covers every source in the catalog, including this one. Authorization is OAuth: the client opens a browser once, and there is no key to paste into a config file.

{
  "mcpServers": {
    "vervecontext": {
      "url": "https://api.vervecontext.com/v1/mcp"
    }
  }
}

Per-client setup — Claude, Cursor, VS Code, ChatGPT — is on the MCP setup page.

Arguments

These are the properties on the tool's inputSchema, so a well-behaved client validates them before the call is made. Premium arguments are accepted on every plan but only take effect on plans that include them.

ArgumentTypeDescription
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

What the model gets back

The result carries a structuredContent object matching the tool's declared outputSchema, so a client reads fields without parsing prose. status is "ok" and error is null on success; a null field means the value was not available for that input, not that the call failed.

Result
{
  "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
zipcodestring11211ZIP code for the location
state_abbrstringNYTwo-letter state abbreviation code
citystringBrooklynPrimary city name at coordinates
statestringNew YorkFull state name
distancePremiumnumber0.6501757300758664Distance to closest coordinates in miles
latitudeClosestPremiumstring40.712090Latitude of closest mapped coordinate
longitudeClosestPremiumstring-73.95427Longitude of closest mapped coordinate
countryCodestringUSISO country code for location
latitudenumber40.714224Input latitude coordinate
longitudenumber-73.961452Input longitude coordinate
estimatedCityPremiumbooleantrueWhether city is estimated or exact match
nearestCitiesPremiumarray["Brooklyn","Brooklyn Park","East Brooklyn"]List of nearby cities ordered by proximity
timezonestringAmerica/New_YorkIANA time zone at the requested coordinates (e.g., America/New_York)
countystringKings CountyPrimary 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.
countyFipsPremiumstring36047Five-digit FIPS code of that county (US only)
geocodesPremiumobject{…}Encodings of the requested point (only when geocodes=true)
geocodes.geohashPremiumstringdr5rsgyct9-character geohash (about 5 m precision)
geocodes.plusCodePremiumstring87G8P27Q+MC10-digit global plus code (Open Location Code, about 14 m precision), e.g., 87G8P27Q+MC
geocodes.dmsPremiumobject{…}Latitude and longitude in degrees, minutes and seconds
geocodes.dms.latitudePremiumstring40°42'51.2"NLatitude in DMS notation, e.g., 40°42'51.2"N
geocodes.dms.longitudePremiumstring73°57'41.2"WLongitude in DMS notation, e.g., 73°57'41.2"W

Why ground on it

A model can produce something that looks like this answer from its training data, and be confidently out of date or simply wrong. This source returns the current value in a shape you can check, which is the difference between an answer you can cite and one you have to hedge.

Point an evaluation at zipcode: it is the field most worth pinning a claim to, and it is either present and current or absent — never plausibly invented.

Failure modes

Errors come back as tool errors carrying a sentence the model can act on, not a bare status code. Error handling covers the full list.

StatusWhat it means
400 / 422The arguments did not validate. The message names the offending one.
401The OAuth session is invalid or expired — reconnect the server.
403Blocked by a key restriction or an IP allow-list. Never a bad identity.
404This source is not part of VerveContext. Check the catalog.
429Out of credits, or a brief rate limit. The message tells them apart.

A call costs 6 credits each time the tool actually runs; a model that reasons about the tool without calling it costs nothing.

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 Geocoding Grounding Data

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

Call it as a REST APIOne HTTPS endpoint and an x-api-key header, with SDKs for Node, Python and .NET.APIVerve →Reference →
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 →

More in Geography:

Was this page helpful?