ZIP & Postal Code Lookup: Distance, Radius, 120+ Countries avatar

ZIP & Postal Code Lookup: Distance, Radius, 120+ Countries

Pricing

from $0.30 / 1,000 result founds

Go to Apify Store
ZIP & Postal Code Lookup: Distance, Radius, 120+ Countries

ZIP & Postal Code Lookup: Distance, Radius, 120+ Countries

Look up ZIP and postal codes in 124 countries: city, state, county and coordinates. Distance between two codes, all codes within a radius, codes for a city, and the nearest code to a latitude/longitude. Bulk or instant API. Not-found rows are free.

Pricing

from $0.30 / 1,000 result founds

Rating

0.0

(0)

Developer

Pandapi

Pandapi

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

0

Monthly active users

35 minutes ago

Last modified

Features

Limited permissionsSingle-tenantServer interface

Share

ZIP & Postal Code Lookup: Distance, Radius & 120+ Countries

Look up ZIP codes and postal codes in 124 countries and get the city, state, county and coordinates. Also get the distance between two ZIP codes, every ZIP code within a radius, all postal codes of a city, and the nearest postal code to a latitude/longitude. Run it in bulk on thousands of rows, or call it as an instant HTTP API.

  • 📮 Postal code lookup: US 90210 gives Beverly Hills, California, Los Angeles County, 34.0901, -118.4065
  • 📏 Distance between ZIP codes: US 10001; US 94105 gives 4,126 km / 2,564 miles, across countries too
  • ⭕ ZIP codes in a radius: every code within 10 km (or miles) of a center, nearest first
  • 🏙️ City to postal codes: Springfield, IL, US gives all 35 Springfield ZIP codes in Illinois
  • 📍 Reverse lookup: 40.7484, -73.9857 gives the nearest code (10118, New York) in any country
  • 🌍 124 countries: US, Canada, UK, Germany, France, Spain, Italy, Japan, India, Mexico, Brazil, Australia and more
  • ⚡ Fast and cheap: no scraping, nothing to block. 5,000 lookups take about 5 seconds
  • 💸 You only pay for codes that are found. Not-found rows are free. No start fee.

Use cases

  • Clean and enrich address lists: add city, state, county and coordinates to a CRM or spreadsheet export
  • Store locators and delivery zones: which ZIP codes are within 25 miles of each store
  • Shipping and logistics: distance between origin and destination postal codes for quotes
  • Sales territories and lead routing: assign leads by ZIP code radius or state
  • Form validation and autocomplete: check a postal code exists and fill in the city
  • Geocoding GPS points: turn coordinates into the nearest postal code and region

How to use it

  1. Fill one or more sections: Postal codes to look up, Distance between two codes, Find codes within a radius of, Codes for a city or place, Nearest code to coordinates. You can mix them in one run.
  2. Write the 2-letter country first (US 90210, GB SW1A 1AA, DE 10115) or set Default country.
  3. Run it. Each line gives one row in the dataset, in the order you gave them. Export to Excel, CSV or JSON.

Example input

{
"postalCodes": ["US 90210", "GB SW1A 1AA", "DE 10115", "CA M5V 3L9", "JP 100-0001"],
"distancePairs": ["US 10001; US 94105", "GB SW1A 1AA; FR 75001"],
"radiusCenters": ["US 60601"],
"radius": 10,
"radiusUnit": "mi",
"placeNames": ["Springfield, IL, US", "Lyon, FR"],
"coordinates": ["40.7484, -73.9857"]
}

Output

A lookup row:

{
"type": "lookup",
"input": "US 90210",
"found": true,
"matchedOn": "exact",
"country": "US",
"countryName": "United States",
"postalCode": "90210",
"placeName": "Beverly Hills",
"state": "California",
"stateCode": "CA",
"county": "Los Angeles",
"countyCode": "037",
"latitude": 34.0901,
"longitude": -118.4065,
"places": ["Beverly Hills"],
"accuracy": 4,
"error": null
}
  • Distance rows have distanceKm, distanceMiles and the from and to places.
  • Radius rows have count, postalCodes (nearest first) and results with each code's place, state, coordinates and distance.
  • Place rows have count, postalCodes and results.
  • Reverse rows have the nearest postalCode, its place and distanceKm from your point.
  • Rows that are not found have found: false and an error such as Postal code "99999" was not found in United States. They are free.

Instant API (Standby)

Call it like a normal REST API, with answers in milliseconds once it's warm. Send your Apify token as a Bearer header:

curl -H "Authorization: Bearer YOUR_APIFY_TOKEN" \
"https://blueberry-rainstorm--postal-code-lookup.apify.actor/lookup?code=90210&country=US"
EndpointExample
/lookup?code=SW1A 1AA&country=GB
/distance?from=US 10001&to=US 94105
/radius?code=60601&country=US&radius=10&unit=mi&limit=500
/places?name=Springfield&state=IL&country=US
/reverse?lat=40.7484&lon=-73.9857 (add &country=US to stay in one country)
/countriesevery country and how many codes it has

A found answer is charged like one row. A not-found answer returns HTTP 404 and is free.

Countries and limits

124 countries from the GeoNames postal code database. Some postal services publish only part of their codes, so for these countries the actor matches the published part and says so in matchedOn:

  • United Kingdom, Guernsey, Jersey, Isle of Man: outward code (SW1A 1AA matches SW1A)
  • Canada: first 3 characters, the FSA (M5V 3L9 matches M5V)
  • Netherlands: first 4 digits. Ireland: routing key (D02). Malta: first 3 letters. Argentina: first 5 characters
  • Brazil: only major codes (ending in -000). Chile, China: partial codes

Coordinates are estimates for the area of the code (accuracy 1 = estimated to 6 = centroid). They are right for distances, radius searches and maps, not for street-level routing. Distances are straight-line (great-circle), not driving distances. Radius searches stay inside the center's country.

Speed: each country's data loads on first use (under a second for most countries). Lookups in a few countries run thousands of rows in seconds. Coordinates spread over many countries are slower, about a minute per 1,000 points; give the run more memory to speed it up.

Pricing

$0.30 per 1,000 results found ($0.0003 each). A radius or place search counts as one result, however many codes it returns. Not found is free. No start fee.

You runYou pay
1,000 ZIP code lookups$0.30
10,000 distances$3.00
100 radius searches of 25 miles$0.03

Use it from the API, n8n, Make or Zapier

Run it with the Apify API or the Apify app in n8n, Make or Zapier, then read the dataset:

curl -X POST "https://api.apify.com/v2/acts/blueberry_rainstorm~postal-code-lookup/run-sync-get-dataset-items?token=YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"postalCodes": ["US 90210", "DE 10115"]}'

FAQ

Where does the data come from? From GeoNames postal codes, under CC BY 4.0. Each row says so in dataSource, with the data date in dataDate. The data is refreshed when the actor is rebuilt.

Can I get full UK or Canadian postcodes with street addresses? No. Those files belong to Royal Mail and Canada Post. This actor uses only openly published codes.

Is "UK" accepted? Yes, UK works as well as GB.

Why is my code not found? It may be new, a PO box or company-only code, or a country with partial data (see above). Not-found rows are free.

Does it include time zones or area codes? Not yet. Open an issue if you need them.

More from Pandapi 🐼

Pandapi makes friendly, no-nonsense data tools: simple input, clean output, and fair pay-per-result prices. Found a bug or need a feature? Open an issue on the Issues tab and we answer fast.