bulletin-fetcher is a Python library for programmatic access to European Union acts published in official bulletins, with current support for the Official Journal of the European Union through the EUR-Lex / Cellar SPARQL endpoint.
The library provides a high-level Python API that allows developers, researchers and legal-domain experts to search EU acts without writing SPARQL queries directly.
EU Official Journal acts can be queried through public semantic web infrastructure, but using the underlying SPARQL endpoint requires knowledge of RDF vocabularies, query structure and EUR-Lex metadata conventions and ontologies.
bulletin-fetcher abstracts this complexity behind a simple Python interface. Users can retrieve EU acts by publication date, date ranges, act type, publishing institution and textual content, while receiving Python objects, JSON-compatible dictionaries, XML, CSV outputs or pandas DataFrames suitable for further analysis.
- Search EU acts from the Official Journal of the European Union.
- Filter acts by date or date range, act type, publishing institution, text contained in the act title, language.
- Fetch the content stream of an act by CELEX id or by the URI returned in search results.
- Retrieve available act types and publishing institutions.
- Return act search results as Python objects, JSON-compatible dictionaries, XML, CSV or pandas DataFrames.
- Work with Python instead of raw SPARQL queries.
- Integrate easily with notebooks, data pipelines and legal analytics workflows.
bulletin-fetcher can be used for:
- Legal analytics
- Public policy research
- Regulatory monitoring
- Reproducible studies based on EU acts
- Data collection pipelines
Install from PyPI:
pip install bulletin-fetcherInstall with all dependencies:
pip install bulletin-fetcher[all]Fetch acts for a publication date:
from bulletin.eurlex.api.client import EurlexBulletinClient
client = EurlexBulletinClient()
acts = client.get_acts(
date="2025-01-01",
date_end="2025-03-31",
title_contains="artificial intelligence",
language="ENG"
)
print(f"Total acts: {len(acts)}")
if acts:
first = acts[0]
print(first.title)
first_content = client.get_act_content(
first.celex_uri,
language="ENG",
)
print(first_content[:500])
content_from_celex_id = client.get_act_content(
"52025M12135",
language="ENG",
)
print(content_from_celex_id[:500])The repository includes runnable scripts and notebooks with examples and use cases of the library. These scripts can be found in the scripts/ directory.
- Case 1: Evolution of AI Legislation in the EU
- Case 2: Comparison of EU Institutions
- Case 3: Dataset Analysis
- Case 4: Tariff Analysis
This project is licensed under the MIT License. See the LICENSE file for details.
For any questions or suggestions, feel free to reach out to the corresponding author:
- Corresponding Author: Diego González Suárez
- Email: gonzalezsdiego@uniovi.es
- Collaborators: Noelia Rico, Irene Díaz
The authors gratefully acknowledge the financial support of the Asturian Agency for Science, Business Competitiveness and Innovation (SEKUENS) under Grant Agreement No. SEK-25-GRU-GIC-24-018. Noelia Rico and Irene Díaz also acknowledge support from the European project SCIMIN-CRM (Grant Agreement No. 101177746) and the funding from the Spanish Ministry of Science and Innovation through project PID2022-139886NB-I00.
If you use bulletin-fetcher in your research, please cite it. Citation information is available in the CITATION.cff file.
