> ## Documentation Index
> Fetch the complete documentation index at: https://docs.usecroma.com/llms.txt
> Use this file to discover all available pages before exploring further.

# DOF

> Read Mexico's Diario Oficial de la Federación by date across its morning, evening and extraordinary editions, and pull any single publication's full text.

Everything published in the Diario Oficial de la Federación: decrees, law reforms,
and regulator disposiciones across the morning, evening, and extraordinary
editions. List a day first, then fetch the full text of any entry you care about.
The index reaches back to 1917, and machine-readable text starts with the 1973
volume.

<Note>
  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](/guides/mexico/diputados).
</Note>

## Publications by date

`POST /mx/dof/publications-by-date/v1`

| Field  | Type   | Notes                                                                     |
| ------ | ------ | ------------------------------------------------------------------------- |
| `date` | string | **Required.** Gazette date, `yyyy-mm-dd`. The index reaches back to 1917. |

```bash theme={"dark"}
curl https://api.croma.run/mx/dof/publications-by-date/v1 \
  -H "Authorization: Bearer $CROMA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "date": "2026-07-16" }'
```

| Field          | Notes                                                                                  |
| -------------- | -------------------------------------------------------------------------------------- |
| `date`         | Echo of the requested date.                                                            |
| `published`    | `false` on days with no gazette (weekends and holidays); `publications` is then empty. |
| `total`        | Number of publications that day.                                                       |
| `publications` | List of entries (see below).                                                           |

Each publication carries `id`, `title`, `edition`, `section`, `page`, `page_end`,
`branch` (e.g. `PODER EJECUTIVO`), `agency`, `has_pdf`, `has_text`, and
`scan_url`.

<Note>
  `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.
</Note>

## One publication

`POST /mx/dof/publication/v1`

| Field            | Type    | Notes                                                              |
| ---------------- | ------- | ------------------------------------------------------------------ |
| `publication_id` | string  | **Required.** The `id` of an entry from the day listing.           |
| `offset`         | integer | Optional. First character of the text to return. Default `0`.      |
| `limit`          | integer | Optional. Characters to return, 1000 to 1000000. Default `200000`. |

```bash theme={"dark"}
curl https://api.croma.run/mx/dof/publication/v1 \
  -H "Authorization: Bearer $CROMA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "publication_id": "5778302" }'
```

Returns `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`.

<Note>
  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.
</Note>

<Card title="Full reference" icon="code" href="/api-reference/overview">
  Schemas, all response fields, and an interactive playground.
</Card>
