Retrieve ZIP and XLS archives with automatic caching and date-range iteration
ESIOS provides downloadable archives containing bulk data exports, settlement files, and raw market data. This guide shows you how to download and manage these files.
from esios import ESIOSClientclient = ESIOSClient(token="your_api_key")# Use local catalog (153 archives including I90, settlements)archives = client.archives.list(source="local")print(f"Total archives: {len(archives)}")print(archives.head())# Use API catalog (~24 archives)archives_api = client.archives.list(source="api")print(f"API archives: {len(archives_api)}")
The local catalog includes I90 settlement files (archive ID 34) and other critical archives not returned by the API.
Most archives are ZIP files that are automatically extracted:
handle = client.archives.get(42) # Example ZIP archivefiles = handle.download(date="2024-01-15")# 'files' contains paths to extracted contentsfor f in files: if f.suffix == ".csv": import pandas as pd df = pd.read_csv(f) print(df.head())
handle = client.archives.get(34)files = handle.download( start="2024-01-01", end="2024-01-31")# If Jan 15 fails (API error), the library logs a warning and continues# You'll get files for all successful datesprint(f"Successfully downloaded {len(files)} files")