Spiral gives your agent every tool with one account. Browse the tools →

AlexandriaFinanceAvailable now

US Energy Information Administration · Data

eia-gov/energy-data/data

Get 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

FieldKindDefaultDescription
route requiredtext—

Route path with data, such as petroleum/pri/spt (do not append /data). Pattern: ^/?[a-z0-9_-]+(/[a-z0-9_-]+)*/?$.

frequency requiredtext—

Frequency id from the route metadata: annual, quarterly, monthly, weekly, daily, hourly or local-hourly. Pattern: ^[a-z-]+$.

endtext—

Inclusive last period in the frequency's format.

sortJSON—

Sort keys applied by the API. Defaults to newest period first.

starttext—

Inclusive first period in the frequency's format.

cursortext—

next_cursor from the previous page (a row offset). Omit for the first page. Pattern: ^[0-9]{1,12}$.

facetsJSON—

Facet filters: facet id to list of codes, e.g. {"series": ["RWTC"]} or {"stateid": ["CA"], "sectorid": ["RES"]}.

api_keytext—

Registered EIA API key. Omitted, the public data-browser key is discovered live (see routes). Pattern: ^[A-Za-z0-9_]+$.

page_sizenumber
1 to 5000
20

Rows per page; the API caps a page at 5000 rows.

data_columnslist—

Data columns to return, from the route's data_columns. Defaults to ["value"].

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.