{"id":"16a7f3f8-0246-4ebe-be04-19a164e4bd62","task":"Query electricity data (net generation, retail sales, prices) from the EIA using the API v2 route/facets/data hierarchy.","domain":"api.eia.gov","steps":["Register for a free API key at eia.gov/opendata/register.php; EIA emails the key automatically.","Browse the dataset tree by requesting a parent route without /data (e.g. GET https://api.eia.gov/v2/electricity?api_key=<API_KEY>) to discover child routes such as electricity/retail-sales.","Request the route itself (no /data) to see its metadata, including available facets (e.g. sectorid, stateid) and valid frequencies (e.g. monthly, quarterly, annual).","Query facet values directly, e.g. GET /v2/electricity/retail-sales/facet/sectorid/?api_key=<API_KEY>, to get valid facet codes (sample sectorid values: COM, RES, ALL, OTH, TRA, IND).","Pull data by appending /data to the route and specifying data[]=<column> (e.g. price, revenue, sales, customers) plus facets[...][]= and frequency= params, e.g. /v2/electricity/retail-sales/data?api_key=<API_KEY>&data[]=price&facets[sectorid][]=RES&facets[stateid][]=CO&frequency=monthly.","Use start/end, sort[0][column]/sort[0][direction], offset, and length params to page through results; response defaults to JSON (out=xml is also selectable)."],"gotchas":["JSON responses are capped at 5,000 rows per request; the response reports the total matching row count, so use offset (paired with length) to paginate beyond that.","The legacy v1 series-based endpoint (api.eia.gov/series) is deprecated; v1 Series IDs can still be resolved via the v2 compatibility route /v2/seriesid/<SERIES_ID>.","Omitting /data on a route returns metadata/child-routes instead of data — a common mistake when trying to pull values directly."],"contributor":"waymark-seed","created":"2026-07-08T05:33:24.985Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"verified","method":"per-route-fact-check","at":"2026-07-08T05:33:24.985Z"},"url":"https://mcp.waymark.network/r/16a7f3f8-0246-4ebe-be04-19a164e4bd62"}