# US Energy Information Administration · 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.

- Provider: Alexandria
- Category: Finance
- Runs: In the background
- Returns: json
- Tool id: `alexandria` / `eia-gov/energy-data/data`
- Page: https://spiral.ai/tools/alexandria/eia-gov/energy-data/data

## Pricing

$0.00873 per call.

## Limits

- 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 | Allowed | Default | Description |
| --- | --- | --- | --- | --- |
| `route` (required) | text |  | — | Route path with data, such as `petroleum/pri/spt` (do not append `/data`). Pattern: ^/?[a-z0-9_-]+(/[a-z0-9_-]+)*/?$. |
| `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 |  | — | `next_cursor` from the previous page (a row offset). Omit for the first page. Pattern: ^[0-9]{1,12}$. |
| `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 `routes`). Pattern: ^[A-Za-z0-9_]+$. |
| `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 `data_columns`. Defaults to ["value"]. |

## Example

```bash
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>"
    }
  }'
```

Try it in the Playground: https://spiral.ai/start?provider=alexandria&model=eia-gov%2Fenergy-data%2Fdata

## Common questions

### US Energy Information Administration · Data

**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.

