Setup
Basic query
Fetch spot price (indicator 600) for January 2025:DatetimeIndex.
Filter by geography
Usegeo_ids to request only specific countries:
Powered by Mintlify
Auto-generate your docs
Fetch time-series data for any indicator with automatic caching
from esios import ESIOSClient
client = ESIOSClient()
handle = client.indicators.get(600)
df = handle.historical("2025-01-01", "2025-01-31")
df
Portugal Francia España Alemania Bélgica Países Bajos
datetime
2025-01-01 00:00:00+01:00 134.49 12.36 134.49 2.16 10.62 13.62
...
[2976 rows × 6 columns]
DatetimeIndex.
geo_ids to request only specific countries:
spain_id = handle.resolve_geo("España")
print(f"España geo_id: {spain_id}")
España geo_id: 3
df_spain = handle.historical("2025-01-01", "2025-01-07", geo_ids=[spain_id])
df_spain
España
datetime
2025-01-01 00:00:00+01:00 134.49
...
[672 rows × 1 columns]
# Daily average price
df_daily = handle.historical(
"2025-01-01", "2025-01-31",
time_trunc="day",
)
df_daily.head()
df.to_csv("spot_prices_2025_01.csv")