# EU Legislation API: New EUR-Lex Regulations & Directives (`datacrate/eu-legislation-feed`) Actor

New EU regulations, directives and decisions from EUR-Lex as clean rows: CELEX id, title, date, in-force status, author and EUR-Lex HTML/PDF links. Filter by type, dates, keyword. Delta mode. Official free SPARQL source.

- **URL**: https://apify.com/datacrate/eu-legislation-feed.md
- **Developed by:** [Data Crate](https://apify.com/datacrate) (community)
- **Categories:** Other, Developer tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.60 / 1,000 legal act returneds

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?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

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

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## EU Legislation API: New EUR-Lex Regulations, Directives & Decisions

**Get new EU legal acts (regulations, directives and decisions) from EUR-Lex as clean rows: CELEX id, English title, date, in-force status, author, ELI and links to the EUR-Lex HTML and PDF.** Filter by act type, date range, title keyword, author and in-force flag, and use delta mode to get only new or changed acts on a schedule. Data comes from the official, free SPARQL endpoint of the EU Publications Office (CELLAR), no key and no scraping of web pages.

**Cost:** **$0.002 per act** (about **$2 per 1,000**, less on higher Apify plans). The prefilled example (15 acts) costs about **$0.03**. `maxItems` caps the bill.

### Who it is for

- **Compliance, regulatory affairs and legal teams** that need a daily list of new EU acts touching their sector (REACH, GDPR, batteries, AI, customs, sanctions).
- **Consultancies, lobbyists and trade associations** tracking Commission, Council and Parliament output by keyword.
- **Law-tech, news and research tools** that need a structured feed of EU legislation to enrich or alert on.
- **Developers and AI agents** that need one reliable call for "what new EU regulations were adopted this month".

### What you get per row

`celex`, `type`, `typeLabel`, `title`, `documentDate`, `inForce`, `entryIntoForceDate`, `authors`, `eli`, `cellarUri`, `htmlUrl`, `pdfUrl`, `changeType` (delta mode), `source`, `attribution`, `checkedAt`.

### Input

| Field | Meaning |
|---|---|
| `types` | `regulation`, `directive`, `decision` (empty = all three). Implementing and delegated acts are included under their CELEX letter (R, L, D). |
| `daysBack` | acts dated in the last N days (default 30). Ignored when `dateFrom` is set. |
| `dateFrom`, `dateTo` | optional `YYYY-MM-DD` window on the act date. `dateTo` defaults to today. |
| `keywords` | optional list; an act matches if its English title contains any of them (not case sensitive) |
| `author` | optional text the author name must contain (for example `Commission`, `Council`, `Parliament`) |
| `inForce` | `any` (default), `yes`, or `no`. New acts are often not in force yet. |
| `maxItems` | cap on rows and cost (default 15) |
| `onlyNewSinceLastRun`, `stateKey` | delta mode, one watchlist per state name |

Default (prefill) input, also used when you send nothing:

```json
{ "types": ["regulation", "directive", "decision"], "daysBack": 30, "maxItems": 15 }
```

Everything about REACH or chemicals in the last half year:

```json
{ "types": ["regulation"], "keywords": ["REACH", "chemicals"], "daysBack": 180, "maxItems": 200 }
```

Daily change feed (only new or changed acts after the first run):

```json
{ "daysBack": 14, "onlyNewSinceLastRun": true, "stateKey": "daily", "maxItems": 500 }
```

### Sample output (trimmed, real data)

```json
{
  "celex": "32026R2530",
  "type": "regulation",
  "typeLabel": "Regulation",
  "title": "Commission Regulation (EU) 2026/2530 of 16 November 2026 amending Annex XVII to Regulation (EC) No 1907/2006 ... (REACH) as regards lead in gunshot",
  "documentDate": "2026-11-16",
  "inForce": false,
  "entryIntoForceDate": "2026-12-07",
  "authors": ["Directorate-General for Internal Market, Industry, Entrepreneurship and SMEs", "European Commission"],
  "eli": "https://data.europa.eu/eli/reg/2026/2530/oj",
  "htmlUrl": "https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:32026R2530",
  "pdfUrl": "https://eur-lex.europa.eu/legal-content/EN/TXT/PDF/?uri=CELEX:32026R2530"
}
```

### FAQ

**Which acts are covered?** Acts in the EUR-Lex legal-act sector (CELEX numbers starting with 3 and ending in R, L or D), which includes regulations, implementing and delegated regulations, directives and decisions. Corrigenda and consolidated texts are not returned.

**Which date is used?** The date of the act (adoption or signature date, `documentDate`), not the Official Journal publication date. Acts show up in EUR-Lex shortly after adoption, so a few days of overlap in your window is sensible.

**What does `inForce` mean?** It is the flag EUR-Lex publishes for the act: `true` in force, `false` not (yet) in force, `null` when no flag is published. `entryIntoForceDate` is the scheduled or actual date when available.

**Is the legal text included?** No. Only EUR-Lex metadata is returned, with links to the official HTML and PDF. Only the texts published on EUR-Lex are authentic, and this actor is not legal advice.

**Languages?** Titles are English. The links open the English version; swap `EN` in the URL for another language.

**Delta mode?** With `onlyNewSinceLastRun` an act is returned again only if it is new or its title, date, in-force flag or entry-into-force date changed. `changeType` says which. The first run returns everything and sets the baseline.

**Does it need an API key?** No. It uses the public SPARQL endpoint with a descriptive User-Agent, paces its requests and retries with backoff on errors.

### License, attribution and legal notice

- Data comes from the public SPARQL endpoint of the Publications Office of the European Union (`https://publications.europa.eu/webapi/rdf/sparql`). The `robots.txt` of publications.europa.eu / op.europa.eu has `User-agent: *` with `Allow: /` and only blocks portal, basket and RDF page-request paths (not the SPARQL endpoint); the actor makes a handful of paced queries per run.
- Reuse: the European Commission reuse policy (Decision 2011/833/EU, the "European Commission reuse notice" listed for the EUR-Lex ELI dataset on data.europa.eu) allows reuse of the metadata with acknowledgement of the source, and the Publications Office licenses its editorial content under Creative Commons Attribution 4.0 (CC BY 4.0). Every row carries an `attribution` field: "Source: EUR-Lex, Publications Office of the European Union".
- **Legal notice:** only EUR-Lex metadata (identifiers, titles, dates, flags, links) is returned, never the legal text. Only EU legislation published in the Official Journal is authentic. This actor is not affiliated with, endorsed or sponsored by the European Union or the Publications Office, and nothing here is legal advice.
- No personal data is collected or returned (author fields are institutions and departments).

### Integrations

Schedule daily, send new acts to Slack, email, Google Sheets, a warehouse or a Notion table through a webhook, or call it from an AI agent through the Apify MCP server. Export JSON, CSV or Excel.

### Pricing

Pay per result: **$0.002 per legal act** (volume tiers on higher Apify plans), plus Apify's usual start event. Only acts returned are billed; unchanged acts skipped by delta mode are not billed and `maxItems` caps the bill.

### Changelog

- 1.0: first release (type, date range, keyword, author and in-force filters, delta mode, links to EUR-Lex HTML/PDF, attribution per row).

# Actor input Schema

## `types` (type: `array`):

Which kinds of EU legal acts to return: regulation, directive, decision. Empty = all three.

## `daysBack` (type: `integer`):

Return acts dated in the last N days. Ignored if From date is set.

## `dateFrom` (type: `string`):

Optional, YYYY-MM-DD. Date of the act (signature or adoption date). Overrides Days back.

## `dateTo` (type: `string`):

Optional, YYYY-MM-DD. Defaults to today.

## `keywords` (type: `array`):

Optional. Return acts whose English title contains any of these words or phrases (not case sensitive), for example REACH, artificial intelligence, GDPR, batteries.

## `author` (type: `string`):

Optional. Keep acts whose author includes this text, for example Commission, Parliament, Council, Health.

## `inForce` (type: `string`):

Filter by the in-force flag published by EUR-Lex. New acts are often not in force yet.

## `maxItems` (type: `integer`):

Upper bound on rows (and on cost).

## `onlyNewSinceLastRun` (type: `boolean`):

Skip acts already returned by an earlier run with the same state name and unchanged since. The first run returns everything and sets the baseline. Each row gets changeType new or revised.

## `stateKey` (type: `string`):

Use different names to keep separate watchlists.

## Actor input object example

```json
{
  "types": [
    "regulation",
    "directive",
    "decision"
  ],
  "daysBack": 30,
  "inForce": "any",
  "maxItems": 15,
  "onlyNewSinceLastRun": false,
  "stateKey": "default"
}
```

# Actor output Schema

## `results` (type: `string`):

One row per EU legal act with CELEX id, title, date, in-force status, author and EUR-Lex links.

# 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 = {
    "types": [
        "regulation",
        "directive",
        "decision"
    ],
    "daysBack": 30,
    "maxItems": 15
};

// Run the Actor and wait for it to finish
const run = await client.actor("datacrate/eu-legislation-feed").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 = {
    "types": [
        "regulation",
        "directive",
        "decision",
    ],
    "daysBack": 30,
    "maxItems": 15,
}

# Run the Actor and wait for it to finish
run = client.actor("datacrate/eu-legislation-feed").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 '{
  "types": [
    "regulation",
    "directive",
    "decision"
  ],
  "daysBack": 30,
  "maxItems": 15
}' |
apify call datacrate/eu-legislation-feed --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,datacrate/eu-legislation-feed"
        }
    }
}
```

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/DDZKVdo4H1ssL4bFL/builds/5YWhJuSc9r8zigv8M/openapi.json
