What is the gridstatus library?#

gridstatus logo

Tests Code Coverage PyPI Version

The gridstatus open-source library is a Python library maintained by Grid Status that provides a consistent API for accessing raw electricity supply, demand, and pricing data for the major Independent System Operators (ISOs) in the United States and Canada. It currently supports data from CAISO, SPP, ISONE, MISO, ERCOT, NYISO, PJM, IESO, AESO, and the EIA.

GridStatus.io and Hosted API#

This library provides minimally-processed data. If you need production-ready data, consider using our hosted API or visit GridStatus.io to see the data in a web interface.

If you are trying to use our hosted API, you might want to check out the gridstatusio library.

5 Minute Overview#

First, we can see all of the ISOs that are supported

import gridstatus
gridstatus.list_isos()
Name Id Class
0 Midcontinent ISO miso MISO
1 California ISO caiso CAISO
2 PJM pjm PJM
3 Electric Reliability Council of Texas ercot Ercot
4 Southwest Power Pool spp SPP
5 New York ISO nyiso NYISO
6 ISO New England isone ISONE
7 Independent Electricity System Operator ieso IESO

Next, we can select an ISO we want to use

caiso = gridstatus.CAISO()

Fuel Mix#

ISOs share a common API with methods like get_fuel_mix and get_load. Here is how we can get the fuel mix

caiso.get_fuel_mix("today")
2026-06-12 21:08:15 - INFO - Fetching URL: https://www.caiso.com/outlook/current/fuelsource.csv?_=1781298495
Time Interval Start Interval End Solar Wind Geothermal Biomass Biogas Small Hydro Coal Nuclear Natural Gas Large Hydro Batteries Imports Other
0 2026-06-12 00:00:00-07:00 2026-06-12 00:00:00-07:00 2026-06-12 00:05:00-07:00 -53 4774 760 216 169 376 0 2279 7053 4886 1422 7829 0
1 2026-06-12 00:05:00-07:00 2026-06-12 00:05:00-07:00 2026-06-12 00:10:00-07:00 -54 4751 761 211 170 368 0 2280 7073 4707 1913 7884 0
2 2026-06-12 00:10:00-07:00 2026-06-12 00:10:00-07:00 2026-06-12 00:15:00-07:00 -53 4767 760 210 169 375 0 2279 7092 4548 2006 7955 0
3 2026-06-12 00:15:00-07:00 2026-06-12 00:15:00-07:00 2026-06-12 00:20:00-07:00 -53 4787 760 211 169 371 0 2279 7089 4531 1744 8041 0
4 2026-06-12 00:20:00-07:00 2026-06-12 00:20:00-07:00 2026-06-12 00:25:00-07:00 -53 4798 760 211 169 372 0 2279 6848 4537 1757 8129 0
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
164 2026-06-12 13:40:00-07:00 2026-06-12 13:40:00-07:00 2026-06-12 13:45:00-07:00 20556 1816 756 215 165 345 0 2277 2746 1514 -2960 3121 0
165 2026-06-12 13:45:00-07:00 2026-06-12 13:45:00-07:00 2026-06-12 13:50:00-07:00 20735 1886 763 215 165 345 0 2276 2731 1516 -2881 3028 0
166 2026-06-12 13:50:00-07:00 2026-06-12 13:50:00-07:00 2026-06-12 13:55:00-07:00 20862 1931 763 215 163 345 0 2276 2739 1514 -2804 2945 0
167 2026-06-12 13:55:00-07:00 2026-06-12 13:55:00-07:00 2026-06-12 14:00:00-07:00 20772 1983 766 214 161 342 0 2276 2738 1538 -2676 3009 0
168 2026-06-12 14:00:00-07:00 2026-06-12 14:00:00-07:00 2026-06-12 14:05:00-07:00 20600 2003 774 215 161 342 0 2275 2723 1585 -2475 3104 0

169 rows × 16 columns

Load#

or the energy demand throughout the current day as a Pandas DataFrame

