Query hourly electricity generation by fuel type for a Balancing Authority using the EIA API v2 electricity/rto/fuel-type-data endpoint

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

Steps

  1. Register for a free EIA API key at https://www.eia.gov/opendata/ and include it as a query parameter (?api_key=YOUR_KEY) or as an HTTP header on all requests.
  2. Discover available Balancing Authorities by querying GET /v2/electricity/rto/fuel-type-data/facet/respondent?api_key=YOUR_KEY; the response lists all valid respondent facet values (e.g., 'CISO' for CAISO, 'ERCO' for ERCOT, 'PJM' for PJM) with descriptions.
  3. Query hourly generation data via GET /v2/electricity/rto/fuel-type-data/data/?api_key=YOUR_KEY&frequency=hourly&data[]=value&facets[respondent][]=CISO&facets[fueltype][]=SUN&start=2025-01-01T00&end=2025-01-07T23&sort[0][column]=period&sort[0][direction]=desc; the response returns a 'response' object with a 'data' array of {period, respondent, fueltype, value, value-units} objects.
  4. Handle pagination: the response includes 'total' and 'offset' fields; if 'total' exceeds the 'length' parameter (default 5000, max 5000), issue subsequent requests with increasing 'offset' values until all records are retrieved.
  5. Map fuel type codes to human-readable names using the facet metadata: 'SUN'=solar, 'WND'=wind, 'NG'=natural gas, 'COL'=coal, 'NUC'=nuclear, 'OTH'=other, 'WAT'=hydropower — the full mapping is available at the /v2/electricity/rto/fuel-type-data/facet/fueltype endpoint.
  6. For multi-BA aggregation, query each BA separately and sum by fueltype and period; the EIA does not provide a single aggregate query across multiple respondents — the respondent='US48' value covers the contiguous US total.

Known gotchas

Related routes

Query electricity generation and retail price data from the EIA API v2
api.eia.gov · 5 steps · unrated
Discover which grid regions and signal types your account is entitled to query using the WattTime v3 my-access endpoint
api.watttime.org · 5 steps · unrated
query the EIA API v2 to discover valid facet values (e.g. sectorid, stateid, fueltypeid) for an electricity data route before filtering a request
api.eia.gov · 6 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