omnilex / judilibre
Omnilex Judilibre: the decisions of the Cour de cassation and of the judicial courts from the Judilibre API (PISTE) - search with filters, one decision with its zones, the texts it applies and the case law it is brought together with, what changed since a date; pseudonymised, never re-identified.
Requires
- php: >=8.2
- omnisense/omnilex: ^1.0@dev
- symfony/http-client: ^6.4|^7.0|^8.0
Requires (Dev)
- phpunit/phpunit: ^11.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-10-26 10:05:30 UTC
README
Judilibre for omnisense/omnilex: the decisions of the Cour de cassation and of the judicial courts, published as open data by the Cour de cassation through PISTE - a full-text search with filters, one decision whole, the texts it applies and the case law it is brought together with, what changed since a date.
$judilibre = (new JudilibreSourceFactory($http))->create(['client_id' => '...', 'client_secret' => '...']); $results = $judilibre->search(new Query(text: 'expropriation', jurisdictions: ['cc'], types: ['arret'], from: '2018-01-01')); $decision = $judilibre->decision($results->items[0]->id); $decision->ecli(); // ECLI:FR:CCASS:2018:C301117 $decision->number; // 17-18.194 $decision->content; // the full text, pseudonymised $decision->citations; // texts applied, decision contested, case law brought together $judilibre->search(new Query(number: '17-18.194')); // by numéro de pourvoi $judilibre->recent(new DateTimeImmutable('-7 days'), new Query(jurisdictions: ['cc']));
omnilex: sources: judilibre: { factory: judilibre, options: { client_id: '%env(PISTE_CLIENT_ID)%', client_secret: '%env(PISTE_CLIENT_SECRET)%' } }
Pseudonymised decisions: never re-identified
The decisions Judilibre publishes are pseudonymised by the Cour de cassation before
publication (the API describes a decision's text as "texte intégral et pseudonymisé"). This
package gives the text as published (Decision::$pseudonymised is true) and never
tries to re-identify a person: it does not cross a decision with another source to recover a
name, keeps no table of parties, and its models have nowhere to put one. An application built
on it must not either.
Two more rules follow from the API's own description:
- a decision flagged
to_be_deleted($decision->raw['to_be_deleted']), or listed as deleted bychanges(), "doit être supprimée des archives ou des bases de données du réutilisateur": an application that keeps copies must drop it; - the re-use is subject to the Cour de cassation's conditions for the re-use of the data of court decisions: read them before publishing anything built on these decisions.
Not verified against the real service
This package was written from the API's public OpenAPI description, without PISTE credentials:
no call was made to the real API. The tests run on the examples that description gives.
.samples/live.php of the workspace runs a real search and reads a real decision as soon as
PISTE_CLIENT_ID and PISTE_CLIENT_SECRET are set. See
what is not verified.
What you need to obtain
The API is free, behind PISTE, the State's API portal.
- Create an account: https://piste.gouv.fr/registration, and activate it.
- Accept the terms of use of the JUDILIBRE API ("API" > "Consentement CGU API"; search for "Judilibre"), for the sandbox and for production.
- In "Applications", open the application (a sandbox one,
APP_SANDBOX_..., is created with the account; create one for production) and tick the JUDILIBRE API in its list of APIs. - Copy the application's OAuth credentials (Client ID, Client Secret) - or its API
key, sent as the
KeyIdheader.
| Option | |
|---|---|
client_id, client_secret |
the application's OAuth credentials |
key_id |
or the application's API key, alone |
sandbox |
true with the sandbox application's credentials |
recent |
the date recent() reads: update (created or updated in the base, default) or creation |
resolve_references |
true: labels in place of keys in the answers (Cour de cassation for cc) |
throttle |
seconds between two calls (0.5) |
The data are under the Licence Ouverte 2.0;
their use is subject to the terms of PISTE, to the re-use conditions above, and to quotas per
application (a quota spent comes back as a RateLimitedException).
See docs/.
Responsibility
This package is an independent, unofficial client: it is not affiliated with, endorsed by or sponsored by the Cour de cassation (Judilibre) or the PISTE platform. It reaches their service on behalf of whoever runs it, and it does not redistribute their data beyond the short excerpts recorded as test fixtures. Its MIT licence covers this package's code only and grants no right to the service or to its data.
Whoever installs and runs this package is responsible for complying with the terms of PISTE and of the Judilibre API (piste.gouv.fr/cgu) and with the re-use conditions above, for obtaining whatever they require (an account, a key, a licence or subscription, an attribution or a citation, a rate limit to respect), and for any use made of what it returns. The authors publish it free of charge, make no commercial use of it, and accept no liability for how it is used (see LICENSE).
License: MIT since 2026-10-09; earlier versions remain published under LGPL-3.0-or-later.