# Legifrance Monitoring (`nlp_data_lni/legifrance-monitoring`) Actor

L'outil permet de réaliser une veille sur les derniers textes de lois publiés ou mis à jour par la république française. La recherche se fait à partir d'une base mise à jour quotidiennement, alimentée par les fichiers en libre accès diffusés par la direction de l'information légale et administrative

- **URL**: https://apify.com/nlp\_data\_lni/legifrance-monitoring.md
- **Developed by:** [LilaK](https://apify.com/nlp_data_lni) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.20 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Veille sur LegiFrance (Français)

[The documentation in English can be found here](#monitoring-legifrance-english)

### Description

Légifrance est la source officielle du gouvernement français pour la diffusion des textes législatifs, réglementaires et des décisions de justice. Cet outil permet de réaliser une veille sur les derniers textes de lois publiés ainsi que les mises à jour.
Il permet de rechercher dans les textes récemment publiés ou mis à jour, dans une fénêtre glissante de 30 jours.
La recherche est réalisée à partir d'une base mise à jour quotidiennement. Cette base est alimentée par les fichiers en accès libre (OpenData) diffusés par la direction de l'information légale et adminstrative (DILA) (https://www.dila.gouv.fr/services/repertoire-des-informations-publiques/les-donnees-juridiques).

La base inclut, pour le moment, les fonds documentaires suivants:\
➡️ Journal officiel: Textes publiés au Journal officiel de la République française (JORF)\
➡️ Jurisprudence administrative: Décisions des juridictions administratives (JADE)

L'outil permet de réaliser une recherche dans la base des 30 derniers jours, en utilisant des mots clés et/ou un ensemble de filtres (date et nom du fond documentaire).

L'outil interroge directement la base, sans passer par le scraping du site Légifrance qui pose beaucoup de difficultés d'accès, même en utilisant des proxys résidentiels. La recherche est ainsi rapide et efficace.

### Fonctionnalités

✅ Réaliser une recherche sur une base de documents composée de tous les textes de lois publiés ou mis à jour depuis 30 jours sur LégiFrance. La recherche est réalisée à partir d'une requête et/ou filtres (fond interrogé, période de temps).\
✅ Plusieurs fonds documentaires supportés (JORF, JADE)\
✅ Possibilité d'utiliser des requêtes complexes pouvant inclure des opérateurs booléens\
✅ Possibilité de pagination des résultats\
✅ Possibilité de renvoyer des extraits du texte incluant les mots clés de la requête\
✅ Les résultats sont fournis au format JSON. Ils incluent entre autres: titre, description, lien direct du documlent sur Légifrance, etc.

### Usage

Cet outil est destiné à faciliter la mise en place d'une veille automatique sur les textes juridiques. Par exemple, interroger régulièrement la base LégiFrance sur une période glissante de temps sur des thématiques relatives à notre domaine d'activité.

### Entrée

☑️  Une requête composée de mots clés de recherche qui doivent figurer dans les documents retournés. La requête peut inclure les opérateurs booléens suivants: **+** pour l'opérateur AND, **|** pour l'opérateur OR, **-** pour l'opérateur NOT, des guillemets **"** pour la correspondance exacte, l'opérateur générique **\*** et l'opérateur de proximité **~**\
☑️  Sélection du fond LégiFrance à interroger\
☑️  Une période de temps sous forme de *Date Depuis*, *Date Jusqu'à* ou *X days*. Ce filtre correspond à la date de mise à jour du document.\
☑️  Paramètres de pagination (taille de la page de résultats, offset de départ de la page retournée)\
☑️  Paramètres de tri des résultats (champ utilisé pour le tri ainsi que la direction du tri)

![Configuration](https://api.apify.com/v2/key-value-stores/h8KTHfWCfdAGtcpId/records/legi-monitor-config.png)\
**Configuration**

### Sortie

Chaque résultat inclut l'ensemble des champs communs suivants:

✅  **url**: Lien LégiFrance vers le texte en question\
✅  **source**: Code du fond documentaire. Les valeurs possibles sont: *jorf*, *jade*\
✅  **title**: Titre du texte\
✅  **score**: Score de pertinence (uniquement renseigné si une requête est fournie)\
✅  **date\_update**: Date de mise à jour du texte\
✅  **date\_publish**: Date de publication du texte\
✅  **description**: Description du texte\
✅  **highlight**: Extraits du contenu du texte incluant éventuellement les mots clés de la requête (uniquement renseigné si la requête n'est pas vide).\
✅  **body**: Contenu intégral du texte.\
✅  **metadata**: Liste de métadonnées spécifiques à chaque fond documentaire

A noter que tous les champs dates sont fournis au format YYYY-MM-DD (2025-12-27)

![Résultats](https://api.apify.com/v2/key-value-stores/h8KTHfWCfdAGtcpId/records/legi-monitor-results.png)\
**Résultats**

Dans ce qui suit, nous précisons pour chaque fond documentaire supporté, la liste des métadonnées spécifiques associées.

#### Journal officiel (JORF): Liste des métadonnées

➡️  **jo\_id**: Titre du Journal Officiel parent\
➡️  **jo\_url**: Lien LégiFrance vers le Journal Officiel parent\
➡️  **jo\_title**: Titre du Journal Officiel parent\
➡️  **date\_sign**: Date de signature du texte\
➡️  **prev\_id**: Ancien identifiant issu de la version précédente de légifrance\
➡️  **num\_sequence**: Position du texte dans le Journal Officiel parent\
➡️  **ministere**: Ministère émetteur\
➡️  **autorite**: Autorité émettrice\
➡️  **nor**: Code NOR du texte\
➡️  **keywords**: Liste des mots clés du texte\
➡️  **enterprise**: Booléen indiquant si le texte concerne l'entreprise\
➡️  **enterprise\_dates**: Dates d'effet (entreprise)\
➡️  **enterprise\_domains**: Liste de domaines (entreprise)

#### Jurisprudence administrative (JADE): Liste des métadonnées

➡️  **prev\_id**: Ancien identifiant issu de la version précédente de légifrance\
➡️  **publi\_recueil**: Code de publication au recueil Lebon. Les valeurs possibles sont A, B ou C   suivant que la décision est Publiée, Mentionnée ou Inédite au recueil Lebon\
➡️  **ecli**: Identifiant ECLI correspondant à la décision\
➡️  **juridiction**: Provenance de la décision (caa, Conseil d'état, Conseil constitutionnel, Chambre de l'instruction de la cour d'appel, etc)\
➡️  **solution**: Solution de la décision\
➡️  **formation**: Formation dont est issue la decision (Example: 3EME CHAMBRE)\
➡️  **type\_recours**: Type de recours (Example: plein contentieux)\
➡️  **demandeur**: Demandeur (Example: COMMUNE D'HERBLAY)\
➡️  **defendeur**: Defendeur (Example: SOCIETE B.E.T EDIFICAT)\
➡️  **president**: Président de la cour (Example: Mme BRIN)\
➡️  **avocats**: Liste des avocats en présence\
➡️  **rapporteur**: Nom(s) de(s) rapporteur(s)\
➡️  **commissaire**: Commissaire du gouvernement

### Vos commentaires

Si vous avez des commentaires techniques, un bug à signaler ou des suggestions pour améliorer l'utilisation de l'acteur, veuillez créer un ticket dans l'onglet *Problèmes liés à l'acteur*

## Monitoring Legifrance (English)

[La documentation en Français se trouve ici.](#veille-sur-legifrance-francais)

### Description

Légifrance is the French government’s official source for the publication of legislative and regulatory texts, as well as court rulings. This tool enables users to monitor the latest published legislation and updates.
It allows users to search through recently published or updated texts within a rolling 30-days window.
Searches are carried out using a database that is updated daily. This database is populated by open-access files published by Direction de l'Information Légale et Adminstrative (DILA) (https://www.dila.gouv.fr/services/repertoire-des-informations-publiques/les-donnees-juridiques).

The database currently includes the following collections:\
➡️ Journal officiel: Texts published in the Official Journal of the French Republic (JORF)\
➡️ Jurisprudence administrative: Decisions of the administrative courts (JADE)

The tool allows you to search the database for entries from the last 30 days, using keywords and/or a set of filters (date and collection name).

The tool queries the database directly, without having to scrape the Légifrance website, that poses significant access issues, even when using residential proxies. This makes searching quick and efficient.

### Main Features

✅ Search a document database comprising all legislative texts published or updated within the last 30 days on Légifrance. The search is carried out using a query and/or filters (collection name, update time period).\
✅ Several document collections supported (JORF, JADE)\
✅ Simple and advanced search queries (Boolean operators)\
✅ Results pagination\
✅ Search keywords highlighting option\
✅ Results are provided in JSON format. They include: title, description, document url on LégiFrance website, etc.

### Usage

This tool is designed to facilitate the setting up of an automated monitoring system for legal texts. For example, it can be used to regularly search the LégiFrance database over a rolling period for topics relating to our activity domain.

### Input

☑️  A query with search keywords that must appear in the returned documents. The query may include the following boolean operators: **+** for the AND operator, **|** for the OR operator, **-** for the NOT operator, quotation marks **"** for an exact match, the wildcard operator **\*** and the proximity operator **~**\
☑️  Collection name to search\
☑️  A time period in the form of *Date From*, *Date To* or *X days*. This filter corresponds to the document’s update date.\
☑️  Pagination settings (results page size, starting offset)\
☑️  Result sorting parameters (sorting field and sorting direction)

![Configuration](https://api.apify.com/v2/key-value-stores/h8KTHfWCfdAGtcpId/records/legi-monitor-config.png)\
**Configuration**

### Output

Each result includes the following common fields:

✅  **url**: LégiFrance Url\
✅  **source**: Document Collection name. Possible values are: *jorf*, *jade*\
✅  **title**: Document title\
✅  **score**: Relevance score (only provided if a query is supplied)\
✅  **date\_update**: Document last update date\
✅  **date\_publish**: Document publication date\
✅  **description**: Document description\
✅  **highlight**: Document content extracts with search keywords highlighted (only populated if the query is not empty).\
✅  **body**: Full text content.\
✅  **metadata**: Metadata specific to each collection

Date fields are provided in the following format: YYYY-MM-DD (2025-12-27)

![Results](https://api.apify.com/v2/key-value-stores/h8KTHfWCfdAGtcpId/records/legi-monitor-results.png)\
**Results**

Below, the list of specific metadatas for each supported document collection.

#### Journal officiel (JORF): Metadata list

➡️  **jo\_id**: Title of the parent Official Journal\
➡️  **jo\_url**: LégiFrance Url to the parent Official Journal\
➡️  **jo\_title**: Title of the parent Official Journal\
➡️  **date\_sign**: Date the text was signed\
➡️  **prev\_id**: Former identifier from the previous version of LégiFrance\
➡️  **num\_sequence**: Position of the text within the parent Official Journal\
➡️  **ministere**: Issuing ministry\
➡️  **autorite**: Issuing authority\
➡️  **nor**: NOR code of the text\
➡️  **keywords**: List of keywords for the text\
➡️  **enterprise**: Boolean indicating whether the text relates to the enterprise\
➡️  **enterprise\_dates**: Effective dates (enterprise)\
➡️  **enterprise\_domains**: List of domains (enterprise)

#### Jurisprudence administrative (JADE): Metadata list

➡️  **prev\_id**: Former identifier from the previous version of Légifrance\
➡️  **publi\_recueil**: Publication code in the Lebon collection. Possible values are A, B or C, depending on whether the decision is Published, Mentioned or Unpublished in the Lebon collection\
➡️  **ecli**: ECLI decision identifier\
➡️  **juridiction**: Decision origin (CAA, Conseil d'état, Conseil constitutionnel, Chambre de l'instruction de la cour d'appel, etc.)\
➡️  **solution**: Outcome of the decision\
➡️  **formation**: Panel from which the decision originated (e.g. 3EME CHAMBRE)\
➡️  **type\_recours**: Type of appeal (e.g. plein contentieux)\
➡️  **demandeur**: Claimant (e.g. COMMUNE D'HERBLAY)\
➡️  **defendeur**: Defendant (e.g. SOCIETE B.E.T EDIFICAT)\
➡️  **president**: President of the court (Example: Ms BRIN)\
➡️  **avocats**: List of lawyers present\
➡️  **rapporteur**: Name(s) of the rapporteur(s)\
➡️  **commissaire**: Government commissioner

### Your feedback

If you’ve got any technical feedback, a bug to report or any suggestion to improve the actor usage, please create an issue on the Actor’s Issues tab.

# Actor input Schema

## `query` (type: `string`):

Search keywords that must be included in the result documents. The query can include boolean operators ('+' as AND operator, '|' as OR operator, '-' as NOT operator), exact matching double quotes, wildcard (\*) operator and proximity operator (~).

## `all_terms` (type: `boolean`):

If enabled and if query field does'nt include explicit boolean operators (+,-), the default boolean combination will be set to AND. If disabled, OR combination will be used.

## `collection` (type: `string`):

Select LegiFrance Collection name

## `date_from` (type: `string`):

Select date in format YYYY-MM-DD or {number} {unit}

## `date_to` (type: `string`):

Select absolute date in format YYYY-MM-DD

## `page_size` (type: `integer`):

Maximum number of search results by request. This number cannot exceed 100

## `offset` (type: `integer`):

Offset number is the position of the first result to return

## `body` (type: `boolean`):

Include the full text content of each document (in 'body' field)

## `sort_field` (type: `string`):

Select the sorting field to be used to sort search results

## `sort_asc` (type: `boolean`):

Enable ascending sort

## `highlight` (type: `integer`):

Maximum number of highlighted snippets to output for each search result. If set to 0, highlighting is disabled

## Actor input object example

```json
{
  "query": "\"performance énergétique\" -CPE",
  "all_terms": true,
  "collection": "jorf",
  "date_from": "30 days",
  "page_size": 20,
  "offset": 0,
  "body": true,
  "sort_field": "relevance",
  "sort_asc": false,
  "highlight": 0
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "query": "\"performance énergétique\" -CPE"
};

// Run the Actor and wait for it to finish
const run = await client.actor("nlp_data_lni/legifrance-monitoring").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "query": "\"performance énergétique\" -CPE" }

# Run the Actor and wait for it to finish
run = client.actor("nlp_data_lni/legifrance-monitoring").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "query": "\\"performance énergétique\\" -CPE"
}' |
apify call nlp_data_lni/legifrance-monitoring --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,nlp_data_lni/legifrance-monitoring"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/gJ46VT6kVYIsJsrD7/builds/wF1VPRYGfqcxXV5nW/openapi.json
