Is this French law still in force? Ground the answer
An agent that reasons about French law needs the consolidated article text as it stood on a date, plus its in-force or repealed status — not a paraphrase from training data. One call returns both.
An agent that answers a question about French law cannot trust its own weights for
it. Statutes are amended and repealed constantly, and an LLM’s recollection of an
article is a paraphrase frozen at training time — wrong as soon as the text
changes, and silent about when it was true. To reason correctly the agent needs
the consolidated article text as it stood on a specific date plus its
LEGI status (in force, repealed, …). One paid call —
GET /legal/article — returns both, grounded in the
official corpus.
The problem: a remembered statute is a stale statute
Ask a model for “Article 1240 of the Civil Code” and it will produce text that looks right. But it cannot tell you which version it is reproducing, whether that version was in force on the date your case turns on, or whether the article has since been repealed. French consolidated law is bulky, versioned, dated reference data published as the LEGI dataset by DILA — exactly the kind of corpus that does not belong in a model’s parameters and must be looked up against a known snapshot.
The question is also inherently date-scoped: “is this in force?” only means something relative to a date. An endpoint that resolves the right version for a date turns a vague recollection into a citable fact.
The call: consolidated text and status, for a date
GET /legal/article takes a code (e.g. code-civil), an article (e.g.
1240), and an optional date (defaults to today). It returns the version in
force on that date:
| Field | What the agent learns |
|---|---|
text | Consolidated text of the version in force on the date |
etat | LEGI status, carried as stored (vigueur, abroge, …) |
date | The effective resolution date |
version | The selected version’s id and validity window (date_debut/date_fin) |
coverage | Whether the store served an unambiguous version |
GET /legal/article?code=code-civil&article=1240&date=2026-01-01
Omit date to get the version in force today. The version block is what makes
the answer auditable: date_debut (inclusive) and date_fin (exclusive, omitted
when current) bound exactly the window the returned text applies to.
Repealed is data, not an error
The honesty point that matters most for legal grounding: an abrogated article
is still a 200. If the reference and the date are covered, the service returns
the text and sets etat: "abroge" — it does not convert a repeal into a 404.
Per the x402 golden rule, the agent pays for the answer to its question. “This
article was repealed as of this date” is a successful answer. The status lives in
data.etat, never in the HTTP code. The 4xx range is reserved for questions the
service genuinely cannot answer:
INVALID_REF/INVALID_DATE— the reference or date is malformed.UNKNOWN_ARTICLE— the reference is well-formed but no such article exists.NO_VERSION_AT_DATE— the article exists, but no version covers that date.
An agent must therefore read etat, not just the HTTP status: a clean 200 can
still carry a repealed article that you must not cite as current law.
Coverage honesty: what it will not do
The endpoint answers from a local snapshot of the LEGI corpus
(freshness.kind: "snapshot", with as_of the dump date). It deliberately does
not fetch Legifrance at request time, search by keyword, infer missing
articles, or reinterpret a LEGI status. etat is carried verbatim as legal
metadata. coverage.complete: false is reserved for genuine source-store
anomalies (e.g. overlapping versions), not for guessing — unknown articles and
uncovered dates are 4xx, never a partial paid answer.
Where it sits in the x402 loop
Grounding is the lookup step before the agent commits to a legal statement. The loop:
- Discover the endpoint and call it; receive the
402. - Pay — sign the chosen rail and replay the request.
- Resolve — read
text,etat, and theversionwindow. - Branch — cite the text only when
etatis in force for the date; flag a repealed or not-yet-in-force version; onNO_VERSION_AT_DATE, tell the user no version applied on that date rather than inventing one.
Each paid call follows the same x402 pattern as every Invoket endpoint. The
Quickstart walks the whole discover → 402 → pay → replay
cycle with runnable snippets. Price and accepted rails are not pinned in this
article — they are served live by the
catalog; see the
endpoint reference for the current figure.
Related legal lookups
GET /legal/article answers “what did this article say, and was it in force, on
this date?” The neighbouring endpoints answer the time-travel questions around it:
GET /legal/history— when did this article last change, and what is its version timeline?GET /legal/diff— what changed in the text between two dates?GET /legal/eu-act— the same grounding for an EU act by CELEX/ELI.
For a set of references — a contract’s cited articles, a compliance checklist —
POST /legal/article/batch resolves many under
one x402 settlement instead of one per reference.
Used for what it is — a grounded, date-scoped lookup of consolidated French law —
GET /legal/article lets an agent quote a statute it can stand behind, with the
in-force status attached. For the full field reference and error codes, see the
GET /legal/article documentation; for how agents
discover and call Invoket endpoints, see For agents.
French legislation data is derived from the LEGI dataset published by DILA on Legifrance under the Licence Ouverte / Etalab open licence.