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

Grok · Finance

How to Use EIA dataset filter codes in Grok

Fetch the codes, names, and aliases available for a dataset filter, such as an electricity customer sector. Use it to select the right category before requesting observations.

Prompts to try with EIA dataset filter codes in Grok

Copy an example into Grok, or ask in your own words.

Use EIA dataset filter codes to list the customer sectors available for electricity retail sales in Ohio. Show each code with its readable label.

EIA dataset filter codesGrok
Try asking
  • Use EIA dataset filter codes to look this up and give me the result as a table.

  • Pull the latest numbers from EIA dataset filter codes and tell me what changed since last week.

  • Check EIA dataset filter codes and summarize what you find in three bullet points.

  • Pull the newest data from EIA dataset filter codes and give me the result as a table.

How to set up EIA dataset filter codes in Grok

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

Use the Grok connector

  1. Add a custom connector

    In Grok open Settings › Connect Apps, then Add a custom connector. Name it Spiral, paste this URL, leave Headers empty and click Add MCP.

    https://api.spiral.ai/mcp
  2. Sign in to Spiral and approve

    Grok opens Spiral: sign in, pick the organization and click Authorize. Spiral gives the connection its own API key; Grok never sees it, and you can remove the connection under Settings › Connected apps.

  3. Check that it is connected

    Connect Apps › Custom shows Spiral as Connected. It works in every Grok chat and Grok bot.

Use the Spiral skill

  1. Send Grok 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 the Spiral CLI

  1. Install and sign in

    Installs the Spiral CLI, signs you in and adds its skill to your coding agents.

    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 filter codes

    One request; the result comes back by polling or a webhook.

    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/facet_values",
        "input": {
          "route": "<route>",
          "facet_id": "<facet_id>"
        }
      }'

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

EIA dataset filter codes providers and prices

Spiral runs EIA dataset filter codes through Alexandria. Open a card for today's price, with every fee included.

AlexandriaFinance

What can you do with EIA dataset filter codes in Grok?

Compare electricity sales, generation, or gas storage in a sourced table. The agent can use EIA's dataset descriptions and category labels to explain which measurements support the comparison.

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.

Questions about EIA dataset filter codes in Grok

Can Grok use EIA dataset filter codes?

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

How much does EIA dataset filter codes cost in Grok?

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

Do I need an Alexandria account to use EIA dataset filter codes in Grok?

No. Spiral runs EIA dataset filter codes on its own Alexandria account. You sign in to Spiral once and never paste a key.

How long does it take to set up EIA dataset filter codes in Grok?

About two minutes: add a custom connector, then sign in to Spiral and approve, then check that it is connected.

Does Grok wait while EIA dataset filter codes runs?

EIA dataset filter codes runs in the background. Grok 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.

Get started

Start using EIA dataset filter codes in Grok

One Spiral account for every tool your agent needs. No subscription; you pay per run.

Paste this into Grok:

Set up Grok

set up https://spiral.ai/SKILL.md
Are you an AI agent? See setup options