Dataset Viewer
The dataset viewer is not available for this dataset.
Unexpected token '<', "<html> <h"... is not valid JSON

Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.

BOE Spain 2024 Official Documents

1. Resource Summary

This dataset compiles all official publications from the Boletín Oficial del Estado (BOE) of Spain throughout the entire year 2024, covering daily governmental communications such as laws, decrees, ministerial resolutions, public appointments, official announcements, and administrative notifications. Each entry includes both the structured metadata (like section, department, topic, etc) and the full textual content of the publication in clean, ready for computational analysis.

The resource was created as part of the academic project for the course Descubrimiento de Conocimiento en Datos Complejos (Knowledge Discovery in Complex Data) at the Escuela Técnica Superior de Ingeniería de Sistemas Informáticos (ETSISI), Universidad Politécnica de Madrid (UPM). It is designed to serve as a research resource for exploring how artificial intelligence (AI) and data science can be applied to open government and legal documents and encourage to investigate how state institutions publish, regulate, and communicate across time and policy domains.

Unlike most open datasets focused solely on numerical or tabular information, this corpus provides rich unstructured textual data, extracted and normalized from the official BOE Open Data API. Moreover, it aims to complain with the basic FAIR principles (Findable, Accessible, Interoperable, and Reusable) allowing advanced experimentation in text mining, semantic modeling, and temporal analysis

Key motivations

  • To transform raw, hierarchical public information from the BOE into a FAIR (Findable, Accessible, Interoperable, and Reusable) dataset suitable for reproducible research and long-term data preservation.

  • To bridge data science and public administration by demonstrating how AI and Natural Language Processing (NLP) methods can be applied to analyze legal, normative, and institutional texts.

  • To promote open government data literacy, fostering transparency, algorithmic accountability, and civic participation through accessible public data.

  • To provide an educational and research-grade resource that supports complex data discovery, semantic analysis, and knowledge extraction in academic and applied contexts.


2. How to Use the Resource

This dataset is distributed as a Hugging Face Dataset in Parquet format.

You can load it directly with:

from datasets import load_dataset
dataset = load_dataset("Joz16gg162/boe_2024_dataset", split="full")

or download it from the Files and versions tab.

Recommended uses:

  • Text classification and topic modeling of public sector information.
  • Semantic and linguistic analysis of Spanish administrative language.
  • Temporal trend detection in legal and political publication activity.

Out-of-scope uses:

  • Legal interpretation of official texts.
  • Redistribution implying official endorsement by the Agencia Estatal Boletín Oficial del Estado (AEBOE).

3. Resource Details

3.1 Data preview

identificador fecha diario_numero seccion_codigo seccion_nombre departamento_nombre epigrafe_nombre titulo tematica texto_limpio mes trimestre
BOE-A-2024-1 2024-01-01 1 2A II. Autoridades y personal. - A. Nombramientos, situaciones e incidencias MINISTERIO DE TRABAJO Y ECONOMÍA SOCIAL Destinos Resolución de 21 de diciembre de 2023, de la Subsecretaría, por la que se resuelve la convocatoria de libre designación... Otras Por Resolución de la Subsecretaría de este Departamento, de 13 de noviembre de 2023 («Boletín Oficial del Estado» de 15 de noviembre de 2023), se anunció convocatoria para cubrir, por el sistema de libre designación... 2024-01 Q1
BOE-A-2024-2 2024-01-01 1 2A II. Autoridades y personal. - A. Nombramientos, situaciones e incidencias UNIVERSIDADES Nombramientos Resolución de 21 de diciembre de 2023, de la Universidad de Murcia, por la que se nombran... Economía/Empresa Vistas las propuestas elevadas por las comisiones evaluadoras de los concursos de acceso convocadas por Resolución de esta Universidad, de 8 de septiembre de 2023 (...texto truncado...) 2024-01 Q1
BOE-A-2024-3 2024-01-01 1 2A II. Autoridades y personal. - A. Nombramientos, situaciones e incidencias UNIVERSIDADES Nombramientos Resolución de 22 de diciembre de 2023, conjunta de la Universidad de Oviedo y el Servicio de Salud del Principado de Asturias, por la que se nombra Profesor Sanidad Vista la propuesta elevada el 18 de diciembre de 2023, por la comisión de selección del concurso de acceso convocado por Resolución conjunta de la Universidad de Oviedo y el Servicio... 2024-01 Q1
BOE-A-2024-4 2024-01-01 1 2A II. Autoridades y personal. - A. Nombramientos, situaciones e incidencias UNIVERSIDADES Nombramientos Resolución de 22 de diciembre de 2023, de la Universidad de Alcalá, por la que se nombra Catedrático de Universidad a don Pedro Cuesta Valiño. Economía/Empresa De conformidad con la propuesta elevada por la comisión nombrada para juzgar la plaza de Catedrático de Universidad Código: Z053/DCI101, del área de «Comercialización e Investigación de Mercados»... 2024-01 Q1
BOE-A-2024-5 2024-01-01 1 2A II. Autoridades y personal. - A. Nombramientos, situaciones e incidencias UNIVERSIDADES Nombramientos Resolución de 22 de diciembre de 2023, de la Universidad de Alcalá, por la que se nombra Profesor Titular de Universidad a don Ignacio Valiente Blanco. Educación/Universidad De conformidad con la propuesta elevada por la comisión nombrada para juzgar la plaza de Profesor Titular de Universidad Código: Z031/DIM203, del área de... 2024-01 Q1

