# BOE — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Access Spain's official government publications to retrieve daily legislative summaries, browse consolidated laws, and view detailed legal documents with their full text and metadata. Stay informed about new regulations and find specific legislation through comprehensive search and retrieval of official state gazette content.

**Category:** Government & Public Data | **Website:** [boe.es/](https://boe.es/) | **Docs:** [parse.bot/marketplace/e8f028c1-7141-4da6-bc80-33ededf0eef2/boe-es-api](https://parse.bot/marketplace/e8f028c1-7141-4da6-bc80-33ededf0eef2/boe-es-api)

Pay-per-use API proxy. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-boe-es-api-e8f028c1/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_auxiliary_data

Retrieve auxiliary classification codes used in the BOE system. Returns a flat dictionary mapping numeric code strings to descriptive name strings. Available types: 'rangos' (law types like Ley, Real Decreto), 'departamentos' (ministries and departments), 'materias' (subject matter categories).

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `type` | string | No | Type of auxiliary data to retrieve. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-boe-es-api-e8f028c1/get_auxiliary_data \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"type":"<string>"}'
```

### get_consolidated_legislation_list

Retrieve the complete list of consolidated legislation entries currently maintained in the BOE system. Each entry includes identifier, title, dates, scope, department, and links. The list is sorted by most recently updated. No pagination — returns the full list in one response.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-boe-es-api-e8f028c1/get_consolidated_legislation_list \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_daily_summary

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.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `date` | string | Yes | Publication date in YYYYMMDD format (e.g. 20260513). Must be a date when the BOE published (typically weekdays). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-boe-es-api-e8f028c1/get_daily_summary \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"date":"<string>"}'
```

### get_law_details

Retrieve full metadata, analytical data (subject matters, cross-references to other laws), and ELI metadata for a specific consolidated law. The response includes metadatos (identification, dates, scope), analisis (materias and referencias anteriores/posteriores), and texto section headers. Use identifiers from get_consolidated_legislation_list or get_daily_summary.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `id` | string | Yes | BOE identifier for a consolidated law (e.g. BOE-A-2015-9140). Obtain from get_consolidated_legislation_list results or get_daily_summary items. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-boe-es-api-e8f028c1/get_law_details \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"id":"<string>"}'
```

### get_law_text

Retrieve the structured full text of a consolidated law. Returns the content organized by blocks (bloque array) with types such as preambulo, encabezado, articulo, seccion, and nota_inicial. Each block contains versioned paragraphs with their publication and vigencia dates.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `id` | string | Yes | BOE identifier for a consolidated law (e.g. BOE-A-2015-9140). Obtain from get_consolidated_legislation_list results or get_daily_summary items. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-boe-es-api-e8f028c1/get_law_text \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"id":"<string>"}'
```