caiso.get_load("today")
2026-06-12 21:08:16 - INFO - Fetching URL: https://www.caiso.com/outlook/current/demand.csv?_=1781298496
Time Interval Start Interval End Load
0 2026-06-12 00:00:00-07:00 2026-06-12 00:00:00-07:00 2026-06-12 00:05:00-07:00 29118.0
1 2026-06-12 00:05:00-07:00 2026-06-12 00:05:00-07:00 2026-06-12 00:10:00-07:00 29399.0
2 2026-06-12 00:10:00-07:00 2026-06-12 00:10:00-07:00 2026-06-12 00:15:00-07:00 29382.0
3 2026-06-12 00:15:00-07:00 2026-06-12 00:15:00-07:00 2026-06-12 00:20:00-07:00 29269.0
4 2026-06-12 00:20:00-07:00 2026-06-12 00:20:00-07:00 2026-06-12 00:25:00-07:00 29148.0
... ... ... ... ...
164 2026-06-12 13:40:00-07:00 2026-06-12 13:40:00-07:00 2026-06-12 13:45:00-07:00 30474.0
165 2026-06-12 13:45:00-07:00 2026-06-12 13:45:00-07:00 2026-06-12 13:50:00-07:00 30535.0
166 2026-06-12 13:50:00-07:00 2026-06-12 13:50:00-07:00 2026-06-12 13:55:00-07:00 30784.0
167 2026-06-12 13:55:00-07:00 2026-06-12 13:55:00-07:00 2026-06-12 14:00:00-07:00 30961.0
168 2026-06-12 14:00:00-07:00 2026-06-12 14:00:00-07:00 2026-06-12 14:05:00-07:00 31143.0

169 rows × 4 columns

Load Forecast#

Another dataset we can query is the load forecast

nyiso = gridstatus.NYISO()
nyiso.get_load_forecast("today")
2026-06-12 21:08:16 - INFO - Requesting http://mis.nyiso.com/public/csv/isolf/20260612isolf.csv
/home/docs/checkouts/readthedocs.org/user_builds/isodata/checkouts/latest/gridstatus/nyiso.py:1328: FutureWarning: Parsed string "06/11/26 07:40 EDT" included an un-recognized timezone "EDT". Dropping unrecognized timezones is deprecated; in a future version this will raise. Instead pass the string without the timezone, then use .tz_localize to convert to a recognized timezone.
  return pd.Timestamp(last_updated_date, tz=self.default_timezone)
Time Interval Start Interval End Forecast Time Load Forecast
0 2026-06-12 00:00:00-04:00 2026-06-12 00:00:00-04:00 2026-06-12 01:00:00-04:00 2026-06-11 07:40:00-04:00 20231
1 2026-06-12 01:00:00-04:00 2026-06-12 01:00:00-04:00 2026-06-12 02:00:00-04:00 2026-06-11 07:40:00-04:00 19090
2 2026-06-12 02:00:00-04:00 2026-06-12 02:00:00-04:00 2026-06-12 03:00:00-04:00 2026-06-11 07:40:00-04:00 18284
3 2026-06-12 03:00:00-04:00 2026-06-12 03:00:00-04:00 2026-06-12 04:00:00-04:00 2026-06-11 07:40:00-04:00 17757
4 2026-06-12 04:00:00-04:00 2026-06-12 04:00:00-04:00 2026-06-12 05:00:00-04:00 2026-06-11 07:40:00-04:00 17599
... ... ... ... ... ...
139 2026-06-17 19:00:00-04:00 2026-06-17 19:00:00-04:00 2026-06-17 20:00:00-04:00 2026-06-11 07:40:00-04:00 19679
140 2026-06-17 20:00:00-04:00 2026-06-17 20:00:00-04:00 2026-06-17 21:00:00-04:00 2026-06-11 07:40:00-04:00 19450
141 2026-06-17 21:00:00-04:00 2026-06-17 21:00:00-04:00 2026-06-17 22:00:00-04:00 2026-06-11 07:40:00-04:00 18864
142 2026-06-17 22:00:00-04:00 2026-06-17 22:00:00-04:00 2026-06-17 23:00:00-04:00 2026-06-11 07:40:00-04:00 17768
143 2026-06-17 23:00:00-04:00 2026-06-17 23:00:00-04:00 2026-06-18 00:00:00-04:00 2026-06-11 07:40:00-04:00 16636

