US Energy Information Administration · Data
eia-gov/energy-data/dataGet market and financial data with US Energy Information Administration · Data from Alexandria through one Spiral API key. One page of observations from an EIA route (<route>/data) at a frequency, filtered by facet codes and a period range, sorted, with offset pagination up to 5000 rows per page. 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 |
|---|---|---|---|
route required | text | — | Route path with data, such as |
frequency required | text | — | Frequency id from the route metadata: annual, quarterly, monthly, weekly, daily, hourly or local-hourly. Pattern: ^[a-z-]+$. |
end | text | — | Inclusive last period in the frequency's format. |
sort | JSON | — | Sort keys applied by the API. Defaults to newest period first. |
start | text | — | Inclusive first period in the frequency's format. |
cursor | text | — |
|
facets | JSON | — | Facet filters: facet id to list of codes, e.g. {"series": ["RWTC"]} or {"stateid": ["CA"], "sectorid": ["RES"]}. |
api_key | text | — | Registered EIA API key. Omitted, the public data-browser key is discovered live (see |
page_size | number 1 to 5000 | 20 | Rows per page; the API caps a page at 5000 rows. |
data_columns | list | — | Data columns to return, from the route's |
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": "eia-gov/energy-data/data",
"input": {
"route": "<route>",
"frequency": "<frequency>"
}
}'Frequently asked questions
How much does US Energy Information Administration · 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 US Energy Information Administration · Data through an API?
Send `POST /v1/runs` with `"provider": "alexandria"`, `"model": "eia-gov/energy-data/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 US Energy Information Administration · Data?
No. Spiral runs it on its own Alexandria account and charges your Spiral balance.
Can my AI agent use US Energy Information Administration · Data?
Yes. Agents find and run it through Spiral's MCP server, CLI or agent skill, with the same API key.