3.2 Dataset Structure

The dataset structure is specified in the original dataset documentation (BOE API documentation, 2024). However, we include here a translated version of the original documentation to facilitate a better understanding of the dataset content. In this project, the original XML schema was transformed into a flattened tabular format (JSON Lines, .jsonl), where each record corresponds to a single official publication (disposición) and includes standardized metadata such as identificador (identifier), seccion (section), departamento (department), titulo (title), and fecha (publication date). Where tematica (thematic), mes (month), trimestre (quarter), and texto_limpio (clean_text) are additional fields and were added to enable temporal and thematic analysis for NLP and data mining applications.

Column Name Description Expected Values / Type
0 identificador Unique BOE identifier of the publication (e.g., BOE-A-2024-1). Text
1 fecha Date of publication in format YYYY-MM-DD. Date
2 diario_numero Official issue number of the BOE for that day. Number
3 seccion_codigo Code of the BOE section (e.g., “2A”, “3”, “1”). Text
4 seccion_nombre Name of the section within the BOE (e.g., II. Autoridades y personal. - A. Nombramientos...). Text
5 departamento_nombre Ministry, institution, or administrative body responsible for the publication. Text
6 epigrafe_nombre Subheading or category under which the publication is listed. Text
7 titulo Official title of the disposition or announcement. Text
8 tematica Automatically assigned thematic category (e.g., Sanidad, Economía/Empresa, Educación). Text
9 texto_limpio Cleaned full text of the publication extracted from XML or HTML Text
10 mes Month of publication in format YYYY-MM. Text
11 trimestre Quarter of publication (Q1, Q2, Q3, Q4). Text

JSON schema is in the repository

BOE SECTIONS

  • I. Disposiciones Generales: Includes laws, royal decrees, ministerial orders, and other general regulations.
  • II-A. Autoridades y personal - Nombramientos, situaciones e incidencias: Appointments, dismissals, transfers, and civil service matters.
  • II-B. Autoridades y personal - Oposiciones y concursos: Competitions, examinations, and public recruitment processes.
  • III. Otras Disposiciones: General resolutions, grants, scholarships, and cooperation agreements.
  • IV. Administración de Justicia: Judicial announcements, notices, and procedural decisions.
  • V-A. Anuncios del Sector Público: Public procurement announcements, calls for bids, and contract awards.
  • V-B. Otros Anuncios Oficiales: Announcements from public institutions and autonomous bodies.
  • V-C. Anuncios Particulares: Notices from private entities or individuals with legal effect.

THEMATIC CATEGORIES Automatically assigned by keyword detection in the publication title (tematica field):

  • Sanidad: health, COVID-19, vaccination, medical issues.
  • Economía/Empresa: taxes, subsidies, financing, trade, employment.
  • Trabajo/Laboral: social security, contracts, labor relations, benefits.
  • Educación/Universidad: schools, universities, scholarships, education policies.
  • Tráfico/Movilidad/Carreteras: traffic, vehicles, transport, road safety.
  • Vivienda/Urbanismo: housing, rent, construction, planning.
  • Energía/Medio ambiente: renewable energy, environment, waste management.
  • Justicia/Procedimientos: courts, sanctions, legal processes.
  • Otras: entries that do not fit any of the previous categories.

PUBLICATION PERIOD (TRIMESTER) Defined by the quarter of publication (trimestre field):

  • Q1: January - March
  • Q2: April - June
  • Q3: July - September
  • Q4: October - December

Data format:
Original .jsonl → converted to .parquet for efficient loading.

Number of entries: 75443
Language: Spanish


Code & Reproducibility

For the parts of extraction and processing that are below, all the specific information to build this dataset (including boe_sumario_text_json.py, notebooks and requirements.txt) are available in the public repository:

👉 https://github.com/Joz16gg162/dataset_publication

Key files:

  • src/boe_sumario_text_json.py – XML parsing and JSONL serialization
  • requirements.txt – dependencies to reproduce the pipeline
  • docs/datasheet_boe_2024.md – full datasheet (same content as this card)
  • README.md – end-to-end instructions to regenerate the 2024 snapshot

3.3 Data Collection

