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

# Asamblea Legislativa

> Search every decree in the register of El Salvador's Asamblea Legislativa: the laws, codes and regulations it passes and every other decree, from loan authorizations and elections of officials to budget items and honorary distinctions, with the full text of each; read any one in full.

The Asamblea Legislativa de El Salvador keeps a register of the decrees it issues: the laws, codes and regulations, and every other legislative decree, from loan authorizations, tax exemptions and budget items to elections of officials, ratified treaties and honorary distinctions. Its register holds about 5,700 decrees, most of them from 2009 on, and a growing share of older ones back to 1860. Each decree here comes with its number, its kind, the dates it was issued and published, the Diario Oficial issue and volume, the subject, subtopic and area of law the Asamblea files it under, the Asamblea's summary, its full text, the document as the Asamblea published it, and a link to its record on the Asamblea's site.

Search across all of them at once, by kind, subject, subtopic, area of law, number, year or date, or with free text that reaches into the body of every decree. A decree the Asamblea has just passed appears while it awaits publication in the Diario Oficial, flagged as `pending_publication`.

<Note>
  The whole source, organized and ready to query: every endpoint on this page answers in milliseconds. Every response carries `as_of`: how current the data is. [How datasets work](/datasets).
</Note>

## Search the decrees

`POST /sv/asamblea-sv/decrees-search/v1` <a className="dataset-pill" href="/datasets">Dataset</a>

One search over the full text of every decree in the register, filtered by kind, subject, subtopic, area of law, number, year or date of issue.

| Field         | Type    | Notes                                                                                                                                                                                |
| ------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `query`       | string  | Optional words matched against the title, the Asamblea's summary and the full text.                                                                                                  |
| `type`        | string  | Optional kind of act: `Decreto`, `Ley`, `Código` or `Reglamento`. Case and accents are ignored.                                                                                      |
| `subject`     | string  | Optional subject (materia), e.g. `Hacienda y Presupuesto`, `Asamblea Legislativa`, `Seguridad Pública`, matched from the start. Case and accents are ignored.                        |
| `subtopic`    | string  | Optional subtopic (sub-materia), e.g. `Autorizaciones para Préstamos`, `Exenciones (Franquicias)`, `Distinciones Honoríficas`, matched from the start. Case and accents are ignored. |
| `area_of_law` | string  | Optional area of law (rama del derecho), e.g. `Derecho Administrativo`, `Derecho Penal`, `Derecho Tributario o Fiscal`, matched from the start. Case and accents are ignored.        |
| `number`      | string  | Optional decree number, e.g. `632`. Numbers restart with each legislature, so combine it with `year` or dates.                                                                       |
| `year`        | integer | Optional year the decree was issued. 0 searches every year. Default `0`.                                                                                                             |
| `from_date`   | string  | Optional: only decrees issued on or after this date, `yyyy-mm-dd`.                                                                                                                   |
| `to_date`     | string  | Optional: only decrees issued 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/sv/asamblea-sv/decrees-search/v1 \
  -H "Authorization: Bearer $CROMA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
        "query": "préstamo",
        "subject": "Hacienda y Presupuesto",
        "year": 2026
      }'
```

Returns `as_of` (how current the data is), the applied filters, `total` (matches across every page), `page`, `per_page`, `total_pages`, `count` and `results[]`, most recently issued first. Every result carries `id` (the decree's permanent number in the Asamblea's register, e.g. `7000`), `number` (the decree number, e.g. `632`), `type` (`Decreto`, `Ley`, `Código` or `Reglamento`), `title`, `summary` (the Asamblea's summary), `subject`, `subtopic`, `area_of_law`, `issue_date`, `year`, `publication_date` (in the Diario Oficial), `gazette_number`, `gazette_volume`, `pending_publication`, `text_status` (`ok`, `scanned` or `missing`), `official_url` (the decree's record at the Asamblea), `document_url` (Croma's copy of the decree's document, byte for byte as the Asamblea published it, which stays available whatever happens to the Asamblea's link), `source_document_url` (the document on the Asamblea's own site) and `document_modified_at`.

<Note>
  Search results leave out the text; `query` still matches it, so a phrase from the body finds the decree. Read the text itself with the Asamblea Legislativa de El Salvador Decree endpoint.
</Note>

## One decree, in full

`POST /sv/asamblea-sv/decree/v1` <a className="dataset-pill" href="/datasets">Dataset</a>

| Field       | Type    | Notes                                                                                                      |
| ----------- | ------- | ---------------------------------------------------------------------------------------------------------- |
| `decree_id` | string  | **Required.** The decree's `id` from a search result, e.g. `7000`, or its `official_url`.                  |
| `offset`    | integer | First character of the text to return. Pass the previous response's `next_offset` to read on. Default `0`. |
| `limit`     | integer | How many characters of the text to return. Most decrees fit in one response. Default `200000`.             |

```bash theme={"dark"}
curl https://api.croma.run/sv/asamblea-sv/decree/v1 \
  -H "Authorization: Bearer $CROMA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "decree_id": "7000" }'
```

Returns `as_of`, `found`, `decree_id` and `decree`, which carries everything the search returns plus `content`: a window onto the decree's full text, with `text`, `offset`, `total_length`, `has_more` and `next_offset`. Every result carries `id` (the decree's permanent number in the Asamblea's register, e.g. `7000`), `number` (the decree number, e.g. `632`), `type` (`Decreto`, `Ley`, `Código` or `Reglamento`), `title`, `summary` (the Asamblea's summary), `subject`, `subtopic`, `area_of_law`, `issue_date`, `year`, `publication_date` (in the Diario Oficial), `gazette_number`, `gazette_volume`, `pending_publication`, `text_status` (`ok`, `scanned` or `missing`), `official_url` (the decree's record at the Asamblea), `document_url` (Croma's copy of the decree's document, byte for byte as the Asamblea published it, which stays available whatever happens to the Asamblea's link), `source_document_url` (the document on the Asamblea's own site) and `document_modified_at`.

<Note>
  A decree the Asamblea has just passed may still be `pending_publication`: `publication_date` is then the date the Diario Oficial has assigned, and the document and text follow once it is published.
</Note>

<Note>
  An `id` the Asamblea's register does not hold returns `found: false` with HTTP 200, not an error.
</Note>

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