EUR-Lex EU Legislation Scraper avatar

EUR-Lex EU Legislation Scraper

Pricing

Pay per event

Go to Apify Store
EUR-Lex EU Legislation Scraper

EUR-Lex EU Legislation Scraper

Scrape EUR-Lex EU legislation search results, CELEX identifiers, dates, document metadata, and official links.

Pricing

Pay per event

Rating

0.0

(0)

Developer

Stas Persiianenko

Stas Persiianenko

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

2 hours ago

Last modified

Categories

Share

Scrape EUR-Lex search results and legal document metadata from the official EU law portal. The actor helps compliance teams, legal researchers, policy analysts, and market-intelligence teams monitor regulations, directives, decisions, case law, CELEX IDs, document dates, Official Journal citations, and official EUR-Lex links.

What does EUR-Lex EU Legislation Scraper do?

This actor turns EUR-Lex searches into structured datasets. If the EUR-Lex website is temporarily protected by its AWS WAF challenge, the actor automatically continues through the EU Publications Office's official CELLAR knowledge graph.

  • ๐Ÿ”Ž Search by keyword, CELEX ID, or pasted EUR-Lex URL
  • โš–๏ธ Extract one row per EU legal document
  • ๐Ÿงพ Capture CELEX IDs, titles, form, author, date, status, and citations
  • ๐Ÿ”— Return official EUR-Lex document, HTML, and PDF links
  • ๐ŸŒ Select any official EUR-Lex language code
  • ๐Ÿ“„ Optionally fetch document HTML text excerpts for deeper analysis

Who is it for?

  • EU compliance teams tracking new and amended legal acts.
  • Law firms building evidence packs for client matters.
  • Policy analysts monitoring topics such as climate, AI, sanctions, procurement, or digital regulation.
  • Market-intelligence vendors feeding legal-document watchlists into dashboards.
  • Researchers and journalists collecting official EU legal references at scale.

Why use this actor?

EUR-Lex is authoritative, but manual searches are slow to repeat and hard to export consistently. This scraper produces structured rows that can be exported to CSV, JSON, Excel, Google Sheets, databases, or downstream automation.

What data can you extract?

FieldDescription
celexIdOfficial CELEX identifier
titleDocument title from EUR-Lex
documentUrlOfficial EUR-Lex document URL
htmlUrlHTML text URL when available
pdfUrlPDF URL when available
formRegulation, directive, decision, etc.
authorIssuing institution or author
dateOfDocumentIsoNormalized document date
legalStatusIn-force status when shown by EUR-Lex
ojCitationOfficial Journal citation
latestConsolidatedVersionLatest consolidated version date/link text
availableLanguagesLanguage codes listed by EUR-Lex
matchedKeywordKeyword that produced the row
rankSearch result rank
sourceSearchUrlEUR-Lex page that produced the row

How much does it cost to scrape EUR-Lex legislation?

This actor uses pay-per-event pricing. There is a small run-start event and a per-document result event. You can control spend with maxItems, keyword count, and whether fetchDocumentHtml is enabled.

Quick start

  1. Open the actor on Apify.
  2. Enter one or more keywords, for example climate or digital services act.
  3. Set maxItems to the number of documents you need.
  4. Choose a language such as EN, FR, or DE.
  5. Run the actor.
  6. Export the dataset in CSV, JSON, Excel, or via API.

Input: keywords

Use keywords for normal recurring monitoring. Each keyword creates a EUR-Lex quick search and the actor follows result pages until maxItems is reached.

Examples:

  • climate
  • artificial intelligence
  • public procurement
  • financial sanctions

Input: CELEX IDs

Use celexIds when you already know exact documents.

Examples:

  • 32021R1119
  • 32022R2065
  • 32016R0679

Input: EUR-Lex search URLs

Use startUrls when you have built a complex query in EUR-Lex and want the actor to process that exact result page. Paste the browser URL from EUR-Lex search or legal-content pages.

Language support

EUR-Lex supports all official EU language codes. The input schema includes BG, ES, CS, DA, DE, ET, EL, EN, FR, GA, HR, IT, LV, LT, HU, MT, NL, PL, PT, RO, SK, SL, FI, and SV.

Date filtering

The actor extracts Date of document when EUR-Lex exposes it on the result card. You can filter client-side with dateFrom and dateTo in YYYY-MM-DD format.

Optional document HTML text

Enable fetchDocumentHtml if you need a text excerpt from the legal-content HTML page. Keep it disabled for faster, cheaper metadata watchlists.

Output example

