# Spain BOE Search

> Spain BOE Search is a paid API for AI agents from spain-agent-toolkit.spain-agent-toolkit.workers.dev, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-29).

Search the Spanish Official State Gazette (BOE) by keyword, date, and section to retrieve matching legislative and regulatory documents.

## Facts

- Endpoint: GET https://spain-agent-toolkit.spain-agent-toolkit.workers.dev/v1/es/boe/search?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-29
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/spain-boe-search-809fa097
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_YYyPmjEwZIMZM_6D9XILj

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability spain-boe-search-809fa097
```

Example prompt: Search today's BOE for any documents about 'contratos públicos' and give me the titles and PDF links for the first 20 results from section 1.

## When to prefer this

Choose this endpoint when you need to search Spain's official state gazette (BOE) for legislative, regulatory, or administrative documents by keyword, date, or section. It is ideal for compliance monitoring, legal research, tracking government policy changes, and retrieving direct PDF links to official Spanish law documents. Prefer this over general web search when you need authoritative, structured results from the official gazette rather than news articles or secondary sources.

## Known failure modes

- No results returned if no BOE was published on the requested date (e.g. Sundays)
- Empty result set if keywords don't match any documents in the specified date's issue
- Invalid section code returns no results or an error
- Date format errors if YYYYMMDD or YYYY-MM-DD is not followed
- Limit values outside 1–500 may be rejected or clamped
- Non-Spanish keywords may return fewer or no results due to accent-insensitive but language-specific full-text matching

## How this service works

Pay-per-call Spain utilities for AI agents over x402 (USDC). No accounts, no API keys. Public open data and offline computation only; nothing is stored.

## Output

A JSON object containing the publication date, total count of matching documents, and an array of items each with: a BOE document ID, the full document title, the BOE section code, the issuing department name, and a direct PDF URL for the official document.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [],
     "properties": {
      "q": {
       "type": "string",
       "description": "Keywords (Spanish works best, accent-insensitive, all terms must match)"
      },
      "date": {
       "type": "string",
       "description": "YYYYMMDD or YYYY-MM-DD. Defaults to today. No issue on Sundays."
      },
      "limit": {
       "type": "integer",
       "description": "Max items (1-500, default 100)"
      },
      "sections": {
       "type": "string",
       "description": "Comma-separated BOE section codes: 1,2B,3,4,5A,5B,5C"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "date": "20261021",
  "count": 1,
  "items": [
   {
    "id": "BOE-A-2026-21872",
    "pdf": "https://www.boe.es/boe/dias/2026/10/21/pdfs/BOE-A-2026-21872.pdf",
    "title": "Real Decreto-ley ...",
    "section": "1",
    "department": "JEFATURA DEL ESTADO"
   }
  ]
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/spain-boe-search-809fa097/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from spain-agent-toolkit.spain-agent-toolkit.workers.dev](https://www.zero.xyz/host/spain-agent-toolkit.spain-agent-toolkit.workers.dev/llms.txt)
