Spain publishes generously, but through an API whose entire structure is a catalogue of numbered indicators. Once you know which number you want, everything is easy. Finding the number is the work.
Red Eléctrica (REE) is the transmission system operator and runs ESIOS, the data system. OMIE is the market operator for the Iberian day-ahead and intraday markets, covering Spain and Portugal together as MIBEL.
Almost everything operational comes from Red Eléctrica; prices and matched volumes come from OMIE.
The same guide in Spanish, with operator names and report titles as they appear in the original documentation: API de ESIOS y datos del mercado eléctrico español.
| Source | Access | Best for |
|---|---|---|
ESIOSapi.esios.ree.es | Personal token, requested by e-mail | The full catalogue — thousands of indicators covering prices, balancing, capacity, demand, restrictions. |
apidatosapidatos.ree.es | Open, no token | Clean aggregated series — demand, generation mix, emissions, exchanges. What you want for dashboards. |
OMIEomie.es | Open file downloads | Day-ahead and intraday market results for Spain and Portugal, including aggregate supply and demand curves. |
Start with apidatos. Move to ESIOS when you hit something it does not carry — which happens as soon as you need balancing or settlement detail.
Access is free but manual: you e-mail consultasios@ree.es asking for a personal token, and it arrives by reply. There is no self-service signup. The token goes in a header, not a query parameter.
GET https://api.esios.ree.es/indicators/600
?start_date=2026-09-15T00:00&end_date=2026-09-16T00:00
Accept: application/json; application/vnd.esios-api-v1+json
x-api-key: {TOKEN}/prices/day-ahead — you request /indicators/{id}. Fetch /indicators once, store the catalogue locally and search it by name. Without that, you will be guessing numbers from forum posts.Spain and Portugal form a coupled market, MIBEL, operated by OMIE. Prices are usually identical across the border and diverge only when the interconnection is constrained. If you model Spain alone and ignore Portugal, most of the time you are right — and the times you are wrong are exactly the interesting ones.
After the day-ahead market clears, REE runs a restrictions process that redispatches units for grid reasons, and the result changes who actually generates. Market-clearing schedules and final programmes differ, and both are published. Use the final programme (P48) when you want what happened; use the market result when you want what cleared.
The Spanish duck curve is the deepest in Europe. Midday prices reach zero or negative regularly, and the evening ramp is steep. Any model trained on northern European shapes will be wrong here in both directions.
time_trunc parameter and returns a geo breakdown you usually do not want — filter to peninsular Spain unless you deliberately need the islands.10YES-REE------0; see our ENTSO-E API guide if you want it in the same shape as other zones.Indicator catalogues, token handling, island filtering, MIBEL coupling — we have built Spanish market integrations and know where the traps are. If you need this data flowing reliably, talk to us.
Get in touch