Regulatory monitoring in Mexico: watch the DOF by API

Mexico's Federal Register publishes rule changes every business day, with no alert system. Here's a small cron against an API that indexes it — entity detection included.

If you operate in Mexico — as a fintech, an insurer, a marketplace, anyone regulated — the rules that govern you are published in the Diario Oficial de la Federación (DOF), Mexico's federal register. It comes out every business day. It has no alert system, no usable public API, and no "notify me about my regulator" button. Publication in the DOF is legally sufficient notice: the day a rule appears there, you're on the clock, whether you read it or not.

Foreign teams usually solve this one of three ways: a local law firm's newsletter (thorough, but days-to-weeks behind), a person who reads the daily index (doesn't scale, doesn't audit), or nothing (popular, risky). This post shows a fourth way: a small cron job against an API that indexes the DOF daily — entity detection included.

Why entity detection is the unlock

A DOF issue is hundreds of pages of decrees, rulings and notices. Grepping titles for "CNBV" (the banking regulator) misses most of what matters, because the change that affects you is often buried inside a document about something else. Tlaloc's DOF search API extracts entities — regulators, official standards (NOMs), laws — from the full text, normalizes their aliases, and lets you query by them:

curl "https://api.tlaloc.sh/mx/v1/dof/entities/units?norm=comision+nacional+bancaria+y+de+valores&order=recent&top_k=5" \
  -H "Authorization: Bearer tlmx_..."

Real response (July 2026) — note the second hit: an amendment to the 2026 Resolución Miscelánea Fiscal, the annual tax rulebook, published July 9:

{
  "matched_norms": ["cnbv", "comision bancaria", "comision nacional bancaria y de valores"],
  "results": [
    {"fecha": "2026-07-10", "type": "reglamento",
     "title": "Reglamento Interior del Tribunal de Disciplina Judicial."},
    {"fecha": "2026-07-09", "type": "resolucion",
     "title": "Primera Resolución de Modificaciones a la Resolución Miscelánea Fiscal para 2026."}
  ]
}

matched_norms shows the alias grouping at work: "CNBV" and the full name resolve to the same entity. order=recent plus fecha_from turns the endpoint into a monitor — ask only for what's new since your last check.

A working watchlist in ~30 lines

import requests
from datetime import date, timedelta

api = "https://api.tlaloc.sh/mx/v1/dof"
headers = {"Authorization": "Bearer tlmx_..."}

watchlist = [
    "comision nacional bancaria y de valores",   # banking regulator
    "ley para regular las instituciones de tecnologia financiera",  # fintech law
    "banco de mexico",
]

yesterday = (date.today() - timedelta(days=1)).isoformat()
for entity in watchlist:
    r = requests.get(f"{api}/entities/units", headers=headers,
                     params={"norm": entity, "order": "recent",
                             "fecha_from": yesterday, "top_k": 10})
    r.raise_for_status()
    for unit in r.json()["results"]:
        # forward to Slack, email, your GRC tool…
        print(f"[{unit['fecha']}] {entity} → {unit['title']}")

Run it daily. For topics that aren't a named entity ("capital requirements for e-money institutions"), use semantic search with the same date filter: GET /v1/dof/search?q=...&fecha_from=... — it matches meaning, not keywords, which is what you want in a register that never titles things the way you'd search for them.

When an alert fires, GET /v1/dof/units/{unit_id} returns the full text; highlights=true marks exactly where your entity is mentioned inside a 500-page issue.

What it costs

Pricing is prepaid, per query, no subscription (1 unit = $1 MXN ≈ USD 0.05): entity query 0.05 u, semantic search 0.05 u, full document 0.10 u. A 10-entity watchlist checked daily runs about $18 MXN (~USD 1) per month. Compare that to what a regulatory-newsletter subscription costs — and to what missing a rule change costs.

If your compliance workflow runs on an AI assistant

The same capabilities are exposed as MCP tools (buscar_dof, buscar_entidades_dof, unidades_por_entidad_dof, obtener_documento_dof). Point Claude — or any MCP-compatible assistant — at https://api.tlaloc.sh/mx/mcp and ask: "What has the DOF published about CNBV this week? Summarize what matters for a payments company." See Tlaloc's MCP server.

What this is not

Not legal advice, and not official notice — the DOF itself is the legal source, and interpreting a change is your counsel's job. No webhooks yet either: the pattern is pull, not push. What it removes is the gap between published and known — which, in a jurisdiction where publication starts your compliance clock, is the gap that hurts.

Start: create an account, issue a tlmx_ key, build your watchlist with the entity autocomplete (GET /v1/dof/entities?q=...). New to the DOF API? Read the general guide first: How to search Mexico's Federal Register by API.