Zip & Postal Code API
DataMAINTAINED2 tokens / call

Zip & Postal Code API

Postal and ZIP code lookup for about 100 countries, with place, region and coordinates

Look up postal/ZIP codes for ~100 countries — place name, state/province, county, and geographic coordinates. Search forward by code, or reverse by place name. Backed by the GeoNames postal dataset (~1.5M codes).

Every call needs an X-Api-Key header. A free key includes 500 tokens a month, no card required. 2 tokens per call, so the free plan covers about 250 calls a month.

No credit card requiredAccess to 125+ APIsCancel anytime
response.json
{
  "country": "US",
  "postal_code": "90210",
  "place_count": 1,
  "places": [
    {
      "country_code": "US",
      "postal_code": "90210",
      "place_name": "Beverly Hills",
      "state": "California",
      "state_code": "CA",
      "county": "Los Angeles",
      "latitude": 34.0901,
      "longitude": -118.4065,
      "accuracy": 4
    }
  ]
}
Production Ready
Battle-tested infrastructure with a 99.9% uptime SLA. Rate limits are generous, responses are consistent.
Simple Integration
Standard REST + JSON. Works with any HTTP client. Copy-ready code snippets in 4 languages.
One Key, 125+ APIs
Your DataAndAPIs subscription unlocks every API on the platform — anime, finance, sports, and more.

Use cases for Zip & Postal Code API

  • Auto-fill city and state from a ZIP or postcode in a checkout or signup form.

  • Validate that a postal code exists and belongs to the country the customer selected.

  • Get coordinates for a postal code to estimate delivery distance or find the nearest store.

  • Search the other way, from a place name to its postal codes, for address-entry helpers.

Zip & Postal Code API endpoints

Every endpoint with its parameters and a real example response.

GETPostal Code Lookup

https://api-postal-code.dataandapis.com/v1/postal-code

Query parameters

ParameterExample
code90210Required
countryUSRequired

Example request

curl "https://api-postal-code.dataandapis.com/v1/postal-code?code=90210&country=US" \
  -H "X-Api-Key: YOUR_API_KEY"
Example response
{
  "country": "US",
  "postal_code": "90210",
  "place_count": 1,
  "places": [
    {
      "country_code": "US",
      "postal_code": "90210",
      "place_name": "Beverly Hills",
      "state": "California",
      "state_code": "CA",
      "county": "Los Angeles",
      "county_code": "037",
      "latitude": 34.0901,
      "longitude": -118.4065,
      "accuracy": 4
    }
  ]
}

GETSearch By Place

https://api-postal-code.dataandapis.com/v1/search

Query parameters

ParameterExample
countryUSRequired
placeBeverly HillsRequired

Example request

curl "https://api-postal-code.dataandapis.com/v1/search?country=US&place=Beverly%20Hills" \
  -H "X-Api-Key: YOUR_API_KEY"
Example response
{
  "country": "US",
  "query": "Beverly Hills",
  "result_count": 1,
  "results": [
    {
      "country_code": "US",
      "postal_code": "90210",
      "place_name": "Beverly Hills",
      "state": "California",
      "state_code": "CA",
      "county": "Los Angeles",
      "county_code": "037",
      "latitude": 34.0901,
      "longitude": -118.4065,
      "accuracy": 4
    }
  ]
}

Where the data comes from

Source
GeoNames postal code dataset (CC BY 4.0), about 1.5 million codes.
Freshness
Reloaded from the GeoNames postal export with each refresh of the dataset.

One install. Every endpoint.

No proprietary SDKs needed. Any HTTP client works. Pick your language and paste.

3languages
2endpoints
RESTarchitecture
1key for all APIs
  • Fully typed responses — auto-completion in your IDE
  • Tracks the API in lockstep — new endpoints land same day
  • One key works across 125+ APIs on the platform
import axios from 'axios';

const { data } = await axios.get(
  'https://api-postal-code.dataandapis.com/v1/postal-code',
  { headers: { 'X-Api-Key': process.env.API_KEY } }
);

Zip & Postal Code API · X-Api-Key

Explore the endpoints

Browse request parameters and inspect live example responses.

Available Endpoints

Request Parameters

API URL

Headers

X-Api-Key

Query Parameters

code(Required)
country(Required)
import axios from 'axios';

const url = 'https://api-postal-code.dataandapis.com/v1/postal-code';
const { data } = await axios.get(url, {
  headers: { 'X-Api-Key': 'YOUR_API_KEY' }
});

One subscription. Every API.

Tokens unlock this API and 125+ others on DataAndAPIs. Switch APIs any time — we promote.

FREE

$0/mo

500 tokens / month

  • Access to all APIs
  • Tokens reset monthly
  • Community support
Start free
Most Popular

STARTER

$6.99/mo

25,000 tokens / month

  • Access to all APIs
  • Tokens reset monthly
  • Email support
Subscribe

PRO

$24.99/mo

100,000 tokens / month

  • Access to all APIs
  • Tokens reset monthly
  • Priority email support
Subscribe

ULTRA

$99.99/mo

1,000,000 tokens / month

  • Access to all APIs
  • Tokens reset monthly
  • Priority support
Subscribe

Need higher volume, dedicated infra, or a custom contract? Talk to sales →

Questions about Zip & Postal Code API

Ship Zip & Postal Code API this afternoon.

500 free tokens. No card. Plus 125+ other APIs on the same key.