API Almanac
API reference › Postal

City, state, county and coordinates for a US ZIP code

GET/v1/postal/us/{zip}

GET/v1/postal/us/{zip}

City, state, county and coordinates for a US ZIP code

ZIP+4 is accepted; the +4 is ignored.

PARAMETERS
zippath · stringREQUIRED
ZIP code
e.g. 10001
In the full reference
REQUEST
curl "https://api.apialmanac.com/v1/postal/us/10001" \
  -H "X-API-Key: YOUR_KEY"
RESPONSE
200OK
{
  "postal_code": "10001",
  "country": "US",
  "city": "New York",
  "state": "New York",
  "state_code": "NY",
  "county": "New York",
  "lat": 40.7484,
  "lon": -73.9967,
  "attribution": "Postal code data © GeoNames (geonames.org), CC BY 4.0"
}
Try it — sign in first
Runs on a sandbox key: 200 requests a month. Your real key is for production.