catalog subcommand provides access to an offline catalog of indicators and archives. This allows you to browse metadata without making API calls.
Overview
The catalog provides:- Fast offline search — No API token required
- Enhanced metadata — Tags, notes, and curated descriptions
- Reference data — Units (magnitudes), time periods, geographies
- Catalog refresh — Update from the live API when needed
esios catalog refresh.
Commands
list indicators
List indicators in the offline catalog.QUERY— Optional filter by name (substring match)
list archives
List archives in the offline catalog.QUERY— Optional filter by name/description (substring match)
show indicator
Show detailed information for a single indicator.INDICATOR_ID— Indicator ID (required)
- Basic metadata (ID, name, short name)
- Curated notes and tags
- Resolved units (from magnitude_id)
- Resolved granularity (from time_period_id)
- Available geographies (geo_ids with names)
show archive
Show detailed information for a single archive.ARCHIVE_ID— Archive ID (required)
refresh
Refresh the catalog from the live ESIOS API.--dry-run— Preview changes without writing files (flag)--token, -t TEXT— API token (or use env:ESIOS_API_KEY)
- Fetches the latest indicator and archive lists from ESIOS API
- Compares with existing catalog
- Shows added/updated/removed entries
- Updates catalog files (unless
--dry-run)
Catalog Structure
The catalog consists of several components:Indicators Catalog
File:esios/catalog/data/indicators.json
Contains:
- Indicator ID, name, short_name
- Tags for categorization (price, demand, generation, etc.)
- Notes with context and usage tips
- References to magnitude_id, time_period_id, geo_ids
Archives Catalog
File:esios/catalog/data/archives.json
Contains:
- Archive ID, name, description
- Horizon (daily, monthly, yearly)
- Archive type (xlsx, csv, zip)
- Notes about structure and usage
Reference Data
Files:magnitudes.json— Units (MW, €/MWh, GWh, etc.)time_periods.json— Granularities (hourly, daily, monthly)geos.json— Geography mappings (geo_id → geo_name)
Common Workflows
Discover Available Indicators
Browse Archives
Offline Search
Update Catalog
Tags and Categories
Indicators are tagged for easy discovery:- price — Market prices (spot, intraday, etc.)
- demand — Electricity demand and load
- generation — Power generation by source
- renewable — Renewable energy sources
- wind — Wind power
- solar — Solar power
- market — Market operations
- forecast — Forecasted values
- system — System operations
Catalog vs Live API
| Feature | Catalog | Live API |
|---|---|---|
| Authentication | No token required | Requires API token |
| Speed | Instant | 1-2s per request |
| Data freshness | Periodic refresh | Always current |
| Metadata | Enhanced (tags, notes) | Basic |
| Search | Offline | Online |
| Use case | Discovery, exploration | Data fetching |
- Discover with catalog (no token needed)
- Fetch data with live API (token required)
Reference Data Resolution
The catalog automatically resolves IDs to human-readable values:Magnitudes (Units)
magnitude_id: 1→MWmagnitude_id: 23→€/MWhmagnitude_id: 45→GWh
Time Periods (Granularity)
time_period_id: 1→Hourlytime_period_id: 2→Dailytime_period_id: 3→Monthly
Geographies
geo_id: 3→Españageo_id: 8001→Portugalgeo_id: 8741→France
Catalog Maintenance
When to Refresh
Refresh the catalog when:- New indicators are added to ESIOS
- Metadata changes (names, descriptions)
- You want the latest archive information
- After major ESIOS API updates
How Often to Refresh
- Development: Refresh when needed
- Production: Refresh monthly or when notified of changes
- CI/CD: Include in automated update workflows
Automated Refresh
Troubleshooting
Indicator Not Found
Empty Catalog
If the catalog appears empty, it may need initialization:Refresh Fails
See Also
- Indicators — Fetch indicator data using IDs from catalog
- Archives — Download archives using IDs from catalog
- Cache — Catalog data is separate from API cache
- Config — Set API token for catalog refresh
