Look up any Mexican postal code and get its state, municipio, city and colonias. Search by numeric prefix, or by estado, municipio and colonia name, and list the settlements behind a single code.
Returns the full record for a single 5-digit postal code, including its state, municipality, city, and all settlements (colonias).
A code SEPOMEX has retired still answers 200, with status set to retired and the date it left the catalog in retired_at. Its settlements are the colonias it had on that date, and successors lists the live codes in the same municipality that now carry those colonias, matched by name. The prefix and geography searches leave retired codes out.
{ "message": "Query parameter \"q\" must be at least 2 characters." }
GET/v1/postal-codes/search
Search Postal Codes by Geography
Search for postal codes using geographic filters. Supports both fuzzy (LIKE) and exact matching via the exact parameter. Returns paginated results ordered by code.
Query Parameters
Param
Type
Description
state
string
State name to search (required). E.g. Jalisco
municipality
string
Optional municipality name filter. E.g. Guadalajara
colonia
string
Optional settlement (colonia) name filter. E.g. Centro
exact
boolean
Use exact matching instead of fuzzy (default: false)
Retrieve the full record for a specific 5-digit postal code with its geographic coordinates. Optional street and number query parameters are echoed back in the response for reference but do not affect the returned coordinates.
No data behind this endpoint yet
No postal code in the catalog carries coordinates yet, so this endpoint answers 200 with the record you asked for and latitude and longitude both null. Everything else in the response is real. For the state, municipio and colonias behind a code without the geocoding, use the lookup endpoint above.