# BOE Spain Official Gazette Monitor (grants, laws, tenders) (`hydramill/boe-summary`) Actor

Daily summary of the Spanish Official Gazette (BOE) for a date range, filtered by section, ministry/department and keywords (any/all, accent-insensitive). Clean JSON with PDF/HTML links and matched keywords. Personal-data sections excluded by default (GDPR).

- **URL**: https://apify.com/hydramill/boe-summary.md
- **Developed by:** [Hydramill](https://apify.com/hydramill) (community)
- **Categories:** News, Lead generation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-usage

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## BOE Spain Official Gazette Monitor

Get the **daily summary of Spain's Official State Gazette** (*Boletín Oficial del Estado*, BOE) for any date range as clean JSON: one row per law, decree, grant, public exam, tender or notice, with its section, issuing department, subject heading and official PDF/HTML links. Filter by **keywords** (any or all, accent-insensitive), **BOE section** and **ministry/department**, and get only what you need.

It reads the BOE's official open data API directly: no scraping, no login, no proxies, no browser. A run over a week of BOE takes seconds.

### What you can use it for

- **Grant and subsidy monitoring.** Every new *subvención*, *ayuda* or *beca* published by ministries, universities or regional bodies. Schedule it daily with `dateFrom: "1 day"` and send the results to Slack, email or a Google Sheet.
- **Legal and compliance alerts.** New royal decrees, orders and resolutions mentioning your topics (`"protección de datos"`, `"blanqueo"`, `"energía"`...), or everything from one ministry.
- **Public procurement watch.** Section V.A tender and award notices from the departments you sell to (`"defensa"`, `"adif"`, `"universidad"`).
- **Public jobs (oposiciones).** Section II.B calls by body or keyword.
- **Newsletters, dashboards and AI/RAG pipelines** that need a reliable, structured feed of the BOE.

### Why this actor

- **Real keyword filtering**: several keywords, *any* or *all* of them, accent- and case-insensitive (`subvencion` finds `Subvenciones`), searched in the title and the subject heading. Each row tells you which keywords matched (`matchedKeywords`).
- **Flexible sections**: exact codes (`5A`) or a whole section at once (`5` = V.A + V.B + V.C).
- **Department filter by name fragment or code**: `"cataluña"` matches every Catalan body, `"ministerio de hacienda"` one ministry.
- **Built for scheduled runs**: relative dates (`"6 days"`, `"2 weeks"`) counted back from today, Sundays and days without BOE handled as empty days (never an error), run summary saved in the key-value store (`SUMMARY`).
- **GDPR-safe by default**: sections II.A (appointments of named officials) and IV (court notices about named people) are **excluded unless you explicitly turn them on**.
- **Pay only for matches**: filtering happens before anything is stored or charged, and the actor stops at your *maximum cost per run*.
- **Clean, stable output** (flat JSON, fixed field names), documentation in English, Spanish and Catalan.

Other BOE actors exist on the Apify Store (checked 2026-10-31). This one is the one that puts all of the above together: any/all keyword matching with the matched keywords in each row, section and department filters, date ranges with relative dates for schedules, and personal-data sections off by default.

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| `dateFrom` | date or period | same as `dateTo` | First BOE date (`YYYY-MM-DD`) or a period counted back from `dateTo`: `"6 days"`, `"2 weeks"`, `"1 month"`. |
| `dateTo` | date | today (Madrid) | Last BOE date. A future date becomes today. At most **92 days** per run. |
| `keywords` | list of text | none | Words or phrases searched in the title and subject heading. Write them in Spanish, as the BOE does. |
| `keywordMode` | `any` / `all` | `any` | `any`: at least one keyword; `all`: every keyword. |
| `sections` | list | all except II.A and IV | `1`, `2A`, `2B`, `3`, `4`, `5A`, `5B`, `5C`, `T`, or `2` / `5` for a whole section. |
| `departments` | list of text | none | Name fragment of the issuing body (accent/case-insensitive) or exact BOE department code. |
| `maxResults` | integer | `1000` | Stop after this many results. `0` = no limit. |
| `includePersonalDataSections` | boolean | `false` | Include II.A and IV. See "Personal data (GDPR)". |

#### BOE sections

| Code | Section | What's in it |
|---|---|---|
| `1` | I. Disposiciones generales | Laws, royal decrees, ministerial orders, regulatory bases of grants |
| `2A` | II.A Nombramientos, situaciones e incidencias | Appointments and dismissals of named officials (**personal data, off by default**) |
| `2B` | II.B Oposiciones y concursos | Public exams and job calls |
| `3` | III. Otras disposiciones | Grants, agreements, awards, other resolutions |
| `4` | IV. Administración de Justicia | Court edicts and summonses (**personal data, off by default**) |
| `5A` | V.A Contratación del Sector Público | Public tenders and awards |
| `5B` | V.B Otros anuncios oficiales | Official notices, extracts of grant calls |
| `5C` | V.C Anuncios particulares | Private notices |
| `T` | Tribunal Constitucional | Constitutional Court rulings |

#### Example input: grants of the last week

```json
{
  "dateFrom": "6 days",
  "keywords": ["subvención", "ayudas", "becas"],
  "keywordMode": "any",
  "sections": ["1", "3", "5B"],
  "maxResults": 500
}
```

#### Example input: tenders from the Ministry of Defence in October

```json
{
  "dateFrom": "2026-10-01",
  "dateTo": "2026-10-31",
  "sections": ["5A"],
  "departments": ["ministerio de defensa"]
}
```

### Output

One dataset item per matching disposition, oldest date first, in the order the BOE publishes them. Real item from a run on 2026-10-31:

```json
{
  "id": "BOE-A-2026-22611",
  "date": "2026-10-29",
  "issue": "269",
  "sectionCode": "1",
  "sectionName": "I. Disposiciones generales",
  "departmentCode": "9590",
  "department": "MINISTERIO DE EDUCACIÓN, FORMACIÓN PROFESIONAL Y DEPORTES",
  "epigraph": "Subvenciones",
  "title": "Real Decreto 920/2026, de 28 de octubre, por el que se regula la concesión directa de subvenciones a Administraciones Públicas y otras entidades para la ejecución de actuaciones de relevancia deportiva y de interés público durante el ejercicio 2026.",
  "pdfUrl": "https://www.boe.es/boe/dias/2026/10/29/pdfs/BOE-A-2026-22611.pdf",
  "htmlUrl": "https://www.boe.es/diario_boe/txt.php?id=BOE-A-2026-22611",
  "matchedKeywords": ["subvención"],
  "retrievedAt": "2026-10-31T13:02:03.596Z"
}
```

| Field | Description |
|---|---|
| `id` | BOE identifier (`BOE-A-…` sections I-III and T, `BOE-B-…` section V). Stable: use it to de-duplicate scheduled runs. |
| `date`, `issue` | Publication date and issue number (extraordinary issues have their own number). |
| `sectionCode`, `sectionName` | Section as published. |
| `departmentCode`, `department` | Issuing body as published. |
| `epigraph` | Subject heading (`Ayudas`, `Subvenciones`, `Becas`, `Nombramientos`...), `null` in section V. |
| `title`, `pdfUrl`, `htmlUrl` | Official title and links to the authentic texts on boe.es. |
| `matchedKeywords` | Your keywords found in this item (empty when you set no keywords). |
| `retrievedAt` | When the actor read the BOE (UTC). |

The default key-value store also gets a `SUMMARY` record: dates read, dates without BOE, dispositions scanned, results, sections used and the data attribution.

Export the dataset as JSON, CSV, Excel or XML from the Output tab, or read it through the Apify API and integrations (Make, Zapier, Slack, Google Sheets, webhooks).

### Pricing

Pay per result: you are charged once per dataset item (event `result`), plus Apify's small per-run start fee. Days without BOE and filtered-out dispositions cost nothing. Set *Maximum cost per run* in the run options and the actor stops cleanly when it is reached.

### Personal data (GDPR)

The BOE publishes names of people in some sections. By default this actor **does not return sections II.A (appointments) and IV (court notices)**, which are mostly about named individuals. Other sections can still contain names (for example a grant awarded to a person, or a notice addressed to someone). If you turn on `includePersonalDataSections`, or process names from any section, you become the controller of that personal data and need your own lawful basis under the GDPR (Regulation (EU) 2016/679) and Spain's LOPDGDD. The BOE reuse conditions also require reusers to respect data protection law.

### Data source and attribution

Basado en datos de la Agencia Estatal Boletín Oficial del Estado (<https://www.boe.es>).

- Source: BOE open data API, daily summary (`https://www.boe.es/datosabiertos/api/boe/sumario/YYYYMMDD`), documented at <https://www.boe.es/datosabiertos/documentos/APIsumarioBOE.pdf>.
- Licence: BOE reuse conditions (Resolución de 27 de junio de 2024), commercial reuse allowed: <https://www.boe.es/informacion/aviso_legal/index.php#reutilizacion>.
- If you republish the data, cite the source with the sentence above and a link to https://www.boe.es, keep the meaning of the texts unchanged and show when the data was retrieved (`retrievedAt`).

**This is an independent tool. It is not affiliated with, endorsed by or sponsored by the Agencia Estatal Boletín Oficial del Estado.** The output is a convenience copy of the summary; the only authentic, legally valid text is the one published on boe.es (follow `pdfUrl`).

### Limitations

- It returns the **summary** of each BOE issue (title, department, section, links), not the full text of each disposition.
- Keywords are matched as substrings in the title and subject heading only.
- Today's BOE appears early in the morning (Monday to Saturday). Before that, today returns nothing.
- Maximum 92 days per run; split longer periods into several runs.

### En español

Resumen diario del **BOE** en JSON para un rango de fechas, filtrado por **palabras clave** (alguna o todas, sin distinguir acentos ni mayúsculas), **sección** y **departamento**. Pensado para vigilar **subvenciones y ayudas**, novedades **normativas** y **licitaciones**. Las secciones II.A (nombramientos) y IV (edictos judiciales) quedan excluidas por defecto por contener datos personales (RGPD). Se cobra por resultado. Basado en datos de la Agencia Estatal Boletín Oficial del Estado (https://www.boe.es). Herramienta independiente, sin relación con la AEBOE; el texto auténtico es el publicado en boe.es.

### En català

Sumari diari del **BOE** en JSON per a un interval de dates, filtrat per **paraules clau** (alguna o totes, sense distingir accents ni majúscules), **secció** i **departament**. Pensat per vigilar **subvencions i ajuts**, novetats **normatives** i **licitacions**. Les seccions II.A (nomenaments) i IV (edictes judicials) queden excloses per defecte perquè contenen dades personals (RGPD). Es cobra per resultat. Basat en dades de l'Agència Estatal Butlletí Oficial de l'Estat; la frase d'atribució obligatòria és «Basado en datos de la Agencia Estatal Boletín Oficial del Estado» (https://www.boe.es). Eina independent, sense relació amb l'AEBOE; el text autèntic és el publicat a boe.es.

# Actor input Schema

## `dateFrom` (type: `string`):

First BOE date to read (YYYY-MM-DD), or a period counted back from 'To date' such as "6 days" or "2 weeks" (handy for scheduled runs). Empty = same as 'To date'. At most 92 days per run.

## `dateTo` (type: `string`):

Last BOE date to read (YYYY-MM-DD). Empty = today (Madrid time). A future date is replaced by today. There is no BOE on Sundays; those days simply return nothing.

## `keywords` (type: `array`):

Words or phrases searched in the title and epigraph of each disposition. Accent- and case-insensitive substring match ("subvencion" finds "Subvenciones"). Write them in Spanish, as the BOE does. Empty = no keyword filter.

## `keywordMode` (type: `string`):

'Any' keeps a disposition when at least one keyword appears; 'All' only when every keyword appears.

## `sections` (type: `array`):

Sections to keep. Empty = every section (except II.A and IV, see 'Include personal-data sections').

## `departments` (type: `array`):

Issuing bodies to keep: a fragment of the department name as printed in the BOE (accent- and case-insensitive, e.g. "cataluña", "ministerio de hacienda", "universidad") or its exact BOE department code. Empty = every department.

## `maxResults` (type: `integer`):

Stop after this many results (each result is one billable item). 0 = no limit.

## `includePersonalDataSections` (type: `boolean`):

Off by default: sections II.A (appointments, dismissals) and IV (court notices) are mostly about named individuals. Turn this on only if you have a lawful basis under the GDPR to process that personal data; you become responsible for it.

## Actor input object example

```json
{
  "dateFrom": "6 days",
  "keywords": [
    "subvención",
    "ayudas"
  ],
  "keywordMode": "any",
  "maxResults": 1000,
  "includePersonalDataSections": false
}
```

# Actor output Schema

## `results` (type: `string`):

One item per BOE entry (grants, laws, tenders) matching the filters.

## `summary` (type: `string`):

Totals of the run (key SUMMARY in the default key-value store).

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "dateFrom": "6 days",
    "keywords": [
        "subvención",
        "ayudas"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("hydramill/boe-summary").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "dateFrom": "6 days",
    "keywords": [
        "subvención",
        "ayudas",
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("hydramill/boe-summary").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "dateFrom": "6 days",
  "keywords": [
    "subvención",
    "ayudas"
  ]
}' |
apify call hydramill/boe-summary --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,hydramill/boe-summary"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/g43zin4Xm75k5lRNR/builds/IE98Tmcb2qpQA4sQ4/openapi.json
