TidyData APIsAll APIsPricing

ZIP Code API - Postal Codes Lookup

Postal code lookup for 121 countries and 1.8 million codes: place name, region, province, coordinates; distance between two postal codes; and postal code validation. Accepts codes with or without spaces and dashes.

Authentication & base URL

Subscribe through one of our marketplace listings; your marketplace API key and base URL are shown there. All endpoints return JSON over HTTPS, served from a global edge network (typically 20–150 ms).

Subscribe on RapidAPI

Endpoints

GET /v1/postal/{country}/{code}

Look up a postal code

ParameterInDescriptionExample
country *pathISO country codeUS
code *pathPostal/ZIP code90210

GET /v1/postal/distance

Distance between postal codes

ParameterInDescriptionExample
from *queryCOUNTRY:CODEES:37007
to *queryCOUNTRY:CODEES:28013

GET /v1/postal/validate

Validate a postal code

ParameterInDescriptionExample
country *queryISO country codeDE
code *queryPostal code10115

GET /v1/postal/countries

Supported countries

Example

GET /v1/postal/distance?from=ES%3A37007&to=ES%3A28013

{
  "from": {
    "countryCode": "ES",
    "postalCode": "37007",
    "place": "Salamanca",
    "region": "Castilla - Leon",
    "province": "Salamanca",
    "community": "Salamanca",
    "latitude": 40.9688,
    "longitude": -5.6716,
    "accuracy": "place"
  },
  "to": {
    "countryCode": "ES",
    "postalCode": "28013",
    "place": "Madrid",
    "region": "Madrid",
    "province": "Madrid",
    "community": "Madrid",
    "latitude": 40.4187,
    "longitude": -3.7076,
    "accuracy": "place"
  },
  "distanceKm": 176.5,
  "distanceMiles": 109.7,
  "note": "Straight-line (great-circle) distance between postal code centroids.",
  "attribution": "Postal code data © GeoNames (https://www.geonames.org), CC BY 4.0."
}

Postal code lookup for 121 countries and 1.8 million codes: place name, region, province, coordinates; distance between two postal codes; and postal code validation. Accepts codes with or without spaces and dashes.

Use cases

Checkout and address forms (autofill city from ZIP), shipping cost and delivery-zone estimates, store locators, CRM data cleaning, analytics by region.

Why this API

Support

Questions or a feature you need? Open a thread in the Discussions tab.

Pricing

Free plan with 500 calls per month, then Pro (25,000 calls for $4.99/month) and Ultra (150,000 calls for $14.99/month). See all plans.