📡 API
Free JSON data for US state energy statistics
The Daily Mine provides free access to state-level energy data sourced from the U.S. Energy Information Administration (EIA). Data is updated monthly.
Endpoint
GET /api/state-energy.json
Returns energy data for all 50 US states plus DC.
CORS: Enabled for all origins
Rate limit: None (please be reasonable)
Response Format
{
"metadata": {
"source": "EIA API v2",
"lastUpdated": "2026-02-03",
"priceDataYear": 2024,
"profileDataYear": 2023
},
"states": {
"MO": {
"name": "Missouri",
"abbreviation": "MO",
"grid": "SPP/MISO",
"electricity": {
"residentialPrice": 12.91,
"commercialPrice": 10.26,
"industrialPrice": 7.87,
"priceUnit": "cents/kWh",
"totalRetailSales": 77776.034,
"salesUnit": "GWh",
"residentialRank": 38,
"salesRank": 19
},
"generation": {
"total": 66703.285,
"unit": "GWh",
"primeSource": "Coal",
"capacity": 21172,
"capacityUnit": "MW",
"rank": 22
},
"emissions": {
"co2": 45916,
"co2Unit": "thousand metric tons",
"co2Rank": 9
},
"capacityMix": {
"coal": 35,
"gas": 39,
"nuclear": 4,
"wind": 9,
"solar": 0,
"hydro": 4,
"storage": 0,
"other": 9
}
},
// ... more states
}
}
Data Fields
| Field | Type | Description |
|---|---|---|
electricity.residentialPrice |
number | Residential electricity price in cents/kWh |
electricity.industrialPrice |
number | Industrial electricity price in cents/kWh |
generation.total |
number | Total generation in GWh |
generation.primeSource |
string | Primary generation source (Coal, Natural Gas, Nuclear, etc.) |
generation.capacity |
number | Summer peak capacity in MW |
emissions.co2 |
number | COâ‚‚ emissions in thousand metric tons |
capacityMix |
object | Percentage breakdown by fuel type |
grid |
string | Grid operator (ERCOT, PJM, MISO, etc.) |
Example Usage
// JavaScript/Fetch
fetch('https://thedailymine.co/api/state-energy.json')
.then(res => res.json())
.then(data => {
const texas = data.states.TX;
console.log(`Texas: ${texas.electricity.industrialPrice}¢/kWh`);
});
// Python
import requests
data = requests.get('https://thedailymine.co/api/state-energy.json').json()
texas = data['states']['TX']
print(f"Texas: {texas['electricity']['industrialPrice']}¢/kWh")
Attribution
Data sourced from the U.S. Energy Information Administration. If you use this API, please link back to The Daily Mine.
Questions? Contact us