Docs/Sources/Zip Code Grounding Data

Zip Code Grounding Data

Lookup zip codes of city

OperationalCredits 2 per callp50 1428msGeography

Overview

A US zip code lookup API: get the city and state from a zip code, or list every ZIP code in a city. Zip Codes Lookup works by querying a database of US zip codes and returns the matches as JSON with each ZIP's primary county, with county FIPS codes, time zone, latitude, longitude and ZIP-to-ZIP distance on paid plans.

Live Test Zip Code Grounding Data Source →

The tool

Once your client is connected to the VerveContext server, this appears in its tool list as ZipCodeGroundingData. 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": "ZipCodeGroundingData",
  "arguments": {
    "zip": "64082"
  }
}

You do not name the tool yourself; the model picks it. Asking about 64082 in the terms this source covers is enough for it to reach for ZipCodeGroundingData 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
zipRequiredstringThe zip code for which you want to get the data
length 5–5
distanceToOptionalPremiumstringA second US ZIP code; adds a distance object with the straight-line distance between the two ZIP centroids
length 5–5

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": "64082",
    "state_abbr": "MO",
    "latitude": "38.850243",
    "longitude": "-94.39570",
    "city": "Lees Summit",
    "state": "Missouri",
    "timezone": "America/Chicago",
    "county": "Jackson County",
    "countyFips": "29095",
    "stateFips": "29",
    "counties": [
      {
        "name": "Jackson County",
        "fips": "29095",
        "landShare": 0.9077
      },
      {
        "name": "Cass County",
        "fips": "29037",
        "landShare": 0.0923
      }
    ],
    "distance": {
      "zipcode": "64106",
      "city": "Kansas City",
      "state_abbr": "MO",
      "miles": 19.94,
      "kilometers": 32.09
    }
  }
}

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
zipcodestring64082The ZIP code for the requested location
state_abbrstringMOTwo-letter state abbreviation code
latitudePremiumstring38.850243Geographic latitude coordinate of the location
longitudePremiumstring-94.39570Geographic longitude coordinate of the location
citystringLees SummitCity name associated with the ZIP code
statestringMissouriFull state name corresponding to the abbreviation
timezonePremiumstringAmerica/ChicagoIANA time zone of the ZIP code's location (e.g., America/Chicago)
countystringJackson CountyPrimary county of the ZIP code: the county holding the largest share of its land (e.g., Travis County)
From the Census 2020 ZIP Code Tabulation Area (ZCTA) to county relationship file. Null for PO-box and single-building ZIP codes, which have no ZCTA.
countyFipsPremiumstring29095Five-digit FIPS code of the primary county (state + county, e.g., 48453)
stateFipsPremiumstring29Two-digit FIPS code of the ZIP code's state (e.g., 48)
countiesPremiumarray[2]Every county the ZIP code reaches, largest land share first
About a third of ZIP codes cross a county line. landShare is the fraction of the ZIP's land area inside that county, so the shares of one ZIP sum to about 1.
counties.0.namePremiumstringJackson CountyCounty name
counties.0.fipsPremiumstring29095Five-digit county FIPS code
counties.0.landSharePremiumnumber0.9077Fraction (0-1) of the ZIP code's land area inside this county
distancePremiumobject{…}Distance to the ZIP given in distanceTo (only when distanceTo is set)
distance.zipcodePremiumstring64106The ZIP code given in distanceTo
distance.cityPremiumstringKansas CityCity name of the distanceTo ZIP code
distance.state_abbrPremiumstringMOTwo-letter state abbreviation of the distanceTo ZIP code
distance.milesPremiumnumber19.94Straight-line distance between the two ZIP centroids in miles
distance.kilometersPremiumnumber32.09Straight-line distance between the two ZIP centroids in kilometers

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 2 credits each time the tool actually runs; a model that reasons about the tool without calling it costs nothing.

Use cases

Checkout Address Autofill
Fill in city and state names automatically when an online shopper types their five-digit postal code during checkout.
Delivery Zone Assignment
Dispatch software queries a target city and state to collect every valid postal code before assigning regional courier routes.
Territory Sales Mapping
When sorting sales leads, CRM systems look up postal codes to group prospects under the correct state and municipal account reps.
Shipping Address Verification
To prevent delivery exceptions, order management systems check customer-entered postal codes against returned state codes before processing fulfillment.

Other ways to use Zip Code Grounding Data

Set up Zip Code 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?