ZIP code API

ZIP code API for 120+ countries

Send a ZIP or postal code, get back the city, state, county, coordinates and timezone as JSON. One endpoint covers the US and 120+ other countries, and the free plan needs no card.

Look up a ZIP code in one request

Pass the country code and the postal code, with your key in the x-key header:

curl -H "x-key: YOUR_KEY" https://zip.getziptastic.com/v3/US/48867

Response

200 OK
[
  {
    "country": "US",
    "postal_code": "48867",
    "city": "Owosso",
    "county": "Shiawassee",
    "state": "Michigan",
    "state_short": "MI",
    "latitude": 42.9934,
    "longitude": -84.1595,
    "timezone": "America/Detroit",
    "geohash": "dpshsfsytw8k"
  }
]

The response is an array because one postal code can cover several towns, and each one is returned. See the field reference for which fields every country provides.

More than a ZIP-to-city lookup

  • Reverse geocoding: latitude and longitude in, the nearest postal codes out.
  • Batch lookups: resolve up to 100 codes in a single call.
  • Forgiving resolve: /v3/resolve?q=… works out the country and code from loosely formatted input.
  • City search: typo-tolerant search for cities within a country.
  • AI agents: an OpenAPI spec and a native MCP server, so agents can call it directly.

Free ZIP code API plan

The free Developer plan gives you an API key with 100 requests a day on the full v3 API, and no card is required. When you need more, paid plans raise the limit and you can upgrade or cancel at any time.

Postal codes beyond the US

The same request works for 123 countries and territories, over 2.8 million postal codes in all: full UK postcodes, Canadian forward sortation areas, French, German and Australian postcodes, and more. The FAQ lists every country and where the data comes from.

Start in minutes

Create a key, then copy a working example in cURL, Python, Node.js, PHP or Ruby.