Postal Codes Dataset for Mexico, MX

Postal Codes Dataset for Mexico, MX including name of the city, town, or place, various administrative divisions and alternative city names.

Report an issue
Downloads
876
Last updated
Rows
150,472
Size
14.4 MB
Format
csv
License
CC-BY-4.0

Data Files

1 file

postal-codes-mx-sample

Postal Codes Dataset for Mexico (MX)

This dataset contains Mexican postal codes across all states, built by consolidating GeoNames with SEPOMEX's own official code list and boundary polygons.

Column definitions, row count, size and last-updated date are in datapackage.yaml.

Data Sources

  • Place names and administrative tiers: © GeoNames, postal code export for Mexico, CC BY 4.0.
  • Authoritative postal code list and boundary polygons: © SEPOMEX (Servicio Postal Mexicano), Mexico's postal operator, "Códigos postales por entidad federativa", published via datos.gob.mx, CC BY 4.0.

Changes made to the source data: postal codes that appear only in the SEPOMEX list are added to the GeoNames records; coordinates are upgraded from a GeoNames estimate to the centroid of the SEPOMEX polygon (reprojected from the source Lambert Conformal Conic projection to WGS84) on every code it covers, labelled accuracy = POSTAL_CODE; admin_code1 is derived to ISO 3166-2:MX from state names rather than GeoNames' INEGI numbering.

Not endorsed by, or affiliated with, GeoNames or SEPOMEX.

Known limitations

  • Postal codes that come only from SEPOMEX's official list have a verified state and an official polygon-centroid coordinate, but no colonia/municipio name, because SEPOMEX's own data provides none.

Usage

The dataset files are available in CSV format and can be accessed and downloaded using the links provided in datapackage.yaml.

postal_code and admin_code1 must be read as text (dtype=str) — a naive pd.read_csv() can otherwise mis-handle leading zeros, which some Mexican codes carry.

For other inquiries, contact datahub@datopian.com

API access

Access dataset files directly from scripts, code, or AI agents.

Each file has a stable URL (r-link) that you can use directly in scripts, apps, or AI agents. These URLs are permanent and safe to hardcode.

  1. Fetch datapackage.yaml to inspect schema and resources
  2. Download data resources listed in datapackage.yaml
  3. Read README.md for full context
/logistics/postal-codes-mx/3 files
  • ATTRIBUTION.txthttps://datahub.io/logistics/postal-codes-mx/_r/-/ATTRIBUTION.txt
  • README.mddocumentationhttps://datahub.io/logistics/postal-codes-mx/_r/-/README.md
  • datapackage.yamlmetadata & schemahttps://datahub.io/logistics/postal-codes-mx/_r/-/datapackage.yaml