dr5hn/countries-states-cities-database resource
🌍 Discover our global repository of countries, states, and cities! 🏙️ Get comprehensive data in JSON, SQL, PSQL, SQLSERVER, MONGODB, SQLITE, XML, YAML, and CSV formats. Access ISO2, ISO3 codes, country code, capital, native language, timezones (for countries), and more. #countries #states #cities observed · 2026-08-28
Health v2 · maintenance only
98/100
- Activity 99
- Release rhythm 95
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-02. Adoption (stars, forks) is never an input.
- gap_med: 22.0
- age_days: 2966
- days_rel: 35
- days_push: 7
- n_releases_24m: 17
Adoption not part of the score
9796 stars · 3024 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-29, confidence not recorded
A community-maintained open dataset of world countries, states, cities, and postcodes with ISO codes, coordinates, timezones, currencies, and phone codes, published in 12 formats (JSON, SQL, CSV, XML, YAML, etc.). It also backs a hosted REST API and npm/PyPI packages for querying the data.
Use cases
- populate a country/state/city dropdown in a signup form
- get ISO 3166 codes and phone dial codes for all countries
- look up timezones for cities with IANA coverage
- import world geography data into MySQL, PostgreSQL, MongoDB, or SQLite
- build a location-aware shipping or address form
- find postcodes for 125 countries
- query states and cities via a REST API from any language
When to choose
- you need comprehensive offline geographic reference data in multiple database/file formats
- you want a free ODbL-licensed dataset with regular updates and attribution
- you need ISO codes, coordinates, timezones, and currencies bundled together
- you want npm or PyPI packages for direct integration
When to avoid
- you need detailed street-level or building-level geocoding rather than administrative regions
- you need frequently changing demographic data like exact populations
- your project cannot comply with ODbL attribution requirements
- you need routing or map tile data rather than reference lists
Facets
dataset · maturity active
data-science geospatial csv yaml database data-science apis web-development cross-platform python self-hosted countries states cities postcodes timezones iso-codes geographical-data odbl rest-api sql-exports maps localization nodejs web-server
5 sources
- readme: https://github.com/dr5hn/countries-states-cities-database · fetched 2026-08-28 · 6b8c23266c6f
- homepage: http://countrystatecity.in/ · fetched 2026-08-29 · 6a7ebc963fb4
- site_page: https://countrystatecity.in/about · fetched 2026-08-29 · 1bf1271d732e
- site_page: https://docs.countrystatecity.in/ · fetched 2026-08-29 · d336ca2505cc
- site_page: https://countrystatecity.in/pricing · fetched 2026-08-29 · cd71b08d415b
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| dr5hn/countries-states-cities-database | main | 98 |
For agents
markdown · JSON · MCP: product_card(name="dr5hn/countries-states-cities-database")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem