Skip to main content
Choose the export for your database engine. A Git clone contains reference files and source code; the complete downloadable datasets are release assets.
These instructions use v5.2.0-export.1, published 3 November 2026. Its core tables contain 250 countries, 5,327 states and 156,169 city records. API data and installed package snapshots can differ. Check the latest release before choosing another version.

Available database formats

Prerequisites

  • Install a supported version of your chosen database and its client tools.
  • Allow space for both the download and extracted data, plus engine indexes and temporary import files. Check actual asset sizes on the release page.
  • Import into a new empty database or destination file. Back up application data before any replacement.
  • Keep country, state and city files from the same release when joining separate extracts.

What you will get

The pinned SQLite snapshot includes regions, subregions, countries, states, counties, county-to-state links, cities and postcodes. File layout and types vary by engine; inspect the schema and the source files you install. Country and state names are joined from parent tables. A city’s state link can be null, and county relationships can span more than one state. Use the relationship rules in the schema reference when building queries.

Troubleshooting

  • A missing mysql/world.sql, pgsql/world.sql or sqlite/world.sql path refers to an older distribution layout. Use the release asset listed above.
  • A SQLite file is binary; SQL-script import commands do not apply to it.
  • SQL Server tables use the world schema inside your chosen database.
  • Do not compare exact API counts with a different installed snapshot.

Next steps

Inspect the schema, read the database overview, or use the hosted API for managed access. Data use is subject to the ODbL licence and applicable source notices.