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

ParameterTypeRequiredDescription
codestringyesFrench text identifier, for example code-civil
articlestringyesArticle number within that text, for example 1240
datestringnoUTC 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, commonly legifrance-legi.
  • freshness.kind: snapshot; as_of is 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

FieldTypeDescription
codestringEcho of the requested French text identifier
articlestringEcho of the requested article number
datestringEffective resolution date in YYYY-MM-DD form
labelstringHuman label for the resolved article
etatstringLEGI status carried as stored, never reinterpreted by the service
textstringConsolidated text of the selected version
versionobjectValidity period and source version identifier
coverageobjectCompleteness 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

FieldTypeDescription
version_idstringStable identifier of the selected source version
date_debutstringStart date of this version, inclusive, in YYYY-MM-DD
date_finstring | nullEnd date of this version, exclusive; omitted when current

coverage

FieldTypeDescription
completebooltrue when the store served an unambiguous version
reasonstringPresent 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.

StatuscodeCase
400INVALID_REFcode or article is missing, empty or malformed
400INVALID_DATEdate is present but not formatted as YYYY-MM-DD
404UNKNOWN_ARTICLEThe reference is well formed but no matching article exists in the store
404NO_VERSION_AT_DATEThe article exists, but no version covers the requested date
500INTERNALInternal 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 /catalog and how settlement works.