@pipeworx/eia

Connect: https://gateway.pipeworx.io/eia/mcp · Install: one-click buttons

Tools: 5

The official US energy data: petroleum, natural gas, electricity, coal, renewables, nuclear, total energy, international energy. Production, consumption, prices, reserves, imports/exports — at national, state, and (for electricity) plant level. Free, requires a free API key.

Why this matters for AI agents

For energy questions — “what’s the price of natural gas?”, “how much electricity comes from solar?”, “are gasoline prices rising?” — EIA is the source. Government-grade data, no commercial markup. Pair with FRED for energy-related macro indicators and NOAA for energy-relevant weather context.

Common flows:

  • Spot prices. “What’s WTI crude trading at?” → crude oil spot price series.
  • State electricity mix. “What % of California electricity is solar?” → state-level generation by source.
  • Retail gasoline. “Average price for a gallon last week?” → weekly retail prices.
  • Natural gas storage. “How much working gas in storage?” → weekly EIA-915 reports.

Auth

EIA Open Data API requires a free key from https://www.eia.gov/opendata/register.php. Pass via _apiKey. Generous rate limits.

Major datasets

DatasetCadenceUse
Petroleum & Other LiquidsWeekly / monthlyCrude oil prices, gasoline, distillates, OPEC
Natural GasWeekly storage, monthly productionPricing, storage, consumption
ElectricityMonthlyGeneration by fuel, retail rates by state
CoalMonthly / annualMining, prices, exports
Renewable & Alternative FuelsMonthlySolar, wind, biofuels, electric vehicle charging
Total Energy / Annual Energy OutlookAnnualLong-term forecasts

Series IDs

EIA series follow dataset_id.frequency.region.product patterns. Examples:

  • PET.RWTC.D — WTI crude, daily
  • NG.RNGC1.D — Natural gas Henry Hub, daily
  • ELEC.GEN.SUN-CA-99.M — California solar generation, monthly
  • PET.EMM_EPMR_PTE_NUS_DPG.W — US weekly average regular gasoline price

Use the eia_search tool to find IDs rather than constructing them manually.

Common pitfalls

  • Reporting lag varies. Petroleum prices update weekly with ~3-day lag. Electricity generation is monthly with ~2-month lag. Don’t assume “current” matches across datasets.
  • Heat content vs volume. Natural gas reported in BCF (billion cubic feet), MMcf, and energy units (BTU, MMBtu). Conversions matter for cross-fuel comparison.
  • Net vs gross generation. Power-plant generation has subtle definitions. “Net” subtracts plant-internal use. EIA mostly publishes net. Don’t double-count.
  • State electricity by primary mover. EIA’s state-level mix is by primary mover (steam turbine, combined cycle, etc.) AND fuel — same plant can have multiple categorizations. Aggregate to the level your question requires.
  • Forecasts are scenarios. AEO (Annual Energy Outlook) is a reference-case projection plus side-cases. Don’t treat reference case as “what will happen.”
  • No market-real-time prices. EIA spot prices are official end-of-day; for intra-day market prices you need a commercial feed, not EIA.

Tools

  • eia_series — Search EIA for any energy data series by route path. Returns historical data points with timestamps and values. Use for specific energy metrics not covered by category tools.
  • eia_petroleum — Get petroleum prices (gasoline, diesel, crude oil) and stock levels by region. Returns time series with prices, volumes, and regional breakdowns.
  • eia_natural_gas — Get natural gas prices, production, consumption, and storage by US region. Returns time series for supply, demand, and inventory metrics.
  • eia_electricity — Get electricity generation by fuel source, retail sales, and prices by region. Returns time series for supply and pricing data.
  • eia_ethanol — Get fuel ethanol production volumes, stocks, and imports. Returns time series for ethanol supply chain metrics.

Tools

  • eia_electricity — Get electricity generation by fuel source, retail sales, and prices by region. Returns time series for supply and pricing data.
  • eia_ethanol — Get fuel ethanol production volumes, stocks, and imports. Returns time series for ethanol supply chain metrics.
  • eia_natural_gas — Get natural gas prices, production, consumption, and storage by US region. Returns time series for supply, demand, and inventory metrics.
  • eia_petroleum — Get petroleum prices (gasoline, diesel, crude oil) and stock levels by region. Returns time series with prices, volumes, and regional breakdowns.
  • eia_series — Search EIA for any energy data series by route path. Returns historical data points with timestamps and values. Use for specific energy metrics not covered by category tools.

Regenerated from source · build May 9, 2026