A Python library for programmatic access to EU official bulletins
Project description
bulletin-fetcher
Description
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.
Why bulletin-fetcher?
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.
Main features
- 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.
Use Cases
bulletin-fetcher can be used for:
- Legal analytics
- Public policy research
- Regulatory monitoring
- Reproducible studies based on EU acts
- Data collection pipelines
Quick Start
Installation
Install from PyPI:
pip install bulletin-fetcher
Install with all dependencies:
pip install bulletin-fetcher[all]
Basic Usage Example
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])
Use Case Examples
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
License
This project is licensed under the MIT License. See the LICENSE file for details.
Contact
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
Acknowledgements
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.
Citation
If you use bulletin-fetcher in your research, please cite it. Citation information is available in the CITATION.cff file.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bulletin_fetcher-0.5.6.tar.gz.
File metadata
- Download URL: bulletin_fetcher-0.5.6.tar.gz
- Upload date:
- Size: 354.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d7c3940b9e60269e764cdac2536288c7d20b524a9a82a57b6e958266b5da1ee5
|
|
| MD5 |
f7e467d0b9d6fe810c06ad9c14fdefe7
|
|
| BLAKE2b-256 |
615ad705b89c371de94f84fcef2f2df89ff5885db274400aaba821825151a35a
|
Provenance
The following attestation bundles were made for bulletin_fetcher-0.5.6.tar.gz:
Publisher:
publish.yml on diegoglezsu/bulletin-fetcher
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bulletin_fetcher-0.5.6.tar.gz -
Subject digest:
d7c3940b9e60269e764cdac2536288c7d20b524a9a82a57b6e958266b5da1ee5 - Sigstore transparency entry: 1681001217
- Sigstore integration time:
-
Permalink:
diegoglezsu/bulletin-fetcher@cba20de1a751aa94629915ae194aca9ee54b6db8 -
Branch / Tag:
refs/tags/v0.5.6 - Owner: https://github.com/diegoglezsu
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@cba20de1a751aa94629915ae194aca9ee54b6db8 -
Trigger Event:
release
-
Statement type:
File details
Details for the file bulletin_fetcher-0.5.6-py3-none-any.whl.
File metadata
- Download URL: bulletin_fetcher-0.5.6-py3-none-any.whl
- Upload date:
- Size: 16.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
82f265de6670fad56e3b436026fa7a6260d037c4e0599110ac93d97a4af592c2
|
|
| MD5 |
fa3f4bf4f5738f365836492b5af59bd8
|
|
| BLAKE2b-256 |
619685b9f951fcd7ce1e55a448b1f51a5e7103206d0c7339fdf5b38f7e46acee
|
Provenance
The following attestation bundles were made for bulletin_fetcher-0.5.6-py3-none-any.whl:
Publisher:
publish.yml on diegoglezsu/bulletin-fetcher
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bulletin_fetcher-0.5.6-py3-none-any.whl -
Subject digest:
82f265de6670fad56e3b436026fa7a6260d037c4e0599110ac93d97a4af592c2 - Sigstore transparency entry: 1681001349
- Sigstore integration time:
-
Permalink:
diegoglezsu/bulletin-fetcher@cba20de1a751aa94629915ae194aca9ee54b6db8 -
Branch / Tag:
refs/tags/v0.5.6 - Owner: https://github.com/diegoglezsu
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@cba20de1a751aa94629915ae194aca9ee54b6db8 -
Trigger Event:
release
-
Statement type: