GET /legal/article
Returns the consolidated version of a French legal article in force at a given date: article text, LEGI status, validity dates and coverage metadata. The lookup is served from a local store built from the official LEGI dataset, so a covered reference resolves in milliseconds without an account or API key. The corpus currently covers a selected set of French codes and statutes and is expanding; an uncovered reference returns 404, never a paid empty answer.
Use it when an agent needs a grounded answer to questions such as “what was the
text of Article 1240 of the Civil Code on this date?” or “is this article
repealed?” See the live /catalog for the authoritative
endpoint listing and price.
x402 golden rule: the agent pays for the answer to its question. A known
article with a version covering the requested date is a successful answer ->
200, including when etat: "abroge". Repealed is data, not an error.
Requests the service cannot answer - malformed references, invalid dates,
unknown articles or dates outside all known versions - leave the 200 range.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
code | string | yes | French text identifier, for example code-civil |
article | string | yes | Article number within that text, for example 1240 |
date | string | no | UTC date to resolve, format YYYY-MM-DD; defaults to today’s date |
GET /legal/article?code=code-civil&article=1240&date=2026-01-01
Omit date when the agent wants the version in force today:
GET /legal/article?code=code-civil&article=1240
200 response - UnifiedResponse
{
"data": { ... },
"provenance": {
"source": "legifrance-legi",
"fetched_at": "2026-06-20T12:00:00Z",
"freshness": { "kind": "snapshot", "as_of": "2026-06-01T00:00:00Z" }
}
}
provenance.source: source identifier from the served LEGI store, commonlylegifrance-legi.freshness.kind:snapshot;as_ofis the store dump date that backed the answer.- French law data is derived from LEGI, published by DILA under the Licence Ouverte / Etalab open licence.
Fields of data
| Field | Type | Description |
|---|---|---|
code | string | Echo of the requested French text identifier |
article | string | Echo of the requested article number |
date | string | Effective resolution date in YYYY-MM-DD form |
label | string | Human label for the resolved article |
etat | string | LEGI status carried as stored, never reinterpreted by the service |
text | string | Consolidated text of the selected version |
version | object | Validity period and source version identifier |
coverage | object | Completeness marker for the served legal version |
Possible etat values follow the LEGI store and may include vigueur,
abroge, abroge_diff, vigueur_diff, modifie and perime.
version
| Field | Type | Description |
|---|---|---|
version_id | string | Stable identifier of the selected source version |
date_debut | string | Start date of this version, inclusive, in YYYY-MM-DD |
date_fin | string | null | End date of this version, exclusive; omitted when current |
coverage
| Field | Type | Description |
|---|---|---|
complete | bool | true when the store served an unambiguous version |
reason | string | Present when complete: false, naming the source dump anomaly |
Example - article in force
{
"data": {
"code": "code-civil",
"article": "1240",
"date": "2026-01-01",
"label": "Code civil, art. 1240",
"etat": "vigueur",
"text": "Tout fait quelconque de l'homme, qui cause a autrui un dommage, oblige celui par la faute duquel il est arrive a le reparer.",
"version": {
"version_id": "v-courant",
"date_debut": "2016-10-01"
},
"coverage": { "complete": true }
},
"provenance": {
"source": "legifrance-legi",
"fetched_at": "2026-06-20T12:00:00Z",
"freshness": { "kind": "snapshot", "as_of": "2026-06-01T00:00:00Z" }
}
}
Example - repealed article is still a 200
When the requested reference and date are covered, an abrogated article is a
successful answer. The status lives in data.etat; it is not converted into an
HTTP error.
{
"data": {
"code": "code-test",
"article": "abroge",
"date": "2026-01-01",
"label": "Code test, art. abroge",
"etat": "abroge",
"text": "texte abroge toujours servi",
"version": {
"version_id": "v-ab",
"date_debut": "2018-01-01"
},
"coverage": { "complete": true }
},
"provenance": {
"source": "legifrance-legi",
"fetched_at": "2026-06-20T12:00:00Z",
"freshness": { "kind": "snapshot", "as_of": "2026-06-01T00:00:00Z" }
}
}
Coverage honesty
The service answers from a local snapshot of the LEGI corpus. It does not fetch
Legifrance at request time, search by keyword, infer missing articles or
reinterpret LEGI statuses. etat is carried from the source store as legal
metadata; callers should treat it as the authoritative status for the selected
version.
coverage.complete: false is reserved for source-store anomalies, such as
overlapping versions where the service selected the most recent start date.
Unknown articles and dates not covered by any known version are not partial paid
answers: they return 4xx errors.
Errors
Only requests the service cannot answer leave the 200 range.
| Status | code | Case |
|---|---|---|
| 400 | INVALID_REF | code or article is missing, empty or malformed |
| 400 | INVALID_DATE | date is present but not formatted as YYYY-MM-DD |
| 404 | UNKNOWN_ARTICLE | The reference is well formed but no matching article exists in the store |
| 404 | NO_VERSION_AT_DATE | The article exists, but no version covers the requested date |
| 500 | INTERNAL | Internal error (detail logged, not exposed) |
{ "error": "query parameter `code` is required (text identifier, e.g. `code-civil`)", "code": "INVALID_REF" }
{ "error": "invalid `date` `01/01/2026`; expected ISO calendar format YYYY-MM-DD", "code": "INVALID_DATE" }
{ "error": "no article `9999` found for text `code-civil` in the store", "code": "UNKNOWN_ARTICLE" }
{ "error": "Code test, art. disparu has no version in force on 2026-01-01", "code": "NO_VERSION_AT_DATE" }
Attribution
French legislation and regulation data is derived from the LEGI dataset made available by the Direction de l’information legale et administrative (DILA) on Legifrance, under the Licence Ouverte / Etalab open licence.
See also
GET /legal/eu-act- consolidated European Union act text at a date.- For agents - discovery surfaces, the live
/catalogand how settlement works.