{
"celexId": "32021R1119",
"title": "Regulation (EU) 2021/1119 ... European Climate Law",
"form": "Regulation",
"author": "European Parliament, Council of the European Union",
"dateOfDocumentIso": "2021-06-30",
"legalStatus": "In force",
"htmlUrl": "https://eur-lex.europa.eu/legal-content/EN/TXT/HTML/?uri=CELEX:32021R1119",
"pdfUrl": "https://eur-lex.europa.eu/legal-content/EN/TXT/PDF/?uri=CELEX:32021R1119"
}

Tips for better results

  • Use specific legal or policy terms instead of very broad words.
  • Use CELEX IDs for exact-document enrichment.
  • Keep fetchDocumentHtml off unless you need text.
  • Use maxItems to cap recurring monitoring costs.
  • Store sourceSearchUrl for auditability.

Integrations

You can connect the dataset to:

  • ๐Ÿ“Š Google Sheets dashboards for compliance watchlists
  • ๐Ÿง  LLM summarization pipelines for new legal acts
  • ๐Ÿ—„๏ธ SQL warehouses for legal analytics
  • ๐Ÿ”” Slack or email alerts for newly matched CELEX IDs
  • ๐Ÿงฉ Apify integrations and webhooks for scheduled monitoring

API usage: Node.js

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('automation-lab/eur-lex-eu-legislation-scraper').call({
keywords: ['climate'],
language: 'EN',
maxItems: 100
});
console.log(run.defaultDatasetId);

API usage: Python

from apify_client import ApifyClient
client = ApifyClient('YOUR_APIFY_TOKEN')
run = client.actor('automation-lab/eur-lex-eu-legislation-scraper').call(run_input={
'keywords': ['digital services act'],
'language': 'EN',
'maxItems': 50,
})
print(run['defaultDatasetId'])

API usage: cURL

curl -X POST 'https://api.apify.com/v2/acts/automation-lab~eur-lex-eu-legislation-scraper/runs?token=YOUR_APIFY_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"keywords":["climate"],"language":"EN","maxItems":100}'

MCP usage

Use the Apify MCP server with tools scoped to this actor:

https://mcp.apify.com/?tools=automation-lab/eur-lex-eu-legislation-scraper

Claude Code

Add the actor-scoped HTTP server:

$claude mcp add --transport http apify-eurlex 'https://mcp.apify.com/?tools=automation-lab/eur-lex-eu-legislation-scraper'

Claude Desktop

Add the following server to your Claude Desktop MCP configuration:

{
"mcpServers": {
"apify-eurlex": {
"url": "https://mcp.apify.com/?tools=automation-lab/eur-lex-eu-legislation-scraper"
}
}
}

Cursor

Open Settings โ†’ Tools & Integrations โ†’ MCP, add a custom server, and use the same mcpServers JSON configuration shown above.

VS Code

Open the Command Palette, choose MCP: Add Server, select HTTP, and enter the actor-scoped MCP URL shown above. Name the server apify-eurlex.

Example prompts:

  • "Run the EUR-Lex scraper for climate law and summarize the newest regulations."
  • "Extract CELEX IDs for digital services act documents and return official PDF links."
  • "Monitor EU procurement legislation and prepare a weekly compliance digest."

Scheduling

Run the actor daily, weekly, or monthly on Apify. Use the same keyword list each time and compare CELEX IDs against previous datasets to detect new or changed documents.

Legality

EUR-Lex is a public official legal-information website. This actor accesses public pages and does not bypass authentication. Users are responsible for complying with EUR-Lex terms, EU database rights, and internal legal policies.

FAQ

Can I scrape EUR-Lex by CELEX ID?

Yes. Add identifiers such as 32021R1119 to celexIds for exact document extraction.

Does this actor need an EUR-Lex account?

No. It uses public EUR-Lex pages and the official public CELLAR endpoint; no cookies or private credentials are required.

Troubleshooting

Why did I get fewer results than expected?

Your maxItems may be low, the keyword may have few results, or date filters may remove rows. Try a broader keyword or increase the limit.

Why is documentHtmlText empty?

Some documents may not expose a standard HTML text page or the request may fail. The metadata row is still saved.

Explore other Automation Lab actors at https://apify.com/automation-lab/ for regulatory monitoring, public records, tenders, and business intelligence workflows.

Changelog

  • Reliability update: keyword and CELEX lookups now continue through the official CELLAR knowledge graph when EUR-Lex serves a WAF challenge.
  • Initial version: keyword, CELEX ID, and EUR-Lex URL inputs; metadata extraction; optional HTML text fetch.

Support

If you need a field that EUR-Lex exposes but this actor does not yet return, open an Apify issue with an example URL and desired output field.

Field reference

celexId

title

documentUrl

htmlUrl

pdfUrl

sourceSearchUrl

rank

language

form

author

dateOfDocument

dateOfDocumentIso

ojCitation

legalStatus

latestConsolidatedVersion

numberOfPages

availableLanguages

matchedKeyword

documentHtmlText

scrapedAt