Zippopotam.us API

Beginner's Pick Geocoding / No Auth Required Beginner HTTP
Free to Use
64 C
Measured Score 0 50 100 Speed 28/30 Consistency 13/20 Security 0/20 Browser access 15/15 Transparency 8/15 TESTED 2026-08-10

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.

Measurement Record

What actually happened when we called this API from our own infrastructure. Every value below was recorded by the request, not copied from the provider's documentation.

Request
GET http://api.zippopotam.us/us/90210
Result
HTTP 200 · application/json · 225 bytes · compressed
Response time
36 ms (median of 3) · fastest 30 ms
Browser CORS
Allowed — Access-Control-Allow-Origin: *
Served by
cloudflare
Recorded
2026-08-10

Fields Returned

Top-level fields present in the response we captured, with the type and value we actually received.

Field Type Value received
country string United States
country abbreviation string US
post code string 90210
places array [1 item]

Captured Response

Captured from a real request to http://api.zippopotam.us/us/90210 on 2026-08-10. Long arrays and nested objects are truncated to keep the shape readable.

JSON Response · Captured
{
  "country": "United States",
  "country abbreviation": "US",
  "post code": "90210",
  "places": [
    {
      "place name": "Beverly Hills",
      "longitude": "-118.4065",
      "latitude": "34.0901",
      "state": "California",
      "state abbreviation": "CA"
    }
  ]
}

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.

Implementation Example

Calls a real endpoint of this API. Replace any placeholder credentials with your own key.

Request
const url = "http://api.zippopotam.us/us/90210";
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.

How This API Fails

We deliberately sent this API a broken request and recorded exactly what came back on 2026-08-10. Knowing the shape of an error before you hit it makes error handling much easier to write.

HTTP 404 Requesting a path that does not exist application/json
{}

Common Errors & Troubleshooting

Generated guidance based on this API's documentation, not observed by us. Treat it as a starting point and check against the provider's own error reference.

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.

Measured Score Breakdown

Live HTTP request to the API endpoint

Speed 28/30
Consistency 13/20
Security 0/20
Browser access 15/15
Transparency 8/15
Endpoint Response Time 36ms

Fully tested on Aug 10, 2026

Technical Specifications

Auth No Auth
HTTPS NO
CORS UNKNOWN
Category Geocoding
Difficulty Beginner
Endpoint last called: 2026-08-10

Related Tags

Similar APIs

View All →