01/5 endpoints
Postal code API
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.
Fresh Mexican postal data
Programmatic access to postal codes, colonias, municipios and estados. Every response is JSON, every request takes one Bearer token.
Six of the 21 endpoints — localities, streets and geocoding — are deployed and answer requests, but the catalog behind them is not loaded yet, so they come back empty. They are marked below.
https://api.postalkit.mx
Every request must include your API token in the Authorization header. Generate a token from your dashboard after registering.
Authorization: Bearer YOUR_API_KEY
Requests without a valid token return 401 Unauthorized
.
The reference is one page per resource. All paths are relative to the base URL, and segments in {braces} are required path parameters.
01/5 endpoints
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.
02/1 endpoints
Search Mexican colonias by name across the whole catalog and get the postal code, municipio and state behind every match.
03/6 endpoints
List the 32 Mexican states and drill into the municipios, cities, postal codes and colonias inside each one, by internal ID or by official INEGI code.
04/2 endpoints
Get every postal code and every colonia inside a Mexican municipio, addressed by its identifier.
05/2 endpoints No data yet
Search Mexican localities by name and fetch a single locality with the municipio and state it belongs to. These endpoints are live, but the locality catalog behind them is not loaded yet.
06/2 endpoints No data yet
Search Mexican street names inside a state and municipio, narrow the results to a locality, and list the official street types. These endpoints are live, but the street catalog behind them is not loaded yet.
07/1 endpoints No data yet
Turn a latitude and longitude pair into the nearest Mexican postal code, with its state and municipio. This endpoint is live, but no postal code in the catalog carries coordinates yet.
08/2 endpoints
Check the quota on your plan, how many requests are left this month, and the date the postal catalog was last refreshed.
Monthly Quotas
| Plan | Requests / Month |
|---|---|
| Free | 100 |
| Starter | 5,000 |
| Pro | 50,000 |
| Business | 250,000 |
See pricing for current plan details and monthly prices.
Rate Limit Headers
Every API response includes these headers:
X-RateLimit-Limit: 100 X-RateLimit-Remaining: 58
Error Responses
| Status | Meaning |
|---|---|
| 401 Unauthorized | Missing or invalid API token |
| 404 Not Found | Resource (postal code or state) does not exist |
| 422 Unprocessable Entity | Invalid input, check the message field for details |
| 429 Too Many Requests | Monthly quota exceeded |
Start querying the full postal catalog in minutes.
curl -s https://api.postalkit.mx/v1/postal-codes/06600 -H "Authorization: Bearer YOUR_API_KEY"