Open geographic data / API v1

The world, ready for your next idea.

Countries, states, and cities in simple, ready-to-use JSON. Build location-aware experiences without an API key or a backend to manage.

✓ No API key✓ Ready-to-use JSON✓ Free & open source
Quick start / JavaScript
// Get all countries
fetch('./api/v1/countries.json')
  .then(function (response) { return response.json(); })
  .then(function (data) { console.log(data); });

// Get a country by ISO2
fetch('./api/v1/countries/us.json')
  .then(function (response) { return response.json(); })
  .then(function (data) { console.log(data); });
STATIC JSON · NO AUTH REQUIREDReady to use

A world of places, in one dataset

Loading dataset statistics…

—

Countries

—

States & provinces

—

Cities

The essentials, made simple

Everything starts with a place.

From a better address form to a searchable city picker, get the data you need without adding complexity.

Places that fit together

Browse countries, their states and provinces, and the cities within them.

Search with less to load

Use country-specific search files and normalized names to find a city quickly.

Simple to host anywhere

Serve the generated JSON files from your favorite static host or CDN.

A few places to start

A path for every place.

Each endpoint is a static file. Open one to see the data, or try the examples in the playground.

See all endpoints

See it in action

Ready to put places to work?

Try the address picker, city search, and ID lookup with real data.

Open the playground