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.
{
"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"
}
}
}https://api.vervecontext.com/v1/mcpPer-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.
| Argument | Type | Description |
|---|---|---|
zipRequired | string | The zip code for which you want to get the data length 5–5 |
distanceToOptionalPremium | string | A 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.
{
"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.
| Field | Type | Example | Description |
|---|---|---|---|
zipcode | string | 64082 | The ZIP code for the requested location |
state_abbr | string | MO | Two-letter state abbreviation code |
latitudePremium | string | 38.850243 | Geographic latitude coordinate of the location |
longitudePremium | string | -94.39570 | Geographic longitude coordinate of the location |
city | string | Lees Summit | City name associated with the ZIP code |
state | string | Missouri | Full state name corresponding to the abbreviation |
timezonePremium | string | America/Chicago | IANA time zone of the ZIP code's location (e.g., America/Chicago) |
county | string | Jackson County | Primary 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. |
countyFipsPremium | string | 29095 | Five-digit FIPS code of the primary county (state + county, e.g., 48453) |
stateFipsPremium | string | 29 | Two-digit FIPS code of the ZIP code's state (e.g., 48) |
countiesPremium | array[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.namePremium | string | Jackson County | County name |
counties.0.fipsPremium | string | 29095 | Five-digit county FIPS code |
counties.0.landSharePremium | number | 0.9077 | Fraction (0-1) of the ZIP code's land area inside this county |
distancePremium | object | {…} | Distance to the ZIP given in distanceTo (only when distanceTo is set) |
distance.zipcodePremium | string | 64106 | The ZIP code given in distanceTo |
distance.cityPremium | string | Kansas City | City name of the distanceTo ZIP code |
distance.state_abbrPremium | string | MO | Two-letter state abbreviation of the distanceTo ZIP code |
distance.milesPremium | number | 19.94 | Straight-line distance between the two ZIP centroids in miles |
distance.kilometersPremium | number | 32.09 | Straight-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.
| Status | What it means |
|---|---|
400 / 422 | The arguments did not validate. The message names the offending one. |
401 | The OAuth session is invalid or expired — reconnect the server. |
403 | Blocked by a key restriction or an IP allow-list. Never a bad identity. |
404 | This source is not part of VerveContext. Check the catalog. |
429 | Out 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.
Related
More in Geography: