BOE APIboe.es ↗
Access Spain's BOE via API: daily publication summaries, consolidated legislation, full law text, metadata, and classification codes in structured JSON.
What is the BOE API?
This API exposes 5 endpoints covering Spain's Boletín Oficial del Estado (BOE), returning daily publication summaries, consolidated legislation listings, detailed law metadata, structured full-text, and auxiliary classification codes. Starting with get_daily_summary, you can retrieve every document published on a given date — sections, departments, individual items, and links to PDF, HTML, and XML versions — all as structured JSON.
curl -X GET 'https://api.parse.bot/scraper/31fe9c4b-11e6-4739-b3d7-26a873d6c255/get_daily_summary?date=20260513' \ -H 'X-API-Key: $PARSE_API_KEY'
Typed, relational, agent-ready
A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.
- Fully typed · autocompletes
- Objects link to objects
- Typed errors & pagination
Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:
uv add parse-sdk uv run parse init uv run parse add --marketplace boe-es-api
uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.
from parse_apis.boe_boletin_oficial_del_estado_api import BOE, AuxiliaryDataType, LegislationEntry, LawText
boe = BOE()
# Get auxiliary classification codes for law types
aux = boe.auxiliarydatas.get(type=AuxiliaryDataType.RANGOS)
print(aux.codes)
# List consolidated legislation entries
for entry in boe.legislationentries.list(limit=3):
print(entry.identificador, entry.titulo, entry.fecha_publicacion)
# Get the full text of a specific law
law_text = entry.text()
for block in law_text.bloque:
print(block.id, block.tipo, block.titulo)
# Fetch daily summary by date
summary = boe.dailysummaries.get(date="20260513")
print(summary.date, summary.publicacion)
Retrieve the full summary of all documents published on a specific date in the BOE. Returns hierarchically structured data: diario sections, departments, and individual items with identifiers, titles, and links to PDF/HTML/XML versions. Dates without publications (weekends, holidays) return an upstream error. Items are grouped by section and department within the diario.
| Param | Type | Description |
|---|---|---|
| daterequired | string | Publication date in YYYYMMDD format (e.g. 20260513). Must be a date when the BOE published (typically weekdays). |
{
"type": "object",
"fields": {
"data": "object containing sumario with metadatos (publication metadata) and diario array (sections, departments, items)",
"status": "object with code and text indicating upstream API response status"
},
"sample": {
"data": {
"data": {
"sumario": {
"diario": [
{
"numero": "116",
"seccion": [
{
"codigo": "1",
"nombre": "I. Disposiciones generales",
"departamento": [
{
"codigo": "7723",
"nombre": "JEFATURA DEL ESTADO",
"epigrafe": [
{
"item": {
"titulo": "Real Decreto-ley 11/2026, de 12 de mayo...",
"control": "2026/7856",
"url_pdf": {
"texto": "https://www.boe.es/boe/dias/2026/05/13/pdfs/BOE-A-2026-10324.pdf"
},
"url_xml": "https://www.boe.es/diario_boe/xml.php?id=BOE-A-2026-10324",
"url_html": "https://www.boe.es/diario_boe/txt.php?id=BOE-A-2026-10324",
"identificador": "BOE-A-2026-10324"
},
"nombre": "Medidas urgentes"
}
]
}
]
}
],
"sumario_diario": {
"identificador": "BOE-S-2026-116"
}
}
],
"metadatos": {
"publicacion": "BOE",
"fecha_publicacion": "20260513"
}
}
},
"status": {
"code": "200",
"text": "ok"
}
},
"status": "success"
}
}About the BOE API
Daily Publications and Legislation Lists
get_daily_summary accepts a date parameter in YYYYMMDD format and returns the full sumario object for that date, including metadatos, diario sections, departments, and individual items with their BOE identifiers, titles, and document links. get_consolidated_legislation_list takes no parameters and returns the complete index of consolidated legislation entries — each with an identifier, title, relevant dates, scope, originating department, and URLs.
Law Detail and Full Text
Once you have a BOE identifier (e.g., BOE-A-2015-9140) from the legislation list, get_law_details returns the law's metadatos, analisis block (subject matters and cross-references to other laws), and ELI metadata. get_law_text uses the same id parameter and delivers the law's content as a texto object containing a bloque array — structured blocks covering the preamble, titles, articles, and other divisions in document order.
Auxiliary Classification Codes
get_auxiliary_data maps the numeric code system used throughout BOE documents to human-readable names. The optional type parameter accepts rangos (law types such as Real Decreto or Ley Orgánica), departamentos (ministry and agency names), or materias (subject classifications). The response is a flat object where each key is a numeric code string and each value is the corresponding descriptive label — useful for decoding the codes that appear in get_daily_summary and get_law_details responses.
The BOE API is a managed, monitored endpoint for boe.es — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when boe.es changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.
This isn't an official boe.es API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.
Will this API break when the source site changes?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- Monitor daily BOE publications by date to detect new regulations affecting a specific department or subject area.
- Build a consolidated legislation index by syncing
get_consolidated_legislation_listto a database and enriching each entry with metadata fromget_law_details. - Extract cross-references between laws using the
analisisblock inget_law_detailsto map legislative dependencies. - Retrieve full article-level text of a specific law via
get_law_textfor ingestion into legal research or contract analysis tools. - Decode BOE classification codes using
get_auxiliary_datato translaterangosormateriascodes into readable labels for display or filtering. - Track which ministries (
departamentos) publish the most documents on a given date by parsing the diario sections inget_daily_summary. - Generate compliance alerts by scanning daily summaries for items from specific departments or matching subject matter codes.
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 100 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does BOE have an official developer API?+
What does get_daily_summary return and how granular is it?+
get_daily_summary returns a sumario object organised into diario sections, then departments, then individual items. Each item includes its BOE identifier, title, and links to the PDF, HTML, and XML versions of that document. It covers everything published on the requested date — legislative acts, announcements, and other official notices.Can I search for laws by keyword or subject matter through this API?+
get_daily_summary), the full consolidated index (get_consolidated_legislation_list), and lookup by BOE identifier (get_law_details, get_law_text). There is no keyword or full-text search endpoint. You can fork this API on Parse and revise it to add a search endpoint if the underlying source exposes that capability.Does get_law_text return the complete text of any BOE document, or only consolidated laws?+
get_law_text operates on consolidated legislation identifiers obtained from get_consolidated_legislation_list. It covers the structured text of those consolidated laws. Non-consolidated documents (e.g., individual daily announcements or resolutions) are accessible as PDF/HTML/XML links via get_daily_summary but their text content is not parsed by this API. You can fork it on Parse and revise to add a plain-document text endpoint.Are historical BOE publications accessible, and how far back does coverage go?+
get_daily_summary accepts any valid YYYYMMDD date that the BOE open data service covers. The official BOE open data availability starts from 2009-01-02 for machine-readable summaries. Dates outside the supported range will return an error from the upstream status field rather than an empty result.