Query electricity generation and retail price data from the EIA API v2

domain: api.eia.gov · 5 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Register at eia.gov to obtain a free API key; the key is passed as a query parameter named 'api_key' on every request.
  2. Browse the v2 route catalog at https://api.eia.gov/v2 (no key required) to discover available routes, facets, and frequency options for electricity data under the 'electricity' parent route.
  3. Construct a GET request such as GET https://api.eia.gov/v2/electricity/retail-sales/data/?frequency=monthly&data[0]=price&facets[sectorName][]=residential&start=2023-01&end=2023-12&api_key=<API_KEY> to retrieve monthly residential retail prices.
  4. Parse the JSON response: actual records are nested under response.data; check response.total for pagination and use the 'offset' and 'length' parameters to page through large result sets.
  5. For generation data, switch the route to /v2/electricity/electric-power-operational-data/data/ and select relevant facets such as fuel type and geographic area.

Known gotchas

Related routes

Query electricity data (net generation, retail sales, prices) from the EIA using the API v2 route/facets/data hierarchy.
api.eia.gov · 6 steps · unrated
Query European grid generation, load, and price data from the ENTSO-E Transparency Platform API
transparency.entsoe.eu · 5 steps · unrated
Query petroleum and natural gas price series from the EIA API v2 using route, frequency, and facets parameters
api.eia.gov · 5 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans