Postal Codes API
Query detailed information about Mexican postal codes with updated SEPOMEX database.
An API key is required to use this API. Official SEPOMEX source.
Sign Up to Get StartedFeatures
✓ SEPOMEX Database
Official information from Mexican Postal Service regularly updated.
✓ Complete Details
State, municipality, city, neighborhoods, settlement type, and zone (urban/rural).
✓ Geographic Coordinates
Latitude and longitude for integration with maps and geolocation services.
✓ Address Validation
Standardize and normalize addresses to improve deliveries and logistics.
API Endpoint
GET https://api.tlaloc.sh/mx/v1/zip?code={postal_code}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
code |
string | Yes | Postal code (5 digits) |
Example Request
You need a Bearer API key (prefix tlmx_) generated in the console.
curl -X GET "https://api.tlaloc.sh/mx/v1/zip?code=64000" \
-H "Authorization: Bearer tlmx_YOUR_API_KEY"
Example Response
[
{
"asentamiento": "Monterrey Centro",
"tipo_asentamiento": "Colonia",
"municipio": "Monterrey",
"estado": "Nuevo León",
"ciudad": "Monterrey",
"cp_administracion": "64000",
"clave_estado": "19",
"cp_oficina_reparto": "64000",
"clave_tipo_asentamiento": "09",
"clave_municipio": "039",
"zona": "Urbano",
"clave_ciudad": "001",
"clave_asentamiento": "0001"
}
]
Use Cases
E-commerce & Logistics
Validate shipping addresses and calculate accurate delivery costs.
Web Forms
Smart autocomplete for addresses in forms.
Geographic Analysis
Market segmentation and demographic analysis by location.
Home Services
Verify coverage and optimize delivery routes.
Frequently Asked Questions
What does the API return for a ZIP code?
Every settlement (neighborhood) in that postal code with its type, municipality, state, city, zone (urban/rural) and the official keys for each field. The response is an array: a single Mexican postal code can contain dozens of neighborhoods.
Where does the data come from?
From the national postal code catalog of SEPOMEX (Mexico's postal service), which we keep up to date.
Can I use it to validate the postal code on a CFDI 4.0 invoice?
Yes. SAT requires the recipient's fiscal address postal code to exist and match; validating against the catalog prevents rejections for non-existent postal codes.
How much does it cost?
$0.01 MXN (0.01 units) per lookup, VAT included — priced to run on every form without worrying about cost.
What is this API typically used for?
Address autocomplete in checkouts and shipping forms (the user types 5 digits and you get neighborhood, municipality and state), validating addresses before generating shipping labels, and normalizing customer databases.