ZIP Code API: Free Postal Code Search & Validation
Look up, validate and autocomplete postal codes in 149 countries, get their city and coordinates, and calculate distances, all with one REST API.
No code needed? Try the free ZIP code distance calculator or look up postal codes by country.

Start in three steps
Every country formats postal codes differently. zipcodestack gives you one clean data layer to validate and normalize them.
Get your API key
Sign up and copy your key. The free plan includes 300 requests a month.
Make a request
Send a GET request with a postal code and a country. The documentation has an example for every endpoint.
Get the data back
Receive the city, region and coordinates as JSON in milliseconds, from data we update regularly.
Endpoints
Search, validate and autocomplete postal codes, or find every code within a radius, a polygon, a city or a state.
GET /v1/search1
2
3
4
// search for zip codes
curl -X GET \
--url "https://api.zipcodestack.com/v1/search?codes=20095&country=de" \
--header "apikey: YOUR-APIKEY"
GET /v1/distance1
2
3
4
// calculate distance between two zip codes
curl -X GET \
--url "https://api.zipcodestack.com/v1/distance?code=99501&compare=90210" \
--header "apikey: YOUR-APIKEY"
More endpoints for every address workflow
Every search result now also includes the county or district level and how precise the coordinates are.
GET /v1/validateNewValidate postal codes
Check that a code exists and matches its country's format before an order ships.
GET /v1/autocompleteNewAutocomplete
Suggest postal codes and their city while customers type their address.
GET /v1/reverseNewReverse lookup
Turn a GPS position into the nearest postal codes, closest first.
GET /v1/radiusRadius search
All postal codes within a distance of a code, for delivery zones and store finders.
GET /v1/polygonPolygon search
All postal codes inside any shape you draw on a map.
GET /v1/code/cityCodes by city & state
Every postal code of a city or a state.
"We had a few special requirements, and the zipcodestack.com team was super responsive & helpful, as they replied to all our questions and helped us get started within just a few hours. With the help of their ZIP code API, we can now easily handle our global address validation and shipping calculations."
Armin Daryabegi CTO

Frequently asked questions
What developers ask us about the ZIP code API
A REST API that validates postal codes and returns their location data for 149 countries. Businesses use it to verify addresses, calculate shipping and add location data to their records.
More questions? Contact us.
Start using the ZIP code API for free
Accurate postal code data for address validation, shipping and search, from an API you never have to think about.
149 countries
HTTPS everywhere
Support from engineers
Fast responses
No credit card required · Instant access