Mexico API
Overview
Mexico Sepomex is a free API that provides postal code (ZIP code) data for Mexico, including state, municipality, and neighborhood information. You can look up any Mexican ZIP code and get back the corresponding geographic details. It requires no authentication, making it very easy to integrate into any project.
Beginner Tip
Mexican ZIP codes are always 5 digits — make sure to pad short codes with a leading zero if needed. No API key is required, so you can start making requests immediately.
Available Data
Example Response
{
"status": "success",
"data": {
"result": "Data from Mexico",
"description": "Mexico RESTful zip codes API",
"timestamp": "2025-01-15T10:00:00Z"
}
} Field Reference
zip_codes Array of location records matching the queried ZIP code zip_codes[].d_codigo The 5-digit postal code zip_codes[].d_asenta Neighborhood or settlement name (colonia) zip_codes[].d_mnpio Municipality name the ZIP code belongs to zip_codes[].d_estado State name the ZIP code belongs to zip_codes[].d_ciudad City name, if applicable (may be blank for rural areas) Implementation Example
const url = "https://github.com/IcaliaLabs/sepomex";
const response = await fetch(url);
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data); What Can You Build?
Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.
Common Errors & Troubleshooting
Matrix Score Breakdown
Fully tested on Apr 5, 2026
Technical Specifications
Related Tags
Similar APIs
View All →administrative-divisons-db
⭐ Beginner's PickThe Administrative Divisions DB API provides a structured list of all administrative divisions (states, provinces, regions, cities) for countries around the world.
adresse.data.gouv.fr
adresse.data.gouv.fr provides programmatic access to address database of france, geocoding and reverse via REST API.
Airtel IP
⭐ Beginner's PickAirtel IP is a free, no-auth IP geolocation API that aggregates data from multiple sources to return the country associated with any given IP address.
bng2latlong
⭐ Beginner's Pickbng2latlong is a simple, free API that converts British National Grid (OSGB36) easting and northing coordinates into standard WGS84 latitude and longitude.
Cartes.io
⭐ Beginner's PickCartes.io is a free API that lets you create maps and add custom markers without signing up.