ZIP and postal code API: lookup, distance and radius in 124 countries

Store locators, delivery zones and sales territories all need the same few things: what's at this ZIP code, how far apart are two codes, and which codes are within 25 km. Here are the free options and their limits, and a bulk API for all of it.

ZIP & Postal Code API: $0.30 per 1,000 results (not found = free). Apify's free plan gives you $5 of credit every month, which covers about 16,000 results a month. No start fee; failed items are free.

Try ZIP & Postal Code API

Free options

  • Zippopotam.us: free lookup of a code to its place in about 60 countries. Lookup only: no distance or radius.
  • ZipCodeAPI.com: US and Canada distance and radius; its free tier allows 10 requests per hour.
  • GeoNames postal code files: free downloads (CC BY 4.0) you load and query yourself.

More in ZipCodeAPI and Zippopotam alternatives.

The API way

  1. Open the ZIP & Postal Code API on Apify.
  2. Add codes to look up (US 90210, DE 10115), pairs to measure, centres for a radius search, place names or coordinates. Mix them in one run.
  3. Run it in bulk, or call the instant API endpoint for one lookup at a time.
curl -X POST "https://api.apify.com/v2/acts/blueberry_rainstorm~postal-code-lookup/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "postalCodes": [
    "US 90210",
    "GB SW1A 1AA",
    "DE 10115"
  ],
  "distancePairs": [
    "US 10001; US 94105"
  ],
  "radiusCenters": [
    "US 60601"
  ],
  "radius": 10,
  "radiusUnit": "km"
}'

What it costs

$0.30 per 1,000 results found; codes that aren't found are free. 10,000 lookups cost $3.

Limits, honestly

Data comes from GeoNames. For the UK, Canada, Ireland, the Netherlands and Malta only the first part of the code is published openly (e.g. SW1A, M5V), so full codes are matched on that part and the row says so. Coordinates are area centres, good for distance and radius, not for delivery routing.

Questions

Is there a free ZIP code API?

Zippopotam.us is free for lookups in about 60 countries, and ZipCodeAPI.com has a free tier of 10 requests per hour for the US and Canada. The Pandapi API covers 124 countries with distance and radius for $0.30 per 1,000 results.

How do I find all ZIP codes within a radius?

Add the centre code to radiusCenters, set radius and unit (km or miles), and run. You get every code in range with its distance.

Does it support UK postcodes?

Yes, matched on the outward code (e.g. SW1A), which is what open data publishes. Full address-level UK data needs Royal Mail's paid PAF.

ZIP & Postal Code API: $0.30 per 1,000 results (not found = free). Apify's free plan gives you $5 of credit every month, which covers about 16,000 results a month. No start fee; failed items are free.

Try ZIP & Postal Code API

Related guides

Free tools for the same job