api

Api List Laws

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.

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

Path parameters

countrystring required

Query parameters

pageinteger
per_pageinteger
law_typestring nullable

Filter by law type. Comma-separated for multiple: ley,constitucion

yearinteger nullable

Filter by publication year (4 digits)

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

jurisdictionstring nullable

Filter by jurisdiction code, or 'national' for the laws that carry no jurisdiction at all (the national corpus).

qstring nullable

Full-text search query

sortstring nullable

Sort order: date_desc (default), date_asc, title

from_datestring nullable

Filter from date (YYYY-MM-DD inclusive)

to_datestring nullable

Filter to date (YYYY-MM-DD inclusive)

text_statestring 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

Successful Response

countrystring required
totalinteger required
pageinteger required
per_pageinteger required
jurisdictionstring nullable
querystring nullable
countinteger nullable
sortstring nullable
from_datestring nullable
to_datestring nullable

Changes

No recorded changes to this operation across all 1 revision of this API.