Leyes MX: Mexican federal law at any date
v1.0.0Mexican federal law at any date: articles, reform history, diffs and search over leyes-mx.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
list_laws List Laws
List the federal laws available: abbreviation, name, last reform (DOF), number of articles, number of versions in git and the date of the oldest archived version.
get_article Get Article
Exact text of one article as it stood on a date, with the DOF date and commit of the version, the decree(s) that version reflects, since when the article has this wording, and a link to the exact lines on GitHub at that commit.
| Parameter | Type | Description |
|---|---|---|
article * | string | Article number as written in the law: '27', '1o', '3o. Bis', '15-A', '353-Ñ', '29-A Bis', '21 bis 1'. Extra words such as 'fracción IV' are ignored. |
law * | string | Law abbreviation or slug, e.g. 'LFT', 'CPEUM', 'lgsm'. See list_laws. |
date | string | Date the text should reflect (YYYY-MM-DD, DD-MM-YYYY or 'hoy'). Returns the latest version published in the DOF on or before that day. |
article_history Article History
Every change to one article across the archived versions: when it was added, modified, repealed or removed, with the DOF date, commit and decree of each change. In versions that group several reforms, the Cámara's editorial note tells which decree touched it.
| Parameter | Type | Description |
|---|---|---|
article * | string | Article number as written in the law: '27', '1o', '3o. Bis', '15-A', '353-Ñ', '29-A Bis', '21 bis 1'. Extra words such as 'fracción IV' are ignored. |
law * | string | Law abbreviation or slug, e.g. 'LFT', 'CPEUM', 'lgsm'. See list_laws. |
diff_article Diff Article
What changed in one article between two dates, as a word-level or unified diff, plus the versions in between that touched it.
| Parameter | Type | Description |
|---|---|---|
article * | string | Article number as written in the law: '27', '1o', '3o. Bis', '15-A', '353-Ñ', '29-A Bis', '21 bis 1'. Extra words such as 'fracción IV' are ignored. |
date_from * | string | Earlier date (YYYY-MM-DD). |
law * | string | Law abbreviation or slug, e.g. 'LFT', 'CPEUM', 'lgsm'. See list_laws. |
date_to | string | Later date (YYYY-MM-DD or 'hoy'). |
mode | string | 'words': changed paragraphs with [-removed-] {+added+} marks; 'unified': classic unified diff by paragraph. |
diff_reform Diff Reform
What a reform changed in a law: every article modified, added or removed between the version before and the version that carries the reform, new transitorios and headings, and the diffs. When the archive groups several reforms in one version, articles whose editorial note cites this reform date are listed first.
| Parameter | Type | Description |
|---|---|---|
law * | string | Law abbreviation or slug, e.g. 'LFT', 'CPEUM', 'lgsm'. See list_laws. |
reform_date * | string | DOF publication date of the reform decree (YYYY-MM-DD). |
limit | integer | Maximum number of article diffs to return. |
mode | string | 'words' or 'unified'. |
offset | integer | Skip this many changed articles. |
search Search
Full-text search over the articles of every law (or one law) as they stood on a date, ranked by number of hits, with a snippet and a link to each article.
| Parameter | Type | Description |
|---|---|---|
query * | string | Words to find (accent and case insensitive, each word is a prefix, all must appear in the same article). Use "quotes" for phrases and -word to exclude. Example: 'subcontrat "servicios especializados"'… |
date | string | Search the texts as they stood on this date (default: today). |
include_transitorios | boolean | Also search the transitorios of the original text and decrees. |
law | Restrict to one law (abbreviation or slug). | |
limit | integer | Maximum results. |
reforms Reforms
Reform timeline of a law from the LeyesBiblio data in leyes-mx: number, DOF date, title and PDF of each decree, and which version in git carries it (own version, grouped with others, older than the archive, or not consolidated yet).
| Parameter | Type | Description |
|---|---|---|
law * | string | Law abbreviation or slug, e.g. 'LFT', 'CPEUM', 'lgsm'. See list_laws. |
limit | integer | Maximum decrees (newest first). |
since | Only decrees published on or after this date. |
transitorios Transitorios
Transitory articles (entry into force, deadlines, repeals) of the original text of a law or of one reform decree, as kept at the end of the consolidated text.
| Parameter | Type | Description |
|---|---|---|
law * | string | Law abbreviation or slug, e.g. 'LFT', 'CPEUM', 'lgsm'. See list_laws. |
date | string | Read them from the version applicable on this date. |
decree_date | DOF date of the reform decree whose transitorios you want. Omit it for the transitorios of the original text. | |
max_chars | integer | Maximum characters of text. |