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

# Legalize

> Search Colombian legislation as structured data by free text and filters, and resolve any law's full record with its text as Markdown, from Legalize.

<Warning>
  This endpoint is deprecated since 2026-09-16 and stops answering on 2026-09-30. Use [its successor](/guides/colombia/funcion-publica), `POST /co/funcion-publica/norms-search/v1`, instead.
</Warning>

Colombian legislation as structured data, sourced from Legalize. Two lookups:
search laws by free text and filters, or resolve one law's full record (metadata
plus the law text as Markdown) by its identifier.

## Search

`POST /co/legalize/laws/v1`

| Field | Type | Notes |
| - | - | - |
| `query` | string | Optional. Free-text search over law titles and content. Omit to list all. |
| `law_type` | string | Optional. Filter by law type, e.g. `ley`, `decreto`. |
| `year` | string | Optional. Publication year (`yyyy`). |
| `status` | string | Optional. Filter by status, e.g. `in_force`. |
| `jurisdiction` | string | Optional. Filter by jurisdiction. |
| `page` | integer | Page number. Default `1`. |
| `per_page` | integer | Results per page (1-100). Default `50`. |

```bash theme={"dark"}
curl https://api.croma.run/co/legalize/laws/v1 \
  -H "Authorization: Bearer $CROMA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "query": "habeas data", "per_page": 20 }'
```

Returns `query`, `total` (laws matching the filters), `page`, `per_page`, `count`
(results on this page), and `results[]`. Drill into one with the by-id lookup
below.

### `results[]`

| Field | Notes |
| - | - |
| `id` | Law identifier. Pass to the by-id lookup. |
| `title` | Full title. |
| `short_title` | Short title, or `null`. |
| `law_type` | Type, e.g. `ley`, `decreto`. |
| `publication_date` | Publication date (`yyyy-mm-dd`). |
| `status` | Status, e.g. `in_force`. |
| `jurisdiction` | Jurisdiction, or `null`. |
| `article_count` | Number of articles, or `null`. |
| `title_snippet` | Matched-title excerpt when the query hit the title (may include `<mark>` highlight tags), or `null`. |

## By id

`POST /co/legalize/law/v1`

| Field | Type | Notes |
| - | - | - |
| `law_id` | string | **Required.** The law identifier returned by the search (`id`). Case-sensitive, e.g. `LEY-1266-2008`. |

```bash theme={"dark"}
curl https://api.croma.run/co/legalize/law/v1 \
  -H "Authorization: Bearer $CROMA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "law_id": "LEY-1266-2008" }'
```

Returns `found`, `law_id`, and `law`. `found` is `false` (with `law: null`) when
no law matches the identifier.

### `law`

| Field | Notes |
| - | - |
| `id`, `title`, `short_title` | Identifier and titles. |
| `law_type` | Type, e.g. `ley`, `decreto`. |
| `publication_date` | Publication date (`yyyy-mm-dd`). |
| `status` | Status, e.g. `in_force`. |
| `jurisdiction` | Jurisdiction, or `null`. |
| `article_count` | Number of articles, or `null`. |
| `department` | Department, or `null`. |
| `source` | Source attribution, or `null`. |
| `last_updated` | Last update, or `null`. |
| `content_md` | The full law text as Markdown. |

Dates are `yyyy-mm-dd`; unavailable values are `null`.

<Note>
  A law id that doesn't match is **not** a `404`; it's a normal `200` with
  `found: false`.
</Note>

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


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