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).
Endpoints
GET /v1/postal/{country}/{code}
Look up a postal code
| Parameter | In | Description | Example |
|---|---|---|---|
country * | path | ISO country code | US |
code * | path | Postal/ZIP code | 90210 |
GET /v1/postal/distance
Distance between postal codes
| Parameter | In | Description | Example |
|---|---|---|---|
from * | query | COUNTRY:CODE | ES:37007 |
to * | query | COUNTRY:CODE | ES:28013 |
GET /v1/postal/validate
Validate a postal code
| Parameter | In | Description | Example |
|---|---|---|---|
country * | query | ISO country code | DE |
code * | query | Postal code | 10115 |
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
- 1.8 million postal codes in 121 countries, answers in milliseconds from the edge.
- Postal code data © GeoNames (CC BY 4.0).
- Fair pricing: Free plan 500 requests/month, Pro 25,000 for $4.99, Ultra 150,000 for $14.99.
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.