The dataset was built using data directly retrieved from the official BOE Open Data API, which publishes the full daily summaries of the Boletín Oficial del Estado (Spanish Government Gazette). Each daily summary contains a complete, structured list of all documents officially published that day, including laws, resolutions, decrees, and public announcements, along with rich metadata such as section, department, and thematic category.

API endpoint:

https://boe.es/datosabiertos/api/boe/sumario/{fecha}

or every date in the chosen range (e.g., 2024/01/01 → 2024/12/31), the script automatically queries this endpoint and retrieves the corresponding daily summary. The API returns data in XML or JSON format with an hierarchical structure (more details in the repository)

(As defined in the BOE API documentation, 2024).

  • Extraction window: 2024-01-01 ➜ 2024-12-31 (inclusive).

3.4 Processing pipeline

Codebase core: boe_sumario_text_json.py (provided with this dataset). Main steps:

  1. Iterate dates (2024/01/01 → 2024/12/31); request BOE summary for each day.
  2. Parse XML to extract every item with its metadata (section, department, epigraph, ids).
  3. Inline text: fetch full body from url_xml (preferred) or url_html fallback; parse with BeautifulSoup.
  4. Normalize text: Unicode NFKC, collapse whitespace, keep signatures/appendices.
  5. Temporal enrichment: compute mes and trimestre from fecha.
  6. Coarse semantic label (tematica): simple keyword mapping for rapid exploratory analysis.
  7. Serialize to .jsonl or .jsonl.gz; publish as Parquet on Hugging Face.

Command examples

# Base (metadata only)
python boe_sumario_text_json.py --year 2024 --out-base data/base_2024.jsonl --gzip

# Base + inline clean text (truncated to 25k chars of the text per publication)
python boe_sumario_text_json.py --year 2024 --out-base data/base_2024_text.jsonl   --inline-text --truncate-text 25000 --gzip

3.5 Quality checks & limitations

  • Traceability: every row keeps the official identificador and fecha to check against BOE.
  • Completeness: daily iteration; missing days may occur if no items or transient API issues.
  • Text fidelity: we do not remove signatures or editorial notes (researchers may post‑process).
  • Labeling: tematica is keyword‑based (baseline); refine with supervised/unsupervised models for research use.
  • Official status: only the BOE site/publications are authentic and legally valid.
  • Personal data notice This corpus may include public personal names (e.g., signatories, officials, appointees) as they appear in BOE publications. Such data are public by law in the BOE. Downstream users remain responsible for GDPR/LOPDGDD compliance in secondary uses (e.g., model training, redistribution, indexing).

3.6 Data Maintenance

  • Source maintenance: AEBOE maintains the original data and API.
  • This dataset: static snapshot for 2024; curated for reproducibility in research.
  • Updates: no scheduled refresh; future releases may add years or improved semantic fields.
  • Fresh data: consult https://www.boe.es or the BOE API directly.

4. License of the Resource

Licensing split

  • Dataset: Reuse governed by BOE Open Data Aviso Legal (June 27, 2024) — attribution required; no implication of official status.
  • Code & docs in repository: CC BY-NC 4.0 (applies only to the repository materials, not to BOE data).

4.1 Reuse Conditions (summary)

  • Free reuse for commercial and non-commercial purposes.
  • Mandatory attribution:

    “Based on data from the Agencia Estatal Boletín Oficial del Estado (https://www.boe.es).”

  • Prohibition of distortion or misleading representation.
  • The BOE is not responsible for derived uses.
  • Only the original BOE publications are considered official and authentic.

This derived dataset is distributed under the same conditions, following the Spanish Law 37/2007 on the Reuse of Public Sector Information.


5. Citation and Attribution

Official Source

Agencia Estatal Boletín Oficial del Estado. (2024). Boletín Oficial del Estado. https://www.boe.es/

Derived Dataset

Badajoz García Godos, S. (2025). BOE Spain 2024 Official Documents [Data set]. Hugging Face. https://huggingface.co/datasets/Joz16gg162/boe_2024_dataset

When using this resource in academic publications, please cite both the original source (AEBOE) and the derived dataset author (Badajoz García Godos, 2025).


6. Acknowledgements

This work was developed within the course “Descubrimiento de Conocimiento en Datos Complejos” (Knowledge Discovery in Complex Data),
part of the Bachelor’s Degree in Data Science and Artificial Intelligence at the Universidad Politécnica de Madrid (UPM).

Curated by:

  • Sebastián Badajoz García Godos (International Student, UPM)
  • Alex Eduardo Cervantes Fong (International Student, UPM)

Source Acknowledgement:
All original content © Agencia Estatal Boletín Oficial del Estado (AEBOE).
Code repository: https://github.com/Joz16gg162/dataset_publication


📅 Last Updated: October 2025
📧 Contact: sebastian.badajoz@alumnos.upm.es | alex.cfong@alumnos.upm.es 🏛️ Institution: Universidad Politécnica de Madrid (ETSISI)

Downloads last month
19