eia_state_energy
Retrieve state-level energy data on production, consumption, expenditures, and prices by energy source for U.S. states from the State Energy Data System (SEDS).
Instructions
Get state-level energy data from the State Energy Data System (SEDS). Covers production, consumption, expenditures, and prices by energy source for all 50 states.
MSN codes (energy data codes):
TETCB: Total energy consumption (trillion BTU)
TETCD: Total energy consumption per capita
TEPRB: Total energy production (trillion BTU)
ESTCB: Electricity total consumption
CLTCB: Coal consumption
NNTCB: Natural gas consumption
PATCB: Petroleum consumption
RETCB: Renewable energy consumption
NUETB: Nuclear energy consumption
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| state | No | Two-letter state code (e.g., 'CA'). Omit for all states. | |
| msn | No | MSN energy data code. 'TETCB' (total consumption, default), 'TETCD' (per capita), 'TEPRB' (production), 'RETCB' (renewables), 'PATCB' (petroleum) | |
| start | No | Start year (YYYY). Default: 5 years ago | |
| end | No | End year (YYYY). Default: latest available | |
| length | No | Max rows (API max: 5000). Omit to let date range control volume. | |
| offset | No | Row offset for pagination |