Look up city and state by postal code
Look up city and state by postal code
Resolves a postal code to its city and state from an embedded public dataset — today only US ZIP codes are covered. Use it to autofill the city/state fields while the user types the ZIP in address forms: a 404 means “unknown ZIP” (or a country without a dataset) and the fields should simply stay manual. Static data served with Cache-Control: public, max-age=86400; safe to cache for a day.
GET
Look up city and state by postal code
Authorizations
Session JWT (from register/login) or API key (pk_...).
X-API-Key: <token> is accepted as an alternative header.
Query Parameters
ISO 3166-1 alpha-2 country code. Only US has a dataset today.
Pattern:
^[A-Z]{2}$Postal code to resolve (5-digit US ZIP).
Pattern:
^[0-9]{5}$Last modified on August 22, 2026