PUBLIC API · OFFICIAL DATA · 2026

MéxicoAPIOpen API of Mexican reference data, with the official source of every value

States and municipalities, banks and CLABE, FIX exchange rate, UDIS, non-business days, UMA, minimum wage and income tax tables, with source, license and date.

Personal project · design, development and operations
TypeScriptCloudflare WorkersNode.jsVitestGitHub ActionsMCP
MéxicoAPI homepage: Mexican reference data with official source, license and sha256, plus getting-started examples for the API, the npm package and the MCP server
Public website reviewed on October 18, 2026.

VERIFIABLE EVIDENCE · OCTOBER 2026

Live API
mexicoapi.dagel4k.workers.dev ↗︎
npm packages
mexicoapi and mexicoapi-mcp · 0.1.0 ↗︎
Datasets
10 · INEGI, Banxico, DOF, CNBV, CONASAMI and SAT ↗︎
Source code
GitHub · MIT license ↗︎
01 / CONTEXT

The problem

Almost every system built in Mexico needs the same catalogs: states and municipalities, banks, exchange rates, non-business days, UMA or income tax tables. Each team downloads them separately, cleans them by hand and stops updating them, often without keeping track of where each value came from.

02 / IMPLEMENTATION

My contribution

End-to-end design and development: a pipeline that downloads, validates and versions ten datasets from INEGI, Banxico, the DOF, CNBV, CONASAMI and SAT; a read-only API on Cloudflare Workers with an OpenAPI spec; the mexicoapi npm package, with CLABE, RFC, CURP and NSS validators and offline data; and the mexicoapi-mcp server so AI assistants can look up the official value.

03 / HANDOVER

What it includes

A live API with no key or account, plus full downloads in JSON, CSV and SQLite. Every response states the source, license and cut-off date of the data. A GitHub Actions bot checks the automated sources daily or weekly and proposes changes as pull requests; values published in the DOF are transcribed by hand, each with its literal citation.

Project decisions

  • Keep each source’s original files with their hash, so any value can be traced back to the official publication.
  • Do not redistribute SEPOMEX postal codes, since their terms do not allow it: the package includes a command that downloads them from Correos de México on each user’s machine.
  • Split the data bot into separate jobs so the publishing key never shares a runner with code that processes external files.
  • Compute the days set by law (LFT art. 74 and CFF art. 12) with a rule, and flag in every response what the calendar does not cover.
  • More than 2,000 automated tests with Vitest, including property-based tests for the validators and date handling.
RELATED SERVICES

I can build something like this for your business

Want to talk it through?

Does your system need official data, validation or its own API? Tell me what you are building.