> ## 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 official federal gazette (Diario Oficial de la Federación) by date, and pull the full text of any publication.

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.
History reaches back to at least 1995.

## Publications by date

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

| Field  | Type   | Notes                                                            |
| ------ | ------ | ---------------------------------------------------------------- |
| `date` | string | **Required.** Gazette date, `yyyy-mm-dd`. Back to at least 1995. |

```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`, and `has_text`.

<Note>
  `has_text: true` means the full text is machine-readable and worth fetching
  with the lookup below. Entries with `has_text: false` are scanned images.
</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`         | number | Optional. First character of the text to return (default 0).      |
| `limit`          | number | 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`, 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 and `official_url` are still populated.
</Note>

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