# BOE Scraper – Spain Official Gazette Daily API (`fluyeporlaweb/boe-scraper`) Actor

Scrape Spain's Official Gazette (BOE) daily summary: every law, grant, job call and notice with PDF/HTML links. Filter by date, section, ministry, keyword.

- **URL**: https://apify.com/fluyeporlaweb/boe-scraper.md
- **Developed by:** [Pablo Navarro](https://apify.com/fluyeporlaweb) (community)
- **Categories:** News, Automation, AI
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 gazette items

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## 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 Scraper – Spain Official Gazette Daily API

**BOE scraper** for the *Boletín Oficial del Estado*, Spain's Official State Gazette. It reads the official BOE open-data API and returns every item of the daily summary as clean JSON: laws, royal decrees, grants, public job calls (oposiciones), appointments and announcements, each with links to the HTML, PDF and XML versions. No login, no browser, no proxies.

### What does it do?

- Reads one day or a date range (up to 92 days) of the BOE summary.
- Filters by **section** (e.g. `1` general provisions, `2B` job calls, `5A` tenders), **department/ministry** and **title keywords**.
- Skips days without a gazette automatically (BOE is not published on Sundays).

### Use cases

- **Legal and compliance alerts**: new regulations that affect your business, every morning.
- **Grants and public job calls**: watch for *subvenciones* and *oposiciones*.
- **Gestorías, law firms and consultants**: daily digests for clients.
- **AI agents and RAG**: feed LLMs the official source, with PDF links for citations.
- **Newsletters, Telegram and X bots**: post today's key items automatically.

### Input

| Field | Description |
|---|---|
| `dateFrom` | First day (YYYY-MM-DD). Empty = today. Example: 2026-10-26 |
| `dateTo` | Last day (YYYY-MM-DD), max 92 days after dateFrom. Empty = same as dateFrom. |
| `keywords` | Keep items whose title contains any keyword. Example: subvención, oposiciones, inteligencia artificial |
| `sections` | BOE section codes: 1 (General provisions), 2A, 2B (Appointments, job calls), 3 (Other provisions), 4 (Justice), 5A, 5B (Announcements, tenders). Example: 1, 5A |
| `departments` | Text contained in the department/ministry name. Example: MINISTERIO DE HACIENDA |
| `maxItems` | 0 = no limit. Example: 100 |

Example input:

```json
{
  "dateFrom": "2026-10-26",
  "sections": [
    "1",
    "3"
  ],
  "maxItems": 25
}
```

### Output

Real output (first items of a run on 26 Oct 2026):

```json
[
  {
    "id": "BOE-A-2026-22391",
    "date": "2026-10-26",
    "issue": "265",
    "sectionCode": "3",
    "section": "III. Otras disposiciones",
    "department": "CORTES GENERALES",
    "heading": "Becas",
    "title": "Acuerdo de 13 de octubre de 2026, de la Mesa de la Diputación Permanente, por el que se convocan becas para la formación práctica en estudios y tareas aplicadas de carácter documental, estadístico, informativo y analítico relacionadas con los órganos y actividades de la Unión Europea en general y con el sistema constitucional y parlamentario español.",
    "htmlUrl": "https://www.boe.es/diario_boe/txt.php?id=BOE-A-2026-22391",
    "pdfUrl": "https://www.boe.es/boe/dias/2026/10/26/pdfs/BOE-A-2026-22391.pdf",
    "xmlUrl": "https://www.boe.es/diario_boe/xml.php?id=BOE-A-2026-22391"
  },
  {
    "id": "BOE-A-2026-22392",
    "date": "2026-10-26",
    "issue": "265",
    "sectionCode": "3",
    "section": "III. Otras disposiciones",
    "department": "CORTES GENERALES",
    "heading": "Becas",
    "title": "Acuerdo de 13 de octubre de 2026, de la Mesa de la Diputación Permanente, por la que se convocan becas de formación práctica sobre comunicación institucional.",
    "htmlUrl": "https://www.boe.es/diario_boe/txt.php?id=BOE-A-2026-22392",
    "pdfUrl": "https://www.boe.es/boe/dias/2026/10/26/pdfs/BOE-A-2026-22392.pdf",
    "xmlUrl": "https://www.boe.es/diario_boe/xml.php?id=BOE-A-2026-22392"
  }
]
```

Export the results as JSON, CSV or Excel, read them through the API, or send them to Google Sheets, Make, Zapier, n8n or webhooks. You can also run this Actor from AI agents through the Apify MCP server.

### Pricing

Pay per event: **$3.00 per 1,000 gazette items** plus $0.00005 per run start. There is no extra platform usage charge.

### FAQ

**Is this the official data?** Yes. It uses the BOE open-data API (`/datosabiertos/api/boe/sumario/YYYYMMDD`).

**Does it download the full text?** No. It returns the summary entries with links to the official HTML, PDF and XML. Pass `htmlUrl` to any web/RAG Actor to get the full text.

**Can I monitor every day?** Yes. Schedule it daily with an empty date (it defaults to today) and your keywords.

**Do I need a login or API key?** No. It uses the source's public API; you only need an Apify account.

**Can AI agents use it?** Yes. Call it through the Apify API, or from Claude, Cursor or any MCP client via the Apify MCP server.

### Data source and license

Source: [BOE open data](https://www.boe.es/datosabiertos/), reused under the [BOE reuse conditions](https://www.boe.es/informacion/aviso_legal/index.php): "Las presentes condiciones permiten la reutilización de los documentos sometidos a ellas para fines comerciales y no comerciales". Under those conditions you must cite the source and must not alter the content or its meaning.

This Actor is not affiliated with or endorsed by the data source. You are responsible for using the data in line with the source's license and terms.

# Actor input Schema

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

First day (YYYY-MM-DD). Empty = today. Example: 2026-10-26

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

Last day (YYYY-MM-DD), max 92 days after dateFrom. Empty = same as dateFrom.

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

Keep items whose title contains any keyword. Example: subvención, oposiciones, inteligencia artificial

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

BOE section codes: 1 (General provisions), 2A, 2B (Appointments, job calls), 3 (Other provisions), 4 (Justice), 5A, 5B (Announcements, tenders). Example: 1, 5A

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

Text contained in the department/ministry name. Example: MINISTERIO DE HACIENDA

## `maxItems` (type: `integer`):

0 = no limit. Example: 100

## Actor input object example

```json
{
  "dateFrom": "2026-10-26",
  "maxItems": 0
}
```

# Actor output Schema

## `items` (type: `string`):

No description

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

No description

# 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": "2026-10-26"
};

// Run the Actor and wait for it to finish
const run = await client.actor("fluyeporlaweb/boe-scraper").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": "2026-10-26" }

# Run the Actor and wait for it to finish
run = client.actor("fluyeporlaweb/boe-scraper").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": "2026-10-26"
}' |
apify call fluyeporlaweb/boe-scraper --silent --output-dataset

```

## MCP server setup

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

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/yKHIvfp8ZOfZa6AJ6/builds/xs2C0QJG12vfIXi0U/openapi.json
