---
title: "Corte Suprema de Justicia de El Salvador Laws Search"
method: POST
path: "/sv/csj-sv/laws-search/v1"
tags: ["El Salvador", "Corte Suprema de Justicia de El Salvador"]
---

# Corte Suprema de Justicia de El Salvador Laws Search

`POST /sv/csj-sv/laws-search/v1`

## Request

- Base URL: `https://api.croma.run`
- URL: `https://api.croma.run/sv/csj-sv/laws-search/v1`
- Auth: HTTP bearer

Search El Salvador's legislation as the Corte Suprema de Justicia's documentation center keeps it: more than 10,000 legal texts published in the Diario Oficial since 1821, from the codes and laws to executive decrees, regulations, agreements and municipal ordinances. Free text matches the name, the documentation center's summary and the consolidated text. Filter by `type`, `status` (`vigente`, `caducada`, `derogada`), `subject`, `number`, `municipality`, `department`, `year` and the publication date (`from_date`/`to_date`). Each result carries Croma's copy of the original document and links to the record and the document on the court's own site. Served by Croma (`as_of` says how current the data is).

**Dataset endpoint**: answers from the whole source in milliseconds and carries `as_of`.

## Headers

- `Idempotency-Key` string

## Request body

- object
  - `query` string: Optional search terms matched against the act's name, the documentation center's summary and the full text.
  - `type` string: Optional kind of document as `type` names it: `Decretos Legislativos`, `Decretos Ejecutivos`, `Decretos Institucionales`, `Acuerdos`, `Reglamentos`, `Ordenanzas Municipales` or `Documentos Generales`, matched from the start. Case and accents are ignored.
  - `status` '' | 'vigente' | 'caducada' | 'derogada': Optional status: `vigente` (in force), `caducada` (expired) or `derogada` (repealed).
  - `subject` string: Optional area of law as `subject` names it, e.g. `Penal`, `Tributaria`, `Laboral`, matched from the start. Case and accents are ignored.
  - `number` string: Optional decree or agreement number, e.g. `1030`. Case, spaces and punctuation are ignored.
  - `municipality` string: Optional municipality of an ordinance, e.g. `San Salvador Centro`, matched from the start. Case and accents are ignored.
  - `department` string: Optional department of an ordinance, e.g. `La Libertad`, matched from the start. Case and accents are ignored.
  - `year` integer: Optional year of publication in the Diario Oficial. 0 searches every year.
  - `from_date` string, date: Optional date filter in yyyy-mm-dd format.
  - `to_date` string, date: Optional date filter in yyyy-mm-dd format.
  - `page` integer: 1-based page number for paginated results.
  - `per_page` integer: Results per page (1-50).

## Response `200`

Successful response

- CsjSvLawsSearchResponse
  - `data` CsjSvLawsSearchData, required
    - `as_of` string, nullable, required: How current the data in this response is.
    - `query` string, required
    - `type` string, nullable, required
    - `status` string, nullable, required
    - `subject` string, nullable, required
    - `number` string, nullable, required
    - `municipality` string, nullable, required
    - `department` string, nullable, required
    - `year` number, nullable, required
    - `from_date` string, nullable, required
    - `to_date` string, nullable, required
    - `total` number, required: Matches, counted up to 1000.
    - `total_is_exact` boolean, required: False when more than 1000 match: `total` is then 1000, and the pages go on.
    - `page` number, required
    - `per_page` number, required
    - `total_pages` number, required: Pages over `total`; there are more when `total_is_exact` is false.
    - `count` number, required
    - `results` object[], required
      - `id` string, required: The document's permanent number at the Corte Suprema's documentation center, e.g. "558819" (the Código Penal).
      - `title` string, required: The document's name, e.g. "CODIGO PENAL".
      - `type` string, nullable, required: The kind of document: "Decretos Legislativos", "Decretos Ejecutivos", "Decretos Institucionales", "Acuerdos", "Reglamentos", "Ordenanzas Municipales" or "Documentos Generales".
      - `nature` string, nullable, required: The legal nature of the act, e.g. "Decreto Legislativo", "Decreto Municipal", "Acuerdo Ejecutivo".
      - `number` string, nullable, required: The decree or agreement number, e.g. "1030".
      - `status` 'vigente' | 'caducada' | 'derogada', nullable, required: Whether the document is in force: `vigente`, `caducada` (expired) or `derogada` (repealed), as the documentation center records it.
      - `subject` string, nullable, required: The area of law, e.g. "Penal", "Tributaria", "Administrativa".
      - `issuing_body` string, nullable, required: Who issued it, e.g. "ORGANO LEGISLATIVO", "ORGANO EJECUTIVO (Ministerio de Salud)".
      - `state_organ` string, nullable, required: The branch of the state, when recorded: "Legislativo", "Ejecutivo", "Judicial" or "Instituciones autónomas".
      - `municipality` string, nullable, required: The municipality of an ordinance.
      - `department` string, nullable, required: The department of an ordinance.
      - `issue_date` string, nullable, required: `yyyy-mm-dd` the act was issued.
      - `publication_date` string, required: `yyyy-mm-dd` the act was published in the Diario Oficial.
      - `year` number, required: The year of publication in the Diario Oficial.
      - `gazette_number` string, nullable, required: The number of the Diario Oficial that published it.
      - `gazette_volume` string, nullable, required: The volume (tomo) of the Diario Oficial that published it.
      - `considerations` string, nullable, required: The documentation center's summary of what the act is for.
      - `reform_count` number, required: How many amendments the documentation center records.
      - `related_rulings` string[], required: The `id`s of rulings of the Corte Suprema de Justicia de El Salvador the documentation center relates to this act (read them with the ruling endpoint).
      - `other_fields` object[], required: Any other field of the court's record for this act, by its label.
        - `label` string, required: The field's name as the court's record prints it.
        - `value` string, required
      - `text_status` 'ok' | 'scanned' | 'missing', required: `ok` when the full text is here; `scanned` when the document is an image with no text in it; `missing` when the court publishes no readable document.
      - `official_url` string, required: The act's record at the Corte Suprema's documentation center.
      - `document_url` string, nullable, required: Croma's copy of the current version of the act's document (PDF), byte for byte as the court published it. Null when the court publishes none.
      - `source_document_url` string, nullable, required: The act's document on the Corte Suprema's own site, which the court rewrites when it incorporates an amendment.
      - `document_modified_at` string, nullable, required: When the court last changed the current version of the document.

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