Mexico RESTful zip codes API.
Sepomex is a REST and MCP API providing access to Mexico's official postal code database (SEPOMEX), covering zip codes, states, municipalities, and cities across roughly 154,000 settlements. The dataset ships as a bundled SQLite database within the application, requiring no external database, API key, or rate limit for self-hosted deployments.
The API exposes four resources under /api/v1 — zip codes, states, municipalities, and cities — with show and paginated index endpoints for each. Zip code lookups can be filtered by zip code, state, city, or colony, individually or combined, with partial and accent-insensitive matching. List responses include pagination metadata and Link/X-Total-* headers. Interactive documentation is available via Swagger UI, with the raw spec published as OpenAPI 3.
As of v1.0.0, the same data is also exposed to AI agents through the Model Context Protocol, via both Streamable HTTP and stdio interfaces. The project is Dockerized with a multi-stage build and CI that publishes images to Docker Hub, and a free, best-effort hosted instance exists for prototyping, rate-limited to about 300 requests per 5 minutes per IP with no uptime guarantee. It is intended for developers who need Mexican postal/address data, either self-hosted for production use or via the public instance for quick testing.
Sepomex is a free, open, read-only API with no API key and no rate limit when self-hosted; a public hosted instance also exists but is rate-limited to about 300 requests per 5 minutes per IP.
It's a Dockerized Ruby application (per Gemfile) that ships as a REST JSON API and also exposes an MCP server for AI agent integration.
No, it has zero external dependencies since the entire ~154k-settlement dataset ships as a bundled SQLite database inside the app.
It's for developers who need to look up Mexican postal codes, states, municipalities, or cities without scraping the official Correos de México site or handling Excel exports.
Yes, Sepomex is designed to be self-hosted, and the full dataset travels with the code so setup is a few commands using the same Docker image the public hosted instance runs.
Show your product to thousands of developers
· 100k monthly pageviews
· 7k newsletter subscribers
Create/customize beautiful digital maps.
To access tools and resources to map the world.
Enhanced United States zip code information. Census, IRS, demographics, radius, distances and more.
Provides worldwide forward / reverse geocoding.
Singapore Land Authority REST API services for Singapore addresses.
Determine if a lat/lon is on water or land.