
API integration for Légifrance
We build your Légifrance connector
We wire Légifrance (DILA API via PISTE) into your regulated business software: the consolidated article up to date, not a frozen 2019 PDF.
- Senior product team
- public-data connectors in production
- from scoping to monitoring
What does the Légifrance API provide and which tools should integrate it?
The Légifrance API gives real-time access to French official texts: codes, laws, regulations, decrees and case law. It enables searching, reading and receiving updates. You integrate it into regulatory monitoring tools that automatically alert users when a text applicable to their sector is amended, into legal software that references current articles of law, or into applications that must display the legal text applicable to a given situation. It is the only official and up-to-date source for automating regulatory compliance.
What our clients build on the Légifrance API
A code article in payroll software
Minimum wage, hours, DPAE: the consolidated text on day D, with NOR / CID and a Légifrance link, not a 2019 PDF.
Targeted JORF watch
Business keywords for a compliance tool. The API searches; it does not « answer » a social question like an LLM.
Collective agreement (KALI fund)
Resolution in an HRIS, on top of the Sirene / Annuaire idcc. A stable identifier, not a title typed by hand.
LEGI dump plus API on click
Internal full-text index at night, up-to-date piece via the API when the user opens the article. Both modes, not one or the other.
What it changes in your rules engine
Engineering in service of a measurable outcome: the official text up to date, a cache that holds, not a sandbox taken for prod.
Free is not unlimited
Quotas live in PISTE and can change. Open data therefore unlimited is false: we size the cache in scoping.
Sandbox is not production
No availability commitment on the sandbox. We do not accept a customer on it; PISTE prod has its own rules.
Stable legal identifiers
Without NOR / CID, you store a title and lose consolidation. The official text stays attachable over time.
This is not an LLM
The API returns texts. A product that mixes Légifrance and AI separates citation (API, link) from paraphrase (model).
How we ship your Légifrance connector
Scoping
Useful funds (LEGI, JORF, KALI, case law), dumps vs API, cockpit quotas. We attach the API to the PISTE application before writing a line.
Development
Sandbox app + prod app, OAuth secrets, article cache invalidated on JORF / CID date, a limiter calibrated on the cockpit.
Acceptance testing
Replay on your business articles, sandbox vs prod, circuit breaker when PISTE is under 95%: the text stays in the local cache.
Monitoring
401 / 429 alerts, token expiry, freshness of the millésime shown. You see a stale text before the business lawyer does.
What the Légifrance API allows
- Search across funds
- Codes, JORF, KALI agreements, case law. Filters and sorts documented by DILA (updated 05/08/2024).
- Consulting a text
- The consolidated article, identified, dated. That is the piece the business software shows, with the public link.
- Suggestions
- Help typing an identifier or a title. Useful for an internal citation assistant, not for a chatbot with no source.
- Open-data files
- LEGI datasets on data.gouv, daily update at the last check. An internal index can feed on them; the API remains the up-to-date piece on click.
The vocabulary of the Légifrance API
- PISTE
- AIFE multi-API platform. Sign-up at piste.gouv.fr. An account does not give Légifrance until the API is attached to the application (same logic as France Travail).
- NOR
- Official number of a text. A publication identifier, not a title. Without it, JORF watch is lost in homonyms.
- CID / LEGI
- Consolidation identifiers. We store them with the consultation millésime. Showing « consolidated text as of …, source Légifrance » is not a graphic option.
- KALI
- Collective-agreements fund. Useful in an HRIS, on top of the Sirene idcc. This is not the whole labour code.
- 95% / day
- PISTE production SLA, best-efforts. This is not a cloud SLA. Circuit breaker and local cache: the business software stays readable if PISTE coughs.
- Terms 15/12/2022
- Légifrance API terms, plus Licence ouverte 2.0, plus PISTE terms. Quotas can change, notice by email. We do not promise unlimited.
The real constraints of the Légifrance API
Quotas live in PISTE, not on data.gouv
Second / minute / day, per application or per method. Any promise of « unlimited, it is open data » is false. We read the cockpit and calibrate the limiter.
The sandbox has no SLA
Sandbox timeouts during a DILA reindex do not predict prod, and the reverse. Load-testing in the sandbox is discouraged by the terms.
Without NOR / CID, you lose consolidation
Storing an article title is storing a string that will move. The DILA glossary (LEGI, NOR, CID) is part of scoping, not a documentation bonus.
The API does not answer a question
It returns texts. An AI assistant must cite (API, Légifrance link) and rephrase separately. Sending the corpus into training is reread in the terms, at scoping.
Légifrance API or LEGI open-data files?
Two DILA modes. The right product combines them: dump for the index, API for the up-to-date piece.
| Criterion | PISTE APIUp-to-date piece | LEGI dumpsInternal index |
|---|---|---|
| Access | PISTE account, OAuth | data.gouv files, no key |
| Freshness on click | Current consolidated text | Dump millésime (often daily) |
| SLA | 95% / day in prod, 0% sandbox | A file, no API to monitor |
| Quotas | PISTE cockpit | Download, no req/s |
| Internal full-text search | Possible, under quotas | The right tool |
| Citation in the UI | The right tool | Risk of a late millésime |
| The right case | Article shown to the user | Nightly index, internal search |
We almost always combine them. Free reuse: order of 24 June 2014. Licence ouverte attribution and a link to the public Légifrance page.
What we measure on a Légifrance integration
The other public APIs
The bricks we most often wire up alongside an official text.
LegifranceWe build your Légifrance connectorThis page
API AdresseGeocode an establishment targeted by a local rule, unrelated to the NOR.
Météo FranceWarnings, another portal, another secret. Not a Légifrance fund.
URSSAFDPAE or open data, often the business that cites the payroll article, not the text API.
SNCF & transportWe build your SNCF connector
API ParticulierWe build your API Particulier connector
France TravailWe build your France Travail connector
DVF & cadastreWe build your DVF and cadastre connector
API GéoWe build your API Géo connectorWe combine Légifrance with
The stack around official text on our projects.
Légifrance integration: your questions
PISTE sign-up, sandbox application and prod application, attach the Légifrance API, OAuth2 client_credentials, secrets in a vault. Copy paths from the application's Swagger, not from a tutorial older than 2023. Aggressive cache of consolidated articles, invalidated on JORF / CID date. A limiter calibrated on cockpit quotas. Store NOR/CID + millésime, show the source. Circuit breaker: if PISTE coughs, the last cached text stays readable.
Free after sign-up, since the order of 24 June 2014, Licence ouverte 2.0. Unlimited: no. Second / minute / day quotas are read in PISTE and can change. « Open-data API so unlimited » is the sentence this page exists to calm. We read the cockpit at scoping and calibrate the limiter on it. We read cockpit quotas at scoping, copy them into the limiter, and plan for them to move. A limiter calibrated on the cockpit is part of the first delivery.
For development, yes. For a load UAT or a client SLA, no. The terms: 95% per day in production, no commitment on the sandbox, which DILA uses for its own perf tests and reindexes. A sandbox timeout says nothing about prod, and the reverse. Client UAT happens on PISTE production, with the local cache already in place, not on an environment DILA uses to reindex. We say so before the first sprint, not after a failed load test.
The API does not answer a question: it searches and consults texts. A product that mixes the two separates citation (API, identifier, Légifrance link) and rephrasing (model). Without that split, you display an invention with an official look. We settle it at scoping, including a reread of the terms before any training on the corpus. Licence ouverte attribution and a link to the public Légifrance page: the citation stays opposable, the rephrasing stays a model.
Access is free. The cost is the connector: PISTE, cache, identifiers, limiter, optionally a nightly LEGI dump. Showing a code article in payroll software is a short job. A multi-fund compliance assistant, plus an internal index, is a project. We scope the funds and give a firm estimate before we start. Having a PISTE account does not give Légifrance until the API is attached to the application: that sits in the scoping milestone.
A Légifrance integration project?
Let's talk. 30 minutes to scope the useful funds, read the PISTE quotas, and tell you frankly what is feasible.
Discuss my Légifrance project