BOE API for AI agents, free Spanish legislation API no key
The Spanish state gazette agency’s free open data API: plain GET requests return the daily table of contents of the BOE and BORME, plus consolidated Spanish laws with their metadata and legal analysis, as JSON or XML. No key and no account; the reuse terms allow commercial use with a source credit.
Verified factsChecked 2026-10-30
| Price | Free. AEBOE offers the API to the public for access, download and reuse; the docs mention no paid tier or account.1 [Verified 2026-10-30] |
| API key / auth | None. Our keyless GET of the 2026-10-30 BOE summary returned HTTP 200 JSON. The technical guide says requests use GET over HTTPS and pick JSON or XML with the Accept header.4 [Verified 2026-10-30] |
| Rate limit | Not published by AEBOE. The API docs, technical guides and FAQs give no request limit, and our responses carried no rate-limit headers.1 [Verified 2026-10-30] |
| License / terms | Reuse conditions under AEBOE’s standard licence of 27 June 2024: commercial and non-commercial reuse is allowed if you cite the source with a link to www.boe.es (for derived products, “Basado en datos de la Agencia Estatal Boletín Oficial del Estado”), do not distort the meaning, do not suggest the data is official or that AEBOE endorses you, keep update dates, and follow GDPR for personal data. Logos and site design are excluded.3 [Verified 2026-10-30] |
| Datasets | Consolidated legislation, the BOE daily summary, the BORME daily summary and auxiliary code tables, each with an FAQ and a technical PDF.1 [Verified 2026-10-30] |
| Coverage | BOE summaries are available from September 1960. The BOE is published every day except Sunday (plus occasional extra issues); our request for Sunday 2026-10-25 returned 404 “La información solicitada no existe”.5 [Verified 2026-10-30] |
| Consolidated laws | Consolidated texts have no official value and are informative only; a new consolidated version takes 1 to 3 days after an amendment is published, and estado_consolidacion shows “desactualizado” until then.6 [Verified 2026-10-30] |
FeaturesChecked 2026-10-30
| Capability | Value |
|---|---|
| StatusAEBOE gives the open data API no beta, GA or version label and publishes no SLA. | Not published1 [Not published by vendor: checked 2026-10-30 on https://www.boe.es/datosabiertos/api/api.php] |
| API key requiredNo key. Keyless GET of the 2026-10-30 BOE summary returned HTTP 200 JSON. | No2 [Verified 2026-10-30 by test request to https://www.boe.es/datosabiertos/api/boe/sumario/20261030] |
| Free tierFree. Offered to the public for access, download and reuse; no paid tier or account is mentioned. | Yes1 [Verified 2026-10-30 on https://www.boe.es/datosabiertos/api/api.php] |
| Rate limitNo request limit in the API docs, technical guides or FAQs, and no rate-limit headers in our responses. | Not published1 [Not published by vendor: checked 2026-10-30 on https://www.boe.es/datosabiertos/api/api.php] |
| Official MCP serverAEBOE publishes no MCP server; wrap the GET endpoints as tools yourself. | Not published1 [Not published by vendor: checked 2026-10-30 on https://www.boe.es/datosabiertos/api/api.php] |
| Official SDKNo official SDK; plain GET with JSON or XML, documented in technical PDFs with XSD schemas. | Not published1 [Not published by vendor: checked 2026-10-30 on https://www.boe.es/datosabiertos/api/api.php] |
| Data license / termsAEBOE standard licence of 27 June 2024: cite the source with a link to www.boe.es, no distortion, no implied official status or endorsement; logos and design excluded. | Free reuse with source credit3 [Verified 2026-10-30 on https://www.boe.es/informacion/aviso_legal/index.php] |
| Commercial use allowedAllowed with attribution. The reuse conditions permit commercial and non-commercial reuse with a source credit. | Yes3 [Verified 2026-10-30 on https://www.boe.es/informacion/aviso_legal/index.php] |
| CORS / browser useAccess-Control-Allow-Origin: *. GET responses carried ACAO *; an OPTIONS preflight returned 204 without it, so stick to simple GETs from browser code. | Yes2 [Verified 2026-10-30 by test request to https://www.boe.es/datosabiertos/api/boe/sumario/20261030] |
| Freshness / coverageBOE summaries from September 1960; consolidated laws updated 1 to 3 days after an amendment. | Daily except Sunday; since 19605 [Verified 2026-10-30 on https://www.boe.es/datosabiertos/faq/boe.php] |
What it does
The Boletín Oficial del Estado (BOE) is Spain’s official state gazette, where laws, royal decrees, appointments, public contract notices and other official acts are published. The BORME is its sister gazette for the commercial register (company formations, appointments, dissolutions). AEBOE, the state agency that publishes both, runs an open data API at boe.es/datosabiertos/api with four datasets: the BOE daily summary, the BORME daily summary, consolidated legislation, and auxiliary code tables. An agent asks for a date, for example GET /datosabiertos/api/boe/sumario/20261030 with Accept: application/json, and gets that issue’s sections, departments and items, each with an identifier such as BOE-A-2026-22716 and links to the PDF, HTML and XML versions. For laws, GET /datosabiertos/api/legislacion-consolidada/id/{id}/metadatos returns the law’s rank, department, dates and consolidation state, and /texto returns the consolidated text in XML. Everything is in Spanish, so an agent usually needs to translate. AEBOE publishes no MCP server or SDK; you wrap the endpoints yourself (see the snippet below).
Working exampleRun 2026-10-30
curl -sS "https://www.boe.es/datosabiertos/api/boe/sumario/20261030" \
-H "Accept: application/json"Response (trimmed)
HTTP 200 (run 2026-10-30, no key; 278 KB, trimmed to the first item)
{"status":{"code":"200","text":"ok"},
"data":{"sumario":{
"metadatos":{"publicacion":"BOE","fecha_publicacion":"20261030"},
"diario":[{"numero":"270",
"sumario_diario":{"identificador":"BOE-S-2026-270", ...},
"seccion":[{"codigo":"1","nombre":"I. Disposiciones generales",
"departamento":[{"nombre":"MINISTERIO DE INDUSTRIA Y TURISMO",
"epigrafe":[{"nombre":"Ayudas","item":{
"identificador":"BOE-A-2026-22716",
"titulo":"Real Decreto 922/2026, de 28 de octubre, por el que se establecen las normas reguladoras de la concesión directa de anticipos reembolsables ...",
"url_pdf":{"texto":"https://www.boe.es/boe/dias/2026/10/30/pdfs/BOE-A-2026-22716.pdf", ...},
"url_html":"https://www.boe.es/diario_boe/txt.php?id=BOE-A-2026-22716", ...}}]}]}, ...]}]}}}Agent setup
Prompt to give your agent
Use the BOE open data API (no key; send the header Accept: application/json). Fetch today’s BOE summary from GET https://www.boe.es/datosabiertos/api/boe/sumario/{YYYYMMDD}. If it returns 404, there was no issue that day (the BOE does not publish on Sundays), so say so instead of guessing. List every item in section "I. Disposiciones generales" and in section V.A (public sector contracting) with its identifier, the department, a one-line English summary of the Spanish title, and the url_html link. Do not invent dates, amounts or legal effects that are not in the title, and remind me that only the signed PDF in the BOE is the official text.Agent / MCP-style tool snippet
// Tool definitions for Claude, OpenAI or any function-calling agent
[
{
"name": "boe_daily_summary",
"description": "Table of contents of Spain's official gazette (BOE) or the commercial register gazette (BORME) for one date. Read-only, no key. 404 means no issue that day.",
"input_schema": {
"type": "object",
"properties": {
"gazette": { "type": "string", "enum": ["boe", "borme"] },
"date": { "type": "string", "pattern": "^[0-9]{8}$", "description": "YYYYMMDD" }
},
"required": ["gazette", "date"]
}
},
{
"name": "boe_law_metadata",
"description": "Metadata of a consolidated Spanish law by BOE identifier, e.g. BOE-A-2018-16673. Consolidated texts are informative, not official.",
"input_schema": {
"type": "object",
"properties": { "id": { "type": "string" } },
"required": ["id"]
}
}
]
// Implementation (send Accept: application/json):
// GET https://www.boe.es/datosabiertos/api/{gazette}/sumario/{date}
// GET https://www.boe.es/datosabiertos/api/legislacion-consolidada/id/{id}/metadatosFit and safety
Good for
- A daily digest of new Spanish laws, decrees and grants for a compliance agent
- Watching the BORME for company formations, appointments or dissolutions
- Looking up the current consolidated version and status of a Spanish law
Watch out
- Do not present results as the official text. The reuse conditions say only the electronic editions of the BOE and BORME are official and authentic, and consolidated laws must be labelled as informative only.
- Do not expect English. Titles, sections and law texts come back in Spanish, so plan for translation and keep the original wording next to it.
- Do not hammer it with bulk crawls. AEBOE publishes no rate limit, so pace requests and cache each day’s summary, which does not change once published.
- Do not republish personal data carelessly. Appointments and BORME entries name real people, and the reuse terms require GDPR and Spanish data-protection compliance.
- Do not use it for tender search across the EU. Section V.A only lists Spanish contracting notices published in the BOE; use the TED API for EU-wide tenders.
Alternatives
| TED Search API | The EU’s free, keyless API for public tenders from every member state, including Spain. |
| FinancialFilings MCP | Company annual and interim reports from 60 markets, to go beyond the BORME’s register notices. |
| SEC EDGAR API | Another free, keyless government API, for U.S. company filings. |
| Wikipedia REST API | Free, keyless background on Spanish institutions and laws in many languages. |
FAQ
Does the BOE API need an API key?
No. The BOE open data API is free and keyless; send GET requests to https://www.boe.es/datosabiertos/api/ with an Accept header for JSON or XML.
What is the BOE API rate limit?
AEBOE does not publish one, and responses carry no rate-limit headers. Cache daily summaries and pace bulk requests.
Can I use BOE data commercially?
Yes. AEBOE’s reuse conditions allow commercial and non-commercial reuse if you cite the source with a link to www.boe.es, do not distort the meaning and do not imply the data is official or endorsed.
Why does the BOE summary return 404?
There was no issue that day. The BOE is published every day except Sunday, so a Sunday date returns 404 “La información solicitada no existe”.
Compare
Put BOE Open Data API (Spain’s official gazette) side by side with other free agent tools on keys, limits, MCP support, licensing and CORS. Open the comparison grid →
SourcesFootnotes
- 1boe.es/datosabiertos/api/api.phpVerified 2026-10-30
- 2boe.es/datosabiertos/api/boe/sumario/20261030Tested 2026-10-30
- 3boe.es/informacion/aviso_legal/index.phpVerified 2026-10-30
- 4boe.es/datosabiertos/documentos/APIsumarioBOE.pdfVerified 2026-10-30
- 5boe.es/datosabiertos/faq/boe.phpVerified 2026-10-30
- 6boe.es/datosabiertos/faq/consolidada.phpVerified 2026-10-30