Geo & Travel
Postal Codes API
Resolve postal and ZIP codes to place names and coordinates across 21 countries.
Request Headers
| Name | Required | Description |
|---|---|---|
X-RapidAPI-Key | required | Your RapidAPI key. Get one free. |
X-RapidAPI-Host | required | postal-codes.p.rapidapi.com |
Endpoints
GET
/v1/postalcodes Resolve a postal code to places and coordinates
Parameters
| Name | Type | Required | Default | Constraints |
|---|---|---|---|---|
code | string | required | — | matches \S |
country | string | optional | — | — |
limit | integer | optional | — | — |
offset | integer | optional | — | — |
Code Examples
curl --request GET \
--url 'https://postal-codes.p.rapidapi.com/v1/postalcodes?code=example' \
--header 'x-rapidapi-key: YOUR_API_KEY' \
--header 'x-rapidapi-host: postal-codes.p.rapidapi.com' const url = "https://postal-codes.p.rapidapi.com/v1/postalcodes?code=example";
const options = {
method: "GET",
headers: {
"x-rapidapi-key": "YOUR_API_KEY",
"x-rapidapi-host": "postal-codes.p.rapidapi.com"
}
};
const response = await fetch(url, options);
const data = await response.json();
console.log(data); import requests
url = "https://postal-codes.p.rapidapi.com/v1/postalcodes"
querystring = {"code": "example"}
headers = {
"x-rapidapi-key": "YOUR_API_KEY",
"x-rapidapi-host": "postal-codes.p.rapidapi.com"
}
response = requests.get(url, headers=headers, params=querystring)
print(response.json()) GET
/v1/postalcodes/countries List all countries that have postal codes in the dataset, sorted alphabetically by ISO code.
Code Examples
curl --request GET \
--url 'https://postal-codes.p.rapidapi.com/v1/postalcodes/countries' \
--header 'x-rapidapi-key: YOUR_API_KEY' \
--header 'x-rapidapi-host: postal-codes.p.rapidapi.com' const url = "https://postal-codes.p.rapidapi.com/v1/postalcodes/countries";
const options = {
method: "GET",
headers: {
"x-rapidapi-key": "YOUR_API_KEY",
"x-rapidapi-host": "postal-codes.p.rapidapi.com"
}
};
const response = await fetch(url, options);
const data = await response.json();
console.log(data); import requests
url = "https://postal-codes.p.rapidapi.com/v1/postalcodes/countries"
headers = {
"x-rapidapi-key": "YOUR_API_KEY",
"x-rapidapi-host": "postal-codes.p.rapidapi.com"
}
response = requests.get(url, headers=headers)
print(response.json()) Interactive Example
$ GET /v1/postalcodes?code=90210&country=US
{"data":[{"country":"US","code":"90210","place":"Beverly Hills","admin1":"California","latitude":34.0901,"longitude":-118.4065}],"meta":{"total":1,"limit":10,"offset":0}} Subscribe & License
Access this API with commercial-ready tiers on RapidAPI. Flexible plans designed for side-projects, startups, and high-volume production architectures.
Developer Support
Need help integrating or have a custom endpoint request? Our engineering team is here to assist with authentication, payload schemas, and high-frequency rate limit increases.
System Performance
Monitored 24/7 with a 99.9% uptime SLA. Built atop cloud-native microservices with globally distributed edge caching to ensure ultra-low latency response times.
All Systems Operational