{"uid":"cap_8KRtlvQIrzKtshDnM_YG0","slug":"us-electricity-rates-by-state-53192d98","name":"US Electricity Rates by State","description":"Retail electricity price and sales for a US state by customer sector (residential, commercial, industrial, transportation, all), monthly, newest first, from EIA. Returns average price (cents/kWh), sales (MWh), revenue ($M), and customer count per month. Public-domain, live-wrap. More granular than energy.prices (which is the national all-sector benchmark only).","url":"https://2s.io/api/energy/electricity-rates?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","queryParams"],"properties":{"type":{"const":"http"},"method":{"const":"GET"},"queryParams":{"required":["state"],"properties":{"state":{"type":"string","description":"2-letter US state code."},"months":{"type":"integer","maximum":120,"minimum":1},"sector":{"enum":["residential","commercial","industrial","transportation","all"],"type":"string"}}}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"settled","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0025","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0025","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_gfSWwuLczpFUBIZnkTRNT","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.0025","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns historical electricity rates, sales volume, customer counts, and revenue for a given US state, filtered by sector and time range, sourced from the US Energy Information Administration (EIA).","exampleAgentPrompt":"What are the residential electricity rates in Texas over the last 24 months, using EIA data?","exampleUseCases":null,"resultDescription":"A JSON array of monthly records, each containing: time period (YYYY-MM), electricity sales in MWh, number of customers, price in cents per kWh, and revenue in million USD. Also includes total record count and source metadata (EIA URL, license, provider name).","failureModes":["Missing required 'state' parameter returns validation error","Invalid or unrecognized 2-letter state code returns error or empty result","Requesting more than 120 months exceeds the maximum limit","Invalid sector enum value returns validation error","No data available for the requested period or state returns empty items array","Payment failure via x402 (insufficient USDC balance) blocks the request"],"whenToPreferThis":"Use this endpoint when you need official, government-sourced US electricity rate data broken down by state and sector over time. Prefer this over generic energy APIs when you need EIA ground-truth data with per-kWh pricing, MWh sales volume, and customer counts at the state level with historical depth up to 10 years.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-12T18:46:11.157Z","isFirstParty":false,"canonicalSlug":"us-electricity-rates-by-state-53192d98"}