---
id: "mx_inegi_municipality_code"
kind: "pattern"
status: "draft"
is_pii: false
categories: ["geo", "government"]
country: ["MX"]
langs: ["es"]
quality: 80
url: "https://registry.apicrafter.io/datatype/mx_inegi_municipality_code"
---

# Mexican municipality code (INEGI) (`mx_inegi_municipality_code`)

> **Draft.** Draft records have not been reviewed yet and may be incomplete or wrong; do not treat them as authoritative for legal or compliance decisions.

Code of a Mexican municipality in the INEGI catalogue of states, municipalities and localities (AGEEML): the two-digit state key (cve_ent) and the three-digit municipality key (cve_mun), written together as five digits or the municipality key alone as three, as in 09015 for Cuauhtémoc in Mexico City.

- Pattern of: `mx_municipality`
- Personal data (PII): no
- Categories: Geographic identifiers (geo), Government related (government)
- Countries: Mexico (MX)
- Languages: Spanish (es)
- Classification: identifier

## Detection

Regular expression (Python `re`):

```
^(?:\d{2})?\d{3}$
```

## Examples

- `09015` — Cuauhtémoc, Mexico City
- `015` — The municipality key alone
- `9015` (invalid example) — Leading zero of the state dropped

## Translations

- es: Clave de municipio (INEGI)

## Sources

- doc: <https://www.inegi.org.mx/app/ageeml/>

## Quality

Score 80/100. Missing: mapping (Wikidata, Schema.org, ...), detector coverage.

JSON: <https://registry.apicrafter.io/api/v1/datatypes/mx_inegi_municipality_code.json> · Edit: <https://github.com/apicrafter/metacrafter-registry/edit/main/data/datatypes/MX/geo/mx_inegi_municipality_code.yaml>
