python-esios and make your first API call.
Install the library
Set your API key
Get a free API key from ESIOS (login required). Set it as an environment variable:Create the client
List available indicators
The ESIOS API exposes ~2000 indicators covering electricity prices, generation, demand, and more.Fetch historical data
Let’s get the spot price (indicator 600) for one week:- A timezone-aware
DatetimeIndex(Europe/Madrid) - One column per geography (country)
- Values in €/MWh
