Free Electricity Rate API
Read-only JSON endpoints over our cleaned, monthly-refreshed dataset. Free for personal & commercial use, no key required, no rate limit (we’re behind a CDN-friendly static cache).
All-states rates
GET https://wattprice.io/api/rates.jsonReturns: data_period, U.S. average, and a map of USPS state code → residential rate in cents/kWh.
Per-state endpoint
GET https://wattprice.io/api/rates/CA.jsonReturns: residential rate, peak sun hours, residential natural gas price, and applicable data periods.
Example
curl https://wattprice.io/api/rates/TX.json
{
"state": "TX",
"name": "Texas",
"residential_rate_cents_per_kwh": 16.99,
"peak_sun_hours_per_day": 5.2,
"residential_gas_price_dollars_per_mcf": 24.61,
...
}Data sources & license
- Electricity rates: EIA Electric Power Monthly Table 5.6.A
- Natural gas prices: EIA Natural Gas Monthly
- Peak sun hours: NREL PVWatts
- Underlying data is U.S. government public domain. Attribution to wattprice.io is appreciated but not required.
Freshness
Both electricity and natural-gas datasets refresh automatically on the 23rd of each month from EIA’s monthly publications.