CIIFragments Studio is CII-accredited: recover up to 20% of your software development spendLearn more

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
In short

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.

Use cases

What our clients build on the Légifrance API

01

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.

02

Targeted JORF watch

Business keywords for a compliance tool. The API searches; it does not « answer » a social question like an LLM.

03

Collective agreement (KALI fund)

Resolution in an HRIS, on top of the Sirene / Annuaire idcc. A stable identifier, not a title typed by hand.

04

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.

For you

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).

Method

How we ship your Légifrance connector

01

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.

02

Development

Sandbox app + prod app, OAuth secrets, article cache invalidated on JORF / CID date, a limiter calibrated on the cockpit.

03

Acceptance testing

Replay on your business articles, sandbox vs prod, circuit breaker when PISTE is under 95%: the text stays in the local cache.

04

Monitoring

401 / 429 alerts, token expiry, freshness of the millésime shown. You see a stale text before the business lawyer does.

The API

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.
Glossary

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.
Good to know

The real constraints of the Légifrance API

01

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.

02

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.

03

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.

04

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.

API or dumps

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.

CriterionPISTE APIUp-to-date pieceLEGI dumpsInternal index
AccessPISTE account, OAuthdata.gouv files, no key
Freshness on clickCurrent consolidated textDump millésime (often daily)
SLA95% / day in prod, 0% sandboxA file, no API to monitor
QuotasPISTE cockpitDownload, no req/s
Internal full-text searchPossible, under quotasThe right tool
Citation in the UIThe right toolRisk of a late millésime
The right caseArticle shown to the userNightly 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.

Our expertise

What we measure on a Légifrance integration

15 d
first consolidated article in production
95%
PISTE prod SLA, hence the local cache
2 apps
separate PISTE sandbox and production
4
senior developers on the project

We combine Légifrance with

The stack around official text on our projects.

  • PostgreSQL
  • Redis
  • Node.js
  • n8n
  • TypeScript
FAQ

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
Discuss my Légifrance project