# Spain Daily Electricity Demand (REE)

> Spain Daily Electricity Demand (REE) is a paid API for AI agents from api.vextorium.com, paid per call via x402, $0.003/call, status unknown (last checked 2026-10-20).

Returns daily electricity demand in Spain (MWh) for the last N days, including average, peak, low days, and trend versus the previous half of the period, sourced from Red Eléctrica de España.

## Facts

- Endpoint: POST https://api.vextorium.com/demanda-electrica-espana-pago?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-20
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/spain-daily-electricity-demand-ree-ca2e48ad
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap__omSFmGpDEKIwx5fJBkoJ

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-daily-electricity-demand-ree-ca2e48ad -d '<json body>'
```

Example prompt: Can you pull Spain's daily electricity demand data for the last 14 days and tell me which day had the highest and lowest consumption, the average, and whether demand went up or down in the second half of the period?

## When to prefer this

Choose this endpoint when you need official Spanish national electricity demand statistics sourced directly from Red Eléctrica de España (REE), with built-in aggregations (average, peak, trough) and a trend signal (second-half vs first-half change). Prefer it over raw energy databases when you want pre-summarized daily MWh data for Spain specifically, without needing to aggregate raw meter readings yourself.

## Known failure modes

- Invalid 'dias' value outside 2-365 range returns an error
- REE upstream data unavailable or delayed may return incomplete series
- Missing or malformed request body returns a validation error
- Days parameter as non-integer causes schema validation failure

## How this service works

Daily electricity demand in Spain (MWh) for the last N days with average, peak and low days and change versus the previous half of the period. Red Electrica de Espana data.

## Output

A JSON object containing: the date range (desde/hasta), a daily series of dates and MWh values, the peak day and its MWh, the minimum day and its MWh, the average MWh across the period, the percentage change comparing the second half of the period to the first half, and the data source (Red Eléctrica de España).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "dias": {
   "type": "integer",
   "description": "Days (2-365, default 30)"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "desde": "2026-09-18",
  "hasta": "2026-10-01",
  "serie": [
   {
    "dia": "2026-09-18",
    "mwh": 723105.8
   },
   {
    "dia": "2026-09-19",
    "mwh": 638967.2
   },
   {
    "dia": "2026-09-20",
    "mwh": 602822.9
   },
   {
    "dia": "2026-09-21",
    "mwh": 717050.7
   },
   {
    "dia": "2026-09-22",
    "mwh": 727375.9
   },
   {
    "dia": "2026-09-23",
    "mwh": 738151.2
   },
   {
    "dia": "2026-09-24",
    "mwh": 741106.3
   },
   {
    "dia": "2026-09-25",
    "mwh": 744997
   },
   {
    "dia": "2026-09-26",
    "mwh": 655146.7
   },
   {
    "dia": "2026-09-27",
    "mwh": 610866.7
   },
   {
    "dia": "2026-09-28",
    "mwh": 722638.2
   },
   {
    "dia": "2026-09-29",
    "mwh": 727576.9
   },
   {
    "dia": "2026-09-30",
    "mwh": 739326.1
   },
   {
    "dia": "2026-10-01",
    "mwh": 722082.7
   }
  ],
  "fuente": "Red Eléctrica de España (REE), sistema nacional",
  "maximo": {
   "dia": "2026-09-25",
   "mwh": 744997
  },
  "minimo": {
   "dia": "2026-09-20",
   "mwh": 602822.9
  },
  "media_mwh": 700801,
  "cambio_segunda_mitad_pct": 0.7
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/spain-daily-electricity-demand-ree-ca2e48ad/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.vextorium.com](https://www.zero.xyz/host/api.vextorium.com/llms.txt)
