The gazette is organised by day and publishes the decree that created or
amended a law, never the consolidated current text of one. For what a Mexican
federal law says today, use Cámara de Diputados.
Publications by date
POST /mx/dof/publications-by-date/v1
Each publication carries
id, title, edition, section, page, page_end,
branch (e.g. PODER EJECUTIVO), agency, has_pdf, has_text, and
scan_url.
has_text: true means the full text is machine-readable and worth fetching
with the lookup below. has_text: false is either a scanned publication,
which is everything before the 1973 volume, or one of the untitled agency
section headers that carry no text by design. Scans are still readable:
scan_url opens the official scanned page.One publication
POST /mx/dof/publication/v1
found, publication_id, and publication. The publication carries
the day-listing metadata (except the has_* flags), plus sub_agency,
content, is_image_only, content_capped, scan_url, and official_url.
Publications range from a few hundred characters to entire decrees, so the text
comes back in ranges under content: text, offset, total_length,
has_more, and next_offset. Read content.total_length for the full size,
and while content.has_more is true request the next range with offset set
to content.next_offset.
Scanned publications return
is_image_only: true with content null. The
metadata, official_url and scan_url are still populated, and scan_url
opens the official scanned page, which is how you read anything published
before 1973. content_capped: true is the rarer case where the text exists
but the gazette declined to serve it because it is too large.Full reference
Schemas, all response fields, and an interactive playground.