[Integrations](https://spiral.ai/integrations) › [n8n](https://spiral.ai/integrations/n8n) › [EIA dataset directory](https://spiral.ai/integrations/n8n/eia-dataset-directory)

# How to Use EIA dataset directory in n8n

Explore EIA datasets and their metadata, including available frequencies, filters, measurement columns, and units. Use it to find the right dataset and understand its coverage before requesting observations.

|  |  |
| --- | --- |
| Model | EIA dataset directory |
| Available through | Alexandria |
| Category | Finance |
| Price | $0.00873 per call. |
| Returns | json |
| Runs | In the background |
| Setup | About 2 minutes, with a Spiral API key |

## Prompts to try with EIA dataset directory in n8n

- Each month, use EIA dataset directory to review the dataset for Texas monthly electricity generation. Report changes in its available measurements, units, or date coverage.
- Every Monday at 9am: use EIA dataset directory to look this up and give me the result as a table.
- Pull the latest numbers from EIA dataset directory and tell me what changed since last week.
- Check EIA dataset directory and summarize what you find in three bullet points.
- Pull the newest data from EIA dataset directory and give me the result as a table.

## How to set up EIA dataset directory in n8n

Pick the way that suits you. Each takes about two minutes.

### Use the Spiral skill

1. **Send n8n this message**: Your agent reads Spiral's skill and sets itself up.

```
set up https://spiral.ai/SKILL.md
```

2. **Sign in or paste a key**: Approve Spiral in the browser, or give the agent a key from the console.

### Use Spiral's MCP server

1. **Create a key**: Create a key under API keys in the console.

2. **Add an MCP Client node**: In a workflow, add an MCP Client node (or, under an AI Agent node, an MCP Client Tool) and set:

```text
https://api.spiral.ai/mcp
```

3. **Pick a tool**: The node lists Spiral's tools. In an MCP Client node pick one, such as `run`, and give it its arguments:

```json
{
  "provider": "fal",
  "model": "fal-ai/flux/schnell",
  "input": { "prompt": "a lighthouse at dawn" },
  "wait": true
}
```

4. **Run EIA dataset directory in a workflow step**: Give the step an instruction like the ones below and run it on your trigger or schedule. Spiral finds EIA dataset directory, prices it and runs it each time the step fires.

### Use the Spiral CLI

1. **Install and sign in**: Installs the Spiral CLI, signs you in and adds its skill to your coding agents.

```bash
npx -y spiral-cli@latest init
```

### Call the Spiral API

1. **Create an API key**: In the console, under API keys.

2. **Run EIA dataset directory**: One request; the result comes back by polling or a webhook.

```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/routes",
    "input": {
      "path": "<path>"
    }
  }'
```

Then paste one of the prompts above: n8n finds EIA dataset directory on Spiral, shows the price and runs it.

Setup guide in the docs: https://spiral.ai/docs/quickstarts/n8n

## EIA dataset directory tools and prices

- [US Energy Information Administration · Routes](https://spiral.ai/tools/alexandria/eia-gov/energy-data/routes) (Alexandria): $0.00873 per call.

## Settings you can ask for

| Setting | Allowed values | Default | Description |
| --- | --- | --- | --- |
| cursor |  | — | `next_cursor` from a previous page of child routes. Pattern: ^[0-9]{1,12}$. |
| api_key |  | — | Registered EIA API key (free at https://www.eia.gov/opendata/register.php). Omitted, the workflow discovers live the public client key EIA serves inside its own data browser (two extra requests, shared quota) and falls back to api.data.gov's DEMO_KEY (10 requests/hour/IP) with a warning. Pattern: ^[A-Za-z0-9_]+$. |
| page_size | 1 to 1000 | 500 | Child routes per page (the API returns all children at once; pages are cut here). |

## What can you do with EIA dataset directory in n8n?

Maintain a recurring briefing on electricity use or natural gas storage with EIA data. The agent can check dataset coverage and category labels, then compare newly available observations with earlier periods.

### Compare state electricity consumption

Find the retail sales dataset, resolve state and customer-sector codes, and compare monthly residential electricity sales in California, Texas, and Florida over the same period.

### Compare commercial and industrial demand for electricity

Identify the retail sales measurements and sector labels, then compare commercial and industrial electricity sales in Ohio. Calculate each sector's year-over-year change.

### Measure changes in a state's generation mix

Locate monthly generation by state and fuel, resolve the fuel categories, and calculate how Texas generation shares changed between 2023 and 2024.

### Review power plant operating history

Find the plant generation dataset and the code for Palo Verde, then compare monthly generation across 2023 and 2024 to identify seasonal changes.

### Check grid demand forecasts against reported demand

Locate hourly balancing-authority measurements and resolve PJM's reporting code. Compare reported demand with demand forecasts for a completed week and calculate the largest hourly differences.

### Compare seasonal natural gas storage

Find weekly underground storage data and its regional categories, then compare working gas levels for the same weeks in successive years.

## Overview

- [Alexandria](https://spiral.ai/providers/alexandria)
- [All n8n guides](https://spiral.ai/integrations/n8n)

## EIA dataset directory in other agents

- [Amp](https://spiral.ai/integrations/amp/eia-dataset-directory)
- [ChatGPT](https://spiral.ai/integrations/chatgpt/eia-dataset-directory)
- [Claude](https://spiral.ai/integrations/claude-desktop/eia-dataset-directory)
- [Claude Code](https://spiral.ai/integrations/claude-code/eia-dataset-directory)
- [Cline](https://spiral.ai/integrations/cline/eia-dataset-directory)
- [Codex](https://spiral.ai/integrations/codex/eia-dataset-directory)
- [Cursor](https://spiral.ai/integrations/cursor/eia-dataset-directory)
- [Devin](https://spiral.ai/integrations/devin/eia-dataset-directory)
- [dots](https://spiral.ai/integrations/dots/eia-dataset-directory)
- [Factory Droid](https://spiral.ai/integrations/factory-droid/eia-dataset-directory)
- [Gemini](https://spiral.ai/integrations/gemini/eia-dataset-directory)
- [Gemini CLI](https://spiral.ai/integrations/gemini-cli/eia-dataset-directory)
- [Google Antigravity](https://spiral.ai/integrations/antigravity/eia-dataset-directory)
- [goose](https://spiral.ai/integrations/goose/eia-dataset-directory)
- [Grok](https://spiral.ai/integrations/grok/eia-dataset-directory)
- [Grok Build](https://spiral.ai/integrations/grok-build/eia-dataset-directory)
- [Hermes](https://spiral.ai/integrations/hermes/eia-dataset-directory)
- [Instinct](https://spiral.ai/integrations/instinct/eia-dataset-directory)
- [Manus](https://spiral.ai/integrations/manus/eia-dataset-directory)
- [Muse](https://spiral.ai/integrations/muse/eia-dataset-directory)
- [Muse Code](https://spiral.ai/integrations/muse-code/eia-dataset-directory)
- [Notion](https://spiral.ai/integrations/notion/eia-dataset-directory)
- [OpenClaw](https://spiral.ai/integrations/openclaw/eia-dataset-directory)
- [opencode](https://spiral.ai/integrations/opencode/eia-dataset-directory)
- [Perplexity](https://spiral.ai/integrations/perplexity/eia-dataset-directory)
- [Raycast](https://spiral.ai/integrations/raycast/eia-dataset-directory)
- [VS Code](https://spiral.ai/integrations/vscode/eia-dataset-directory)
- [Windsurf](https://spiral.ai/integrations/windsurf/eia-dataset-directory)
- [Zapier](https://spiral.ai/integrations/zapier/eia-dataset-directory)

## More n8n guides

- [ECB exchange rates](https://spiral.ai/integrations/n8n/ecb-exchange-rates)
- [EIA dataset filter codes](https://spiral.ai/integrations/n8n/eia-dataset-filter-codes)
- [ECB economic time series](https://spiral.ai/integrations/n8n/ecb-economic-time-series)
- [EIA energy observations](https://spiral.ai/integrations/n8n/eia-energy-observations)
- [ECB dataset search](https://spiral.ai/integrations/n8n/ecb-dataset-search)
- [EODHD IPO calendar](https://spiral.ai/integrations/n8n/eodhd-ipo-calendar)

## Questions about EIA dataset directory in n8n

**Can n8n use EIA dataset directory?**

Yes. Add Spiral to n8n as an MCP server, and n8n can find and run EIA dataset directory like any built-in tool.

**How much does EIA dataset directory cost in n8n?**

$0.00873 per call. You pay from your Spiral balance as you go, with no subscription, and a failed run is not charged. Your n8n plan is separate.

**Do I need an Alexandria account to use EIA dataset directory in n8n?**

You need no Alexandria account. n8n uses one Spiral API key for every tool, and Spiral runs EIA dataset directory on its own Alexandria account.

**How long does it take to set up EIA dataset directory in n8n?**

About two minutes: create a key, then add an MCP Client node, then pick a tool.

**Does n8n wait while EIA dataset directory runs?**

EIA dataset directory runs in the background. n8n starts the run, checks on it and gives you the json when it's ready.

**What detail does EIA provide for electricity customers?**

EIA's retail sales dataset includes monthly customer counts, electricity sales, revenue, and average prices by state and customer sector.

**Does EIA update every dataset on the same schedule?**

No. EIA says its API accesses public-facing databases directly and updates constantly rather than at regular intervals.

**Can one response contain every matching observation?**

EIA caps observation responses at 5,000 rows. The total count can exceed the returned count, so larger requests need pagination or narrower filters.

**How far back does the hourly grid API go?**

EIA says historical EIA-930 submissions through the API begin January 1, 2019. This collection covers grid operations reported by balancing authorities in the Lower 48 states.

**Does hourly generation include rooftop solar?**

Hourly generation captures generators managed by, or visible to, balancing authorities. Those authorities typically do not meter distribution-system generators, so rooftop solar is often excluded.

