---
title: "DOF Publication"
method: POST
path: "/mx/dof/publication/v1"
tags: ["Mexico", "DOF"]
---

# DOF Publication

`POST /mx/dof/publication/v1`

## Request

- Base URL: `https://api.croma.run`
- URL: `https://api.croma.run/mx/dof/publication/v1`
- Auth: HTTP bearer

Retrieve one publication from Mexico's official federal gazette (DOF) by id, including its plain text when the publication is machine-readable. Publications range from a few hundred characters to entire decrees, so the text is returned in character ranges: `content.total_length` is the full size, and when `content.has_more` is true request the next range with `offset: content.next_offset`. Anything published before the 1973 volume is held only as a scan and returns `is_image_only: true` with `content: null`, its metadata, and `scan_url` for the official scanned page. This returns one gazette publication, not the consolidated text of a law; for that use `diputados-federal-law`.

## Headers

- `Idempotency-Key` string

## Request body

- object
  - `publication_id` string, required: Publication id (`id` from publications-by-date or search results).
  - `offset` integer: First character of the range to return. Pass the previous response's `next_offset` to continue reading.
  - `limit` integer: Maximum characters to return (1000-1000000).

## Response `200`

Successful response

- DofPublicationResponse
  - `data` DofPublicationData, required
    - `found` boolean, required
    - `publication_id` string, required
    - `publication` object, nullable, required
      - `id` string, required
      - `title` string, nullable, required
      - `date` string, nullable, required
      - `edition` 'morning' | 'evening' | 'extraordinary', nullable, required
      - `section` string, nullable, required
      - `page` number, nullable, required
      - `page_end` number, nullable, required
      - `branch` string, nullable, required
      - `agency` string, nullable, required
      - `sub_agency` string, nullable, required
      - `content` object, nullable, required
        - `text` string, required
        - `offset` number, required
        - `total_length` number, required
        - `has_more` boolean, required
        - `next_offset` number, nullable, required
      - `is_image_only` boolean, required
      - `content_capped` boolean, required
      - `scan_url` string, nullable, required
      - `official_url` string, required

## Other responses

- `400`: Invalid request body
- `401`: Missing or invalid API key
- `429`: Rate limit exceeded
- `500`: Internal error
- `502`: Upstream source returned an error

---

[API](https://skmtc.dev/usecroma/apis/croma-marketplace-api.md) · [All operations](https://skmtc.dev/usecroma/apis/croma-marketplace-api/llms.txt) · [OpenAPI document](https://skmtc.dev/usecroma/apis/croma-marketplace-api/revisions/df016cdb29d7?raw)
