---
title: "Api List Laws"
method: GET
path: "/api/v1/{country}/laws"
tags: ["api"]
---

# Api List Laws

`GET /api/v1/{country}/laws`

## Request

- Base URL: `https://legalize.dev` (the document declares no server; this is the origin it was published from)
- URL: `https://legalize.dev/api/v1/{country}/laws`
- Auth: API key in header `Authorization`

Search and list laws for a country.

Without `q`: returns a paginated list of all laws, sorted by date (newest first).
With `q`: full-text search with relevance ranking.

All filters (law_type, year, status, jurisdiction, from_date, to_date, text_state)
apply in both listing and search modes. Use `sort` to change order.

## Path parameters

- `country` string, required

## Query parameters

- `page` integer
- `per_page` integer
- `law_type` string, nullable: Filter by law type. Comma-separated for multiple: ley,constitucion
- `year` integer, nullable: Filter by publication year (4 digits)
- `status` string, nullable: Filter by status. The corpus writes `in_force` and `repealed`; the documented `vigente` and `derogada` are accepted as aliases of those two, which is what they had always claimed to be and were not.
- `jurisdiction` string, nullable: Filter by jurisdiction code, or 'national' for the laws that carry no jurisdiction at all (the national corpus).
- `q` string, nullable: Full-text search query
- `sort` string, nullable: Sort order: date_desc (default), date_asc, title
- `from_date` string, nullable: Filter from date (YYYY-MM-DD inclusive)
- `to_date` string, nullable: Filter to date (YYYY-MM-DD inclusive)
- `text_state` string, nullable: Filter by what the body of the text is: point_in_time (the law as in force on its date), current (the latest text the source publishes), as_enacted (the act as published, amendments not incorporated). Omit for all states.

## Response `200`

Successful Response

- PaginatedLaws: Unified response for law listing and search. When searching (query is not None), both ``total`` and ``count`` are populated with the same value for backward compatibility. When listing, ``query`` and ``count`` are None.
  - `country` string, required
  - `total` integer, required
  - `page` integer, required
  - `per_page` integer, required
  - `jurisdiction` string, nullable
  - `query` string, nullable
  - `count` integer, nullable
  - `sort` string, nullable
  - `from_date` string, nullable
  - `to_date` string, nullable
  - `results` LawSearchResult[], required
    - `id` string, required
    - `title` string, required
    - `short_title` string, nullable
    - `country` string, required
    - `law_type` string, required
    - `publication_date` string, nullable
    - `status` string, nullable
    - `jurisdiction` string, nullable
    - `article_count` integer, nullable
    - `text_state` string
    - `reform_count` integer, nullable
    - `text_superseded` boolean, nullable
    - `title_snippet` string, nullable
    - `match_basis` 'identifier' | 'text', nullable
    - `content_availability` 'unchecked'
    - `articles_indexed` boolean, nullable, required: Metadata counts do not establish an index in the currently served body.

## Other responses

- `401`: Missing, malformed, or invalid API key
- `422`: Validation Error
- `429`: Monthly quota exceeded. Includes Retry-After header.

---

[API](https://skmtc.dev/legalize/apis/legalize-api.md) · [All operations](https://skmtc.dev/legalize/apis/legalize-api/llms.txt) · [OpenAPI document](https://skmtc.dev/legalize/apis/legalize-api/revisions/305b67a14660?raw)
