Skip to main content
Glama

US ZIP Code Lookup API - Bulk ZIP, City-to-ZIP Reverse & Distance

us_zip_code_lookup
Read-onlyIdempotent

Look up US 5-digit ZIP codes (and ZIP+4) in single or bulk batch (up to 25) to get city, state, US Census region/division, primary timezone, and coordinates — or reverse-lookup all ZIP codes for any US city and state, plus Haversine distance between two ZIP codes. 0 AI, fast cached response. Free: 5 calls/day per IP. Paid: Radar API key (from €15/mo at https://radarbg.com/pricing#starter via X-API-Key) or $0.001/call via x402 at https://radarbg.com/x402/us-zip-code-lookup.

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "zipCode": "90210",
      "distanceToZip": "10001"
    },
    "name": "us_zip_code_lookup"
  }
}

Input Schema

NameRequiredDescriptionDefault
cityNoUS city name for reverse City+State -> ZIP lookup (e.g. 'Beverly Hills')
stateNo2-letter US state code or full state name (e.g. 'CA')
zipCodeNoSingle 5-digit US ZIP code or ZIP+4 (e.g. '90210')
zipCodesNoUp to 25 US ZIP codes for bulk lookup
distanceToZipNoOptional second ZIP code to calculate straight-line distance in miles & km

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.5/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations only declare read-only/idempotent/open-world; the description adds substantive behavior: cached fast response, free tier of 5 calls/day per IP, paid access via Radar API key in X-API-Key, or $0.001/call through x402, with pricing links. Auth requirements, rate limits, and cost model are exactly the operational facts an agent needs before calling.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The core capability and modes are front-loaded in the first sentence, with cost/auth details following. It is dense and every sentence carries information, though the pricing URLs and multiple acquisition paths make the tail slightly cluttered.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description does the right job of listing returned fields and distance units, and it covers auth and quotas. The only gap is that no parameter is required, so the description never explicitly states that at least one lookup mode (zipCode, zipCodes, or city+state) must be supplied, leaving an agent to infer mode exclusivity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3, but the description adds meaning on top: the 25-item bulk cap, that city+state combine for reverse lookup, and that distance is returned in both miles and km. Units and pairing behavior are useful clarifications beyond the raw schema text.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States concrete verbs and resources: look up US 5-digit ZIP codes (single or bulk up to 25), reverse-lookup all ZIPs for a city/state, and compute Haversine distance between two ZIPs. It also enumerates the returned fields (city, state, Census region/division, timezone, coordinates), so an agent can distinguish it from neighbors like airports_flight_distance or official_geocoding_api without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description clearly maps modes to inputs — one zipCode for single, zipCodes array for bulk (cap 25), city+state for reverse, distanceToZip for distance — which gives practical when-to-use context. It stops short of naming alternatives or exclusions (e.g., non-US addresses, ambiguous city names), so it is clear context without explicit routing.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources