Mexican Laws in Markdown

315 Mexican federal laws converted to structured Markdown and JSON, ready for AI

Open Source · Legal Tech 2026 active

Resumen

mx-md converts the official PDFs of all 315 Mexican federal laws from the Cámara de Diputados into two complementary formats: a canonical JSON AST (source of truth) with stable hierarchical IDs, and clean Markdown rendered from that JSON. The result is 37,939 articles, 58,310 fracciones, and 35,176 reform notes — all structured and ready for AI agents, RAG pipelines, semantic search, and legal APIs.

Mexican Laws in Markdown

Problema Resuelto

Official Mexican law PDFs are nearly unusable programmatically — full of repeated headers, page markers, and no semantic structure. mx-md strips all of that and produces clean, chunker-friendly Markdown and a typed JSON AST with stable IDs, so any tool that consumes text or structured data can use it immediately.

Audiencia Objetivo

AI engineers building legal agents or RAG systems, developers building legal tech products for the Mexican market, researchers and lawyers who need machine-readable law.

Tecnologías

  • Python
  • pdfplumber
  • Tesseract OCR
  • JSON Schema