bopa-fetcher is a Python library for programmatic access to the official bulletins of the Principality of Asturias (BOPA). It allows users to search, retrieve, and analyze bulletin summaries and individual articles in a structured manner.
BOPA (Boletín Oficial del Principado de Asturias) is the official gazette of the region of Asturias, Spain. Researchers, legal professionals, and journalists often need to search, download, and analyze large volumes of legislative and administrative documents. bopa-fetcher provides a simple, programmatic interface to:
- Retrieve bulletin summaries and articles as structured Python objects.
- Search across date ranges for both bulletins and individual articles.
- Export data to dictionaries for integration with data analysis pipelines (pandas, NumPy, etc.).
- Avoid manual scraping by handling HTML parsing and URL construction internally.
Warning
BOPA bulletins are available in the portal in format HTML from 01/01/2000 onwards. Requests for earlier dates are in pdf format and will return no data.
- Legal research: Download and analyze official bulletins for a specific time period to track legislative changes.
- Data journalism: Collect structured data from BOPA for investigative reporting on regional governance.
- Policy analysis: Extract and categorize dispositions by origin (council, council board, presidency, etc.) for quantitative studies.
- Archive building: Build reproducible datasets of Asturian official publications for academic research.
Install from PyPI:
pip install bopa-fetcherFetch acts for a publication date:
from bopa.api import Client
client = Client()
# Get the bulletin summary for 29/12/2023
bulletin = client.get_bulletin(date="29/12/2023")
print(bulletin.to_dict())
# get specific article by code
article = client.get_article(cod="2023-11737", date="29/12/2023")
print(f" article: {article.to_dict()}")The repository includes runnable scripts with examples and use cases of the library. These scripts can be found in the scripts/ directory.
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:
- Author: Diego González Suárez, Noelia Rico, Irene Díaz
- Email: gonzalezsdiego@uniovi.es, noeliarico@uniovi.es, sirene@uniovi.es
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 bopa-fetcher in your research, please cite it. Citation information is available in the CITATION.cff file.
