> ## 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.

# CJF Sentencias

> Full-text search over the public-version rulings of Mexico's federal courts, and the full record of any ruling by its NEUN.

Mexico's federal judiciary publishes public versions of its rulings. Search
them by full text, with four match modes (exact phrase, at least one word,
except a word, or a range of words apart) and optional date bounds, and pull
any ruling's record by its NEUN: issuing court, subject matter, topic and
summary, and the record section by section.

## Search rulings

`POST /mx/cjf-sentencias/search/v1` [Live](https://docs.usecroma.com/live-lookups.md)

| Field | Type | Notes |
| - | - | - |
| `query` | string | **Required.** Words or a phrase to search for in the rulings' text and summaries. |
| `match_mode` | enum | How to match: `exact_phrase`, `any_word`, `except_word` or `word_range`. Default `exact_phrase`. |
| `word_range` | integer | For `word_range`: how many words apart the terms may be (1-100). Default `1`. |
| `from_date` | string | Only rulings on or after this date (yyyy-mm-dd). |
| `to_date` | string | Only rulings on or before this date (yyyy-mm-dd). |
| `page` | integer | 1-based page number. Default `1`. |
| `per_page` | integer | Results per page (1-50). Default `20`. |

```bash theme={"dark"}
curl https://api.croma.run/mx/cjf-sentencias/search/v1 \
  -H "Authorization: Bearer $CROMA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "query": "amparo" }'
```

Returns `query`, `match_mode`, the applied date bounds, `results`, and `pagination` (`total`, `page`, `page_size`, `total_pages`).

| Field | Notes |
| - | - |
| `neun` | The ruling's id. Pass it to `cjf-sentencia` for the full record. |
| `case_number` | Expediente number. |
| `court`, `court_type`, `circuit`, `specialty` | The issuing court and where it sits. |
| `subject_matter`, `case_type` | Materia and tipo de asunto. |
| `ruling_date` | The ruling date as published (kept verbatim). |
| `topic`, `summary` | Tema and síntesis of the ruling. |
| `has_document` | Whether a public-version document is on file. |

## Ruling detail

`POST /mx/cjf-sentencias/sentencia/v1` [Live](https://docs.usecroma.com/live-lookups.md)

| Field | Type | Notes |
| - | - | - |
| `neun` | string | **Required.** The `neun` from the search above. |

```bash theme={"dark"}
curl https://api.croma.run/mx/cjf-sentencias/sentencia/v1 \
  -H "Authorization: Bearer $CROMA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "neun": "11675036" }'
```

Returns `found`, `neun`, and `sentencia` (null when the NEUN is unknown).

| Field | Notes |
| - | - |
| `case_number` | Expediente number. |
| `internal_number` | Número OCC, the court's internal control number. |
| `court`, `case_type` | Issuing court and tipo de asunto. |
| `sections` | The ruling record section by section; each section is a list of label/value rows as the source presents them. |

> [!NOTE]
>
> These are public-version rulings (versiones públicas) of Mexico's federal
> courts: personal data is redacted by the publisher before release.

> [!NOTE]
>
> These lookups can take longer than a typical request. They are
> [async jobs](https://docs.usecroma.com/async-jobs.md). By default the request waits inline and returns
> `{ data }`, or you can poll / use a `callback_url`.

> [card] [Full reference](https://docs.usecroma.com/api-reference/overview.md)
>
> Schemas, all response fields, and an interactive playground.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.