EUR-Lex EU Legislation Scraper
Pricing
Pay per event
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
Maintained by CommunityActor 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?
| Field | Description |
|---|---|
celexId | Official CELEX identifier |
title | Document title from EUR-Lex |
documentUrl | Official EUR-Lex document URL |
htmlUrl | HTML text URL when available |
pdfUrl | PDF URL when available |
form | Regulation, directive, decision, etc. |
author | Issuing institution or author |
dateOfDocumentIso | Normalized document date |
legalStatus | In-force status when shown by EUR-Lex |
ojCitation | Official Journal citation |
latestConsolidatedVersion | Latest consolidated version date/link text |
availableLanguages | Language codes listed by EUR-Lex |
matchedKeyword | Keyword that produced the row |
rank | Search result rank |
sourceSearchUrl | EUR-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
- Open the actor on Apify.
- Enter one or more keywords, for example
climateordigital services act. - Set
maxItemsto the number of documents you need. - Choose a language such as
EN,FR, orDE. - Run the actor.
- 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:
climateartificial intelligencepublic procurementfinancial sanctions
Input: CELEX IDs
Use celexIds when you already know exact documents.
Examples:
32021R111932022R206532016R0679
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
fetchDocumentHtmloff unless you need text. - Use
maxItemsto cap recurring monitoring costs. - Store
sourceSearchUrlfor 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 ApifyClientclient = 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.
Related scrapers
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