IEA · Data
iea-org/energy/dataSearch public records with IEA · Data from Alexandria through one Spiral API key. Data. It runs in the background and returns structured JSON. Pay as you go, with no subscription.
Pricing
$0.00873 per call.
Limits
- Runs
- In the background
- Returns
- json
- Longest queue wait
- 1 hour
- Run deadline
- 5 minutes
- Longest run, end to end
- 225 minutes
- Largest inline input
- 1 MB
- Largest input file
- 2 GB
- Largest output
- 5 GB
Input
| Field | Kind | Default | Description |
|---|---|---|---|
countries required | list | — | Required in practice: ISO3 codes (FRA), ISO2, IEA names (France, People's Republic of China), stats codes (FRANCE, WORLD, OECDTOT, CHINAREG) or aggregate short names (EU27, OECD, IEA, World). |
dataset_id required | text | — | Pattern: ^[a-z0-9-]+$. |
flows | list | — | Stats flow codes (TES, TFC, INDPROD, IMPORTS, EXPORTS, TOTIND, TOTTRANS, RESIDENT, ...; CO2: CO2FUEL, ELECHEAT, TOTTRANS, TOTIND, RESIDENT, ...) or price sectors (RESID, IND, TRANS, COMM, ELGEN). Not for MES. |
cursor | text | — | next_cursor from the previous page of the same query; maximum offset 200000. |
year_to | number 1960 to 2100 | — | year_to |
products | list | — | Stats product codes (TOTAL, COAL, NATGAS, ELECTR, MTOTOIL, COMRENEW, GEOTHERM, HEAT, TOTPRODS; CO2: COAL, OIL, GAS, OTHER, TOTAL), MES product names (Wind, Solar, Nuclear, Hydro, Coal, Natural gas, Net electricity production, ...) or price product codes (ELECTR, NATGAS, GASOLINE, DIESEL, LPG, KEROSENE, RESFUEL, COAL). |
frequency | one of A, M | — | Must match the dataset (annual highlights: A; monthly electricity statistics and monthly oil prices: M). |
page_size | number 1 to 1000 | 20 | page_size |
year_from | number 1960 to 2100 | — | year_from |
indicators | list | — | Data-browser indicators per dataset (see |
Same request in code
curl https://api.spiral.ai/v1/runs \
-H "Authorization: Bearer $SPIRAL_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"provider": "alexandria",
"model": "iea-org/energy/data",
"input": {
"countries": [
"<countries>"
],
"dataset_id": "<dataset_id>"
}
}'Frequently asked questions
How much does IEA · Data cost?
$0.00873 per call. You pay as you go from one Spiral balance, with no subscription, and a failed run is not charged.
How do I use IEA · Data through an API?
Send `POST /v1/runs` with `"provider": "alexandria"`, `"model": "iea-org/energy/data"` and the input fields on this page, using one Spiral API key. It runs in the background: poll the run, or name a webhook to be told when it finishes.
Do I need an account with Alexandria to use IEA · Data?
No. Spiral runs it on its own Alexandria account and charges your Spiral balance.
Can my AI agent use IEA · Data?
Yes. Agents find and run it through Spiral's MCP server, CLI or agent skill, with the same API key.