Skip to content

Releases: dr5hn/countries-states-cities-database

v3.2-export.2

28 Apr 06:57
ee5abf7

Choose a tag to compare

v3.2-export.2 - April 28, 2026

Data export build for v3.2.

Data Statistics

  • Regions: 6
  • Subregions: 22
  • Countries: 250
  • States: 5308
  • Cities: 154223
  • Postcodes: 660381

Formats

JSON, MySQL, PostgreSQL, SQLite, SQL Server, XML, YAML, CSV, GeoJSON, Toon, MongoDB


Auto-generated by GitHub Actions export workflow

v3.2 β€” France data corrections + state leveling + postcodes batch

27 Apr 16:16
c2d1ab6

Choose a tag to compare

Major data-correction release. Behaviour changes for FR/IT consumers β€” see CHANGELOG callouts.

Highlights

France β€” mainland city remap (region β†’ department)

  • 8,727 cities re-parented from 13 ISO-3166-2:FR regions to their correct INSEE department (#1352 PR-E, #1484). The FR equivalent of the IT regionβ†’province remap shipped earlier this month.
  • +455 missing metropolitan communes added from data.gouv.fr (Cherbourg-en-Cotentin, Γ‰vry-Courcouronnes, Saint-Ouen-sur-Seine, Oullins-Pierre-BΓ©nite, Herblay-sur-Seine, …) automatically remapped to the correct department (#1352 PR-A, #1394).
  • FR state metadata polish: corrupted native field values restored (Ain, Aude, Eure, …) (#1352 PR-B, #1393).

Consumer-visible behaviour change: querying cities by region state_code (ARA, IDF, NOR, PDL, NAQ, BRE, OCC, GES, CVL, BFC, HDF, PAC, 20R) now returns []. Use the department state_code (03, 13, 2A, 2B, 75C, …) instead, or traverse the parent_id hierarchy.

France β€” overseas territories

  • 9 new state records + 31 city files for GF (Guyane), BL (Saint-BarthΓ©lemy), MF (Saint-Martin), PM (Saint-Pierre-et-Miquelon), TF (TAAF) (#1352 PR-D, #1400).
  • Documented dual-representation policy in MULTI_LEVEL_TERRITORIES.md (#1352 PR-C, #1392).

Italy β€” completes the #1349 cleanup

  • Dropped 88 placeholder "Provincia di X" pseudo-cities (#1349, #1482).
  • Merged the 2 ISTAT-canonical comune dedup pairs that were intentionally deferred from #1399: Sermide e Felonica (MN), Corteolona e Genzone (PV) (#1349, #1481).

State leveling normalised (FR + IT)

  • All FR + IT state rows now carry consistent level values: level=1 = region, level=2 = department / province / metropolitan city / equivalent (#1489). Downstream consumers can now filter by level reliably.

Postcodes infrastructure (#1039)

  • Bulk imports for KH (1,640), VE (1,187), MG (111), MZ (161), MU (1,874), MT (26,593), BN (547), HU (3,569), CN (22,656), MM (17,331), LU (4,491) β€” completing roughly 50 country postcode datasets total.
  • Export pipeline updated to gzip postcode export files and route them to GitHub Releases instead of git commits (#1490).

Data statistics (post-release)

To be populated by the export pipeline running off this tag.

Migration notes for downstream tools

  • csc-export-tool / countrystatecity SDKs: nothing to change. APIs use state_code and state_id; both remain valid. Consumers who hardcoded region codes for FR or IT will get empty arrays and should migrate to department / province codes. Hierarchical traversal via parent_id continues to work.
  • Direct DB consumers: see CHANGELOG callouts for FR and IT regionβ†’department/province remaps.

Full changelog

See CHANGELOG.md.

Refs: #1039, #1349, #1352

v3.2-export.1

27 Apr 16:21
c2d1ab6

Choose a tag to compare

v0.0-export.1 - April 27, 2026

Data export build for v0.0.

Data Statistics

  • Regions: 6
  • Subregions: 22
  • Countries: 250
  • States: 5308
  • Cities: 154223
  • Postcodes: 660381

Formats

JSON, MySQL, PostgreSQL, SQLite, SQL Server, XML, YAML, CSV, GeoJSON, Toon, MongoDB


Auto-generated by GitHub Actions export workflow

v3.1-export.4

27 Apr 15:55
675b0e8

Choose a tag to compare

v3.1-export.4 - April 27, 2026

Data export build for v3.1.

Data Statistics

  • Regions: 6
  • Subregions: 22
  • Countries: 250
  • States: 5308
  • Cities: 153768
  • Postcodes: 629118

Formats

JSON, MySQL, PostgreSQL, SQLite, SQL Server, XML, YAML, CSV, GeoJSON, Toon, MongoDB


Auto-generated by GitHub Actions export workflow

v3.1-export.3

25 Apr 15:07
5de5169

Choose a tag to compare

v3.1-export.3 - April 25, 2026

Data export build for v3.1.

Data Statistics

  • Regions: 6
  • Subregions: 22
  • Countries: 250
  • States: 5299
  • Cities: 153832
  • Postcodes: 0

Formats

JSON, MySQL, PostgreSQL, SQLite, SQL Server, XML, YAML, CSV, GeoJSON, Toon, MongoDB


Auto-generated by GitHub Actions export workflow

v3.1-export.2

28 Mar 13:17

Choose a tag to compare

v3.1-export.2 - March 28, 2026

Data export build for v3.1.

Data Statistics

  • Regions: 6
  • Subregions: 22
  • Countries: 250
  • States: 5296
  • Cities: 153823

Formats

JSON, MySQL, PostgreSQL, SQLite, SQL Server, XML, YAML, CSV, GeoJSON, Toon, MongoDB


Auto-generated by GitHub Actions export workflow

v3.1-export.1

28 Mar 07:50

Choose a tag to compare

v3.1-export.1 - March 28, 2026

Data export build for v3.1.

Data Statistics

  • Regions: 6
  • Subregions: 22
  • Countries: 250
  • States: 5296
  • Cities: 153732

Formats

JSON, MySQL, PostgreSQL, SQLite, SQL Server, XML, YAML, CSV, GeoJSON, Toon, MongoDB


Auto-generated by GitHub Actions export workflow

v3.1

27 Feb 15:06
45317db

Choose a tag to compare

Changelog β€” v3.1

🌍 New Data Added

  • Add missing cities for Saudi Arabia, Japan, fix data quality issues and remove duplicates
  • Add population and GDP column in countries and native data
  • Add population in cities table
  • Add timezone support for all cities using geographic coordinates
  • Add translations.csv export for country, region, and subregion name translations
  • Add DuckDB import script and GitHub Actions integration for database format conversion
  • Add MCP Server Integration for GitHub Copilot Agents
  • Add Claude Code GitHub Workflow
  • Add toon & geojson script

Countries & Regions

  • Afghanistan β€” Add missing Wardak province and cities
  • Angola β€” Add missing Namibe province and cities with translations (ISO 3166-2:AO)
  • Azerbaijan β€” Add 3 missing municipalities with Wikipedia-sourced translations (ISO 3166-2:AZ)
  • Bahamas β€” Align districts with ISO 3166-2:BS (42β†’32 states)
  • Bangladesh β€” Add 64 districts with multilingual support and reassign cities (ISO 3166-2:BD)
  • Botswana β€” Fix missing districts, towns and cities
  • Cabo Verde β€” Add missing SΓ£o Salvador do Mundo municipality (CV-SS)
  • Cambodia β€” Add missing Tboung Khmum province (ISO 3166-2:KH)
  • CΓ΄te d'Ivoire β€” Restructure administrative divisions per ISO 3166-2:CI
  • Dominican Republic β€” Add missing province and 10 regions per ISO 3166-2:DO
  • Equatorial Guinea β€” Add missing Djibloho province (GQ-DJ)
  • Estonia β€” Add municipalities and update county ISO codes per ISO 3166-2:EE
  • Ethiopia β€” Add missing Sidama (ET-SI) and Southwest Ethiopia Peoples (ET-SW) states; reassign 12 cities
  • France β€” Add missing Nouvelle-CalΓ©donie (New Caledonia) overseas collectivity
  • Guinea-Bissau β€” Add missing Bissau autonomous sector (GW-BS)
  • Iceland β€” Add 64 missing municipalities per ISO 3166-2:IS
  • Indonesia β€” Add 7 missing geographical units per ISO 3166-2:ID
  • Iraq β€” Add missing Kurdistan Region (IQ-KR) per ISO 3166-2:IQ
  • Italy β€” Add 15 missing administrative divisions per ISO 3166-2:IT
  • Libya β€” Add missing Al Butnan province and cities per ISO 3166-2:LY
  • Lithuania β€” Add 7 city municipalities per ISO 3166-2:LT
  • Maldives β€” Fix administrative divisions per ISO 3166-2:MV
  • Malta β€” Add missing Safi local council (MT-47)
  • Marshall Islands β€” Add 24 municipalities per ISO 3166-2:MH
  • Moldova β€” Add missing Leova district (ISO 3166-2:MD)
  • Monaco β€” Add 14 missing quarters per ISO 3166-2:MC with translations
  • Montenegro β€” Add missing municipalities
  • Niger β€” Add missing Niamey urban community (NE-8)
  • North Korea β€” Add missing metropolitan cities (Nampho, Kaesong)
  • North Macedonia β€” Update municipality data
  • Oman β€” Fix governorate structure per ISO 3166-2:OM
  • Pakistan β€” Remove deprecated FATA state, merge cities into Khyber Pakhtunkhwa (ISO 3166-2:PK)
  • Panama β€” Add missing Naso TjΓ«r Di indigenous region (PA-NT)
  • Paraguay β€” Add 4 cities to Central department and fix Asuncion
  • Peru β€” Add missing PE-LMA (Municipalidad Metropolitana de Lima)
  • SΓ£o TomΓ© and PrΓ­ncipe β€” Fix administrative divisions per ISO 3166-2:ST
  • Serbia β€” Add missing administrative divisions per ISO 3166-2:RS
  • Seychelles β€” Add 3 missing districts per ISO 3166-2:SC
  • Sierra Leone β€” Add missing province and cities
  • Slovenia β€” Add missing Velenje urban municipality (SI-133)
  • Somalia β€” Add missing Sool and Woqooyi Galbeed regions (ISO 3166-2:SO)
  • Spain β€” Add 3 missing autonomous communities per ISO 3166-2:ES; fix 474 city name prefixes and apostrophes
  • Taiwan β€” Add missing Chiayi County (TW-CYQ) and Hsinchu County (TW-HSQ)
  • Tajikistan β€” Add missing capital territory Dushanbe (TJ-DU)
  • Timor-Leste β€” Add missing Oecusse-Ambeno special administrative region
  • Trinidad and Tobago β€” Fix administrative divisions to match ISO 3166-2
  • UK β€” Update countries to include states and cities
  • Wallis and Futuna Islands β€” Add missing administrative precincts (ISO 3166-2:WF)
  • Yemen β€” Add missing Ad Dali' governorate (YE-DA); fix city timezones, remove duplicates

πŸ› Bug Fixes

  • Fix duplicate states: remove 16 duplicate state records and reassign 30 cities
  • Fix city assignments: move 130 Irkutsk Oblast cities from Sevastopol to correct state
  • Fix Γ…land Islands duplication: remove duplicate state entry from Finland
  • Fix 178 data integrity issues in contributions JSON files
  • Fix Poland cities: remove 314 powiats incorrectly classified as cities
  • Fix Chile: remove comunas incorrectly listed as cities in RegiΓ³n Metropolitana
  • Fix timezone inconsistencies: add Etc/GMT filtering and update states data
  • Fix NULL handling in export workflow (Antarctica subregion_id)
  • Fix DuckDB conversion failure with individual SQLite table files
  • Fix Bahrain: remove Central governorate
  • Fix Bosnia and Herzegovina: remove extra cantons
  • Fix Saint Lucia: remove extra districts
  • Fix state & city names across multiple countries
  • Fix currency and currency_symbol for Western Sahara and Congo
  • Fix Vietnam state codes and The Gambia country name whitespace
  • Fix Albania states and Greece states and cities
  • Fix Ivory Coast English and Native Name
  • Fix French cities native names
  • Fix state population cast to integer in JSON exporter
  • Add missing timezones and fix typos
  • Remove duplicate cities (Shaw/US, Canberra/Australia)

πŸ—„οΈ Schema & Infrastructure

  • Refactor world.sql: clean up table drop statements, add timezone field
  • Fix schema file formats: add PostgreSQL schema export, remove SQL Server schema
  • Restructure contributions workflow
  • Streamline README content and improve clarity
  • Add changelog functionality
  • Add GitHub Copilot instructions

New Contributors

Full Changelog: v3.0...v3.1

v3.0

02 Aug 11:53
4916592

Choose a tag to compare

!!Breaking Change

  • BREAKING CHANGE: Updated keys in states.json from 'state_code' to 'iso2' for consistency.

What's Changed

New Contributors

Full Changelog: v2.6...v3.0

v2.6

25 Mar 06:37
1443c3b

Choose a tag to compare

What's NEW!

  • SQL Server support by @dr5hn in #906
  • MongoDB support by @dr5hn in #967
  • Added Parent ID and Levels in States table to accomodate different hierarchies of countries with different structures.

What's Changed

BREAKING Change

  • Drop support for additional xml, sqlite, yml combination files by @dr5hn in #907
  • Removed states+cities.json file. by @dr5hn in b19d5b7
  • Optimised countries+states.json and countries+cities.json file content with only name of the entities. by @dr5hn in b19d5b7

New Contributors

Full Changelog: v2.5...v2.6