Zippopotam.us API

⭐ Beginner's Pick Geocoding / No Auth Required Beginner HTTP
Free to Use Varies (check documentation)

Overview

Zippopotam.us is a completely free, no-auth-required API that returns place information for postal codes from dozens of countries including the US, UK, Canada, and many European nations. Simply pass a country code and zip code in the URL and get back city, state, and coordinates. It is one of the easiest APIs for beginners to start with.

💡

Beginner Tip

No API key is needed. Format the URL as /country-code/postal-code, for example /us/90210. For non-US countries use ISO 3166-1 alpha-2 country codes.

Available Data

country name and code
population
capital city
region and subregion
flag image URL

Example Response

JSON Response
{
  "name": "Japan",
  "capital": "Tokyo",
  "population": 125800000,
  "region": "Asia",
  "languages": [
    "Japanese"
  ],
  "flag": "https://flagcdn.com/jp.svg",
  "currencies": [
    {
      "code": "JPY",
      "name": "Japanese yen"
    }
  ]
}

Field Reference

country Full country name for the queried postal code.
country abbreviation Two-letter ISO country code.
post code The postal code that was looked up.
places[].place name City or locality name associated with this postal code.
places[].state Full state or region name.
places[].latitude Latitude coordinate of the place as a string.

Implementation Example

const url = "http://www.zippopotam.us/";
const response = await fetch(url);
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data);

What Can You Build?

Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.

Common Errors & Troubleshooting

404 Not Found The country code or postal code is not recognized.
Use the correct two-letter ISO country code (e.g. us, gb, de) and ensure the postal code format matches that country's standard.
Connection refused or SSL error The API uses HTTP, not HTTPS, by default.
Use http://api.zippopotam.us (not https) since the free endpoint does not enforce SSL redirection on all paths.
Empty places array The postal code exists but has no associated place data in the database.
Try a neighboring zip code or verify the postal code is currently in use.

Matrix Score Breakdown

🌐 Reachability 30/30
⚡ Speed 20/20
🔒 Security 0/15
🛠 Developer XP 20/20
✓ Reliability 7/15
Response Time 37ms

Fully tested on Apr 5, 2026

Technical Specifications

Auth No Auth
HTTPS NO
CORS UNKNOWN
Category Geocoding
Difficulty Beginner
Verified: 2026-04-04

Similar APIs

View All →