144 rows × 5 columns

Historical Data#

You can use the historical method calls to get data for a specific day in the past. For example,

caiso.get_load("Jan 1, 2020")
2026-06-12 21:08:16 - INFO - Fetching URL: https://www.caiso.com/outlook/history/20200101/demand.csv?_=1781298496
Time Interval Start Interval End Load
0 2020-01-01 00:00:00-08:00 2020-01-01 00:00:00-08:00 2020-01-01 00:05:00-08:00 21533
1 2020-01-01 00:05:00-08:00 2020-01-01 00:05:00-08:00 2020-01-01 00:10:00-08:00 21429
2 2020-01-01 00:10:00-08:00 2020-01-01 00:10:00-08:00 2020-01-01 00:15:00-08:00 21320
3 2020-01-01 00:15:00-08:00 2020-01-01 00:15:00-08:00 2020-01-01 00:20:00-08:00 21272
4 2020-01-01 00:20:00-08:00 2020-01-01 00:20:00-08:00 2020-01-01 00:25:00-08:00 21193
... ... ... ... ...
283 2020-01-01 23:35:00-08:00 2020-01-01 23:35:00-08:00 2020-01-01 23:40:00-08:00 20494
284 2020-01-01 23:40:00-08:00 2020-01-01 23:40:00-08:00 2020-01-01 23:45:00-08:00 20383
285 2020-01-01 23:45:00-08:00 2020-01-01 23:45:00-08:00 2020-01-01 23:50:00-08:00 20297
286 2020-01-01 23:50:00-08:00 2020-01-01 23:50:00-08:00 2020-01-01 23:55:00-08:00 20242
287 2020-01-01 23:55:00-08:00 2020-01-01 23:55:00-08:00 2020-01-02 00:00:00-08:00 20128

288 rows × 4 columns

Frequently, we want to get data across multiple days. We can do that by providing a start and end parameter to any iso.get_* method

caiso_load = caiso.get_load(start="Jan 1, 2021", end="Feb 1, 2021")
caiso_load
Time Interval Start Interval End Load
0 2021-01-01 00:00:00-08:00 2021-01-01 00:00:00-08:00 2021-01-01 00:05:00-08:00 21937.0
1 2021-01-01 00:05:00-08:00 2021-01-01 00:05:00-08:00 2021-01-01 00:10:00-08:00 21858.0
2 2021-01-01 00:10:00-08:00 2021-01-01 00:10:00-08:00 2021-01-01 00:15:00-08:00 21827.0
3 2021-01-01 00:15:00-08:00 2021-01-01 00:15:00-08:00 2021-01-01 00:20:00-08:00 21757.0
4 2021-01-01 00:20:00-08:00 2021-01-01 00:20:00-08:00 2021-01-01 00:25:00-08:00 21664.0
... ... ... ... ...
8923 2021-01-31 23:35:00-08:00 2021-01-31 23:35:00-08:00 2021-01-31 23:40:00-08:00 20054.0
8924 2021-01-31 23:40:00-08:00 2021-01-31 23:40:00-08:00 2021-01-31 23:45:00-08:00 19952.0
8925 2021-01-31 23:45:00-08:00 2021-01-31 23:45:00-08:00 2021-01-31 23:50:00-08:00 19859.0
8926 2021-01-31 23:50:00-08:00 2021-01-31 23:50:00-08:00 2021-01-31 23:55:00-08:00 19763.0
8927 2021-01-31 23:55:00-08:00 2021-01-31 23:55:00-08:00 2021-02-01 00:00:00-08:00 19650.0

8928 rows × 4 columns

We can now see there is data for all of January 2021

import plotly.express as px

fig = px.line(caiso_load, x="Time", y="Load", title="CAISO Load - Jan '21")
fig

Next Steps#

The best part is these APIs work in the same way across all the supported ISOs!

Examples