Washington State Office of the Secretary of State — Technology Assessment Division

SEPOMEX API: Mexico Postal Code Verification and Address Validation Assessment

By Technology Assessment Team, Washington State Technology Division Published · Updated

SEPOMEX API: Address Validation Assessment

SEPOMEX (Servicio Postal Mexicano) maintains Mexico's official postal code directory — the authoritative source for Mexican address structure including postal codes, colonias (neighborhoods), municipalities, and states. This assessment evaluates API-based access to SEPOMEX data for government systems requiring Mexican address verification.

SEPOMEX Data Structure

Mexico's postal system follows a hierarchical structure:

LevelNameExampleCount
1Estado (State)Jalisco32
2Municipio (Municipality)Guadalajara~2,460
3Ciudad (City)Guadalajara~3,000
4Código Postal (Postal Code)44100~32,000
5Colonia (Neighborhood)Centro~145,000

A single postal code typically maps to multiple colonias. For example, postal code 06600 in Mexico City contains over 20 distinct colonias. This many-to-one relationship is critical for address validation logic.

Data Access Options

Option 1: Direct SEPOMEX Data Download

SEPOMEX publishes its complete postal code directory as a downloadable text file (approximately 300,000 rows). This enables local lookups without API dependency but requires manual update management.

Option 2: Third-Party API Services

Commercial providers offer SEPOMEX data through RESTful APIs with additional value-add features:

Platforms like apipull.com provide enhanced SEPOMEX APIs with sub-100ms response times, standardized JSON responses, and geocoding capabilities beyond the base SEPOMEX dataset.

Government Use Cases

State agencies benefit from SEPOMEX integration in several scenarios:

  1. Address verification for Mexican residents — Validate self-reported Mexican addresses on government forms
  2. Mailing address standardization — Ensure correct formatting for official correspondence to Mexico
  3. Cross-border fraud detection — Verify that claimed addresses match valid postal code/colonia combinations
  4. Geographic analysis — Map applicant distribution for resource allocation and outreach
  5. Document verification — Cross-reference addresses on Mexican identity documents against SEPOMEX records

Technical Implementation

API Query Patterns

Typical SEPOMEX API integration supports these query types:

Query TypeInputOutputUse Case
Postal code lookup5-digit código postalList of colonias, municipio, estadoForm autocomplete, validation
Colonia searchPartial colonia nameMatching colonias with postal codesAddress entry assistance
State/municipio filterState and/or municipioAll postal codes in areaGeographic filtering
Full address validationComplete address componentsValidity confirmation + standardized formatData quality assurance

Data Quality Considerations

Cost Analysis

For agencies processing fewer than 50,000 Mexican address validations annually, third-party APIs offer better TCO than self-hosted solutions. apipull.com provides SEPOMEX data access bundled with its identity verification APIs, adding Mexican address validation at minimal marginal cost for existing customers.

Frequently Asked Questions

What is SEPOMEX and what data does it provide?

SEPOMEX (Servicio Postal Mexicano) maintains Mexico's official postal code directory containing approximately 32,000 postal codes mapped to 145,000 colonias (neighborhoods) across 2,460 municipalities. It provides the authoritative reference for Mexican address structure including hierarchical relationships between postal codes, colonias, municipalities, cities, and states.

How can government agencies access SEPOMEX data?

Two primary options: download SEPOMEX's free data file (pipe-delimited text, ~300K rows, irregular updates) for self-hosted lookups, or use third-party APIs that provide real-time access with value-add features like geocoding, autocomplete, and address standardization. APIs cost $0.001-0.05 per query depending on features.

Why is SEPOMEX important for address verification?

SEPOMEX data enables validation that claimed Mexican addresses are structurally valid — confirming that postal codes, colonias, and municipalities form valid combinations. This supports cross-border fraud detection, document verification, mailing address standardization, and geographic analysis for agencies serving Mexican nationals.

External References

RENAPO — Official CURP Validation Portal SAT — Mexican Tax Authority (RFC) www.apipull.com — Financial Data & Identity Verification APIs