Discontinued

This API no longer responds. Our last check on 2026-08-10 found no working endpoint — the service appears to have shut down or moved. The documentation, code samples and score below are kept for reference only; do not build against this API. See working Geocoding APIs →

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

The kind of data this API exposes, based on its documentation. We could not call the endpoint to confirm the exact field names.

IP address information
geographic location
ASN and ISP data
Use case: Integrate mexico restful zip codes api data into web and mobile applications

Example Response

Illustrative shape only — we were not able to call this endpoint (it requires credentials or exposes no public sample URL), so the fields below show the kind of data this API returns rather than a recorded response.

JSON Response · Illustrative
{
  "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

Calls a real endpoint of this API. Replace any placeholder credentials with your own key.

Request
const url = "https://sepomex.icalialabs.com/api/v1/zip_codes?zip_code=06600";
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

Generated guidance based on this API's documentation, not observed by us. Treat it as a starting point and check against the provider's own error reference.

404 Not Found The ZIP code does not exist in the database
Verify the ZIP code is exactly 5 digits and is a valid Mexican postal code; some new codes may not be indexed yet
Empty results array The query returned no matches
Check that you are using the correct parameter name zip_code and that the value is a string of digits
Connection timeout The free API server may be under load
Add retry logic with exponential backoff; consider caching results locally since postal code data rarely changes

Metadata Score Breakdown

Estimated from metadata — endpoint not independently tested

This score is estimated from observable metadata — HTTPS support, authentication model, declared CORS, and documentation reachability — because the API requires authentication or exposes no publicly testable endpoint. The five-signal breakdown is only shown for live-tested APIs.

Metadata estimate · endpoint not independently tested

Technical Specifications

Auth No Auth
HTTPS REQUIRED
CORS UNKNOWN
Category Geocoding
Difficulty Beginner
Listing details not endpoint-verified

Related Tags

Similar APIs

View All →