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-04-21 02:22:50 - INFO - Fetching URL: https://www.caiso.com/outlook/current/fuelsource.csv?_=1776738170
Time Interval Start Interval End Solar Wind Geothermal Biomass Biogas Small Hydro Coal Nuclear Natural Gas Large Hydro Batteries Imports Other
0 2026-04-20 00:00:00-07:00 2026-04-20 00:00:00-07:00 2026-04-20 00:05:00-07:00 -56 2704 697 128 160 261 0 2275 3623 3295 1783 6403 0
1 2026-04-20 00:05:00-07:00 2026-04-20 00:05:00-07:00 2026-04-20 00:10:00-07:00 -55 2707 686 129 155 259 0 2275 3787 3360 1819 6606 0
2 2026-04-20 00:10:00-07:00 2026-04-20 00:10:00-07:00 2026-04-20 00:15:00-07:00 -55 2687 696 129 147 258 0 2276 3890 3512 1397 6780 0
3 2026-04-20 00:15:00-07:00 2026-04-20 00:15:00-07:00 2026-04-20 00:20:00-07:00 -55 2685 699 129 138 256 0 2275 4010 3528 1069 6878 0
4 2026-04-20 00:20:00-07:00 2026-04-20 00:20:00-07:00 2026-04-20 00:25:00-07:00 -56 2630 700 128 135 255 0 2275 4158 3534 964 6826 0
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
227 2026-04-20 18:55:00-07:00 2026-04-20 18:55:00-07:00 2026-04-20 19:00:00-07:00 2062 3528 519 122 144 263 0 2270 4611 3301 6909 2886 0
228 2026-04-20 19:00:00-07:00 2026-04-20 19:00:00-07:00 2026-04-20 19:05:00-07:00 1496 3582 521 121 144 263 0 2271 4555 3298 7459 3098 0
229 2026-04-20 19:05:00-07:00 2026-04-20 19:05:00-07:00 2026-04-20 19:10:00-07:00 1106 3694 534 122 144 262 0 2272 4383 3256 7801 3033 0
230 2026-04-20 19:10:00-07:00 2026-04-20 19:10:00-07:00 2026-04-20 19:15:00-07:00 778 3817 536 125 144 261 0 2269 4388 3279 7982 2984 0
231 2026-04-20 19:15:00-07:00 2026-04-20 19:15:00-07:00 2026-04-20 19:20:00-07:00 483 3927 536 124 145 262 0 2269 4413 3282 8044 3189 0

232 rows × 16 columns

Load#

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

caiso.get_load("today")
2026-04-21 02:22:50 - INFO - Fetching URL: https://www.caiso.com/outlook/current/demand.csv?_=1776738170
Time Interval Start Interval End Load
0 2026-04-20 00:00:00-07:00 2026-04-20 00:00:00-07:00 2026-04-20 00:05:00-07:00 21242.0
1 2026-04-20 00:05:00-07:00 2026-04-20 00:05:00-07:00 2026-04-20 00:10:00-07:00 21565.0
2 2026-04-20 00:10:00-07:00 2026-04-20 00:10:00-07:00 2026-04-20 00:15:00-07:00 21752.0
3 2026-04-20 00:15:00-07:00 2026-04-20 00:15:00-07:00 2026-04-20 00:20:00-07:00 21693.0
4 2026-04-20 00:20:00-07:00 2026-04-20 00:20:00-07:00 2026-04-20 00:25:00-07:00 21619.0
... ... ... ... ...
227 2026-04-20 18:55:00-07:00 2026-04-20 18:55:00-07:00 2026-04-20 19:00:00-07:00 26130.0
228 2026-04-20 19:00:00-07:00 2026-04-20 19:00:00-07:00 2026-04-20 19:05:00-07:00 26243.0
229 2026-04-20 19:05:00-07:00 2026-04-20 19:05:00-07:00 2026-04-20 19:10:00-07:00 26225.0
230 2026-04-20 19:10:00-07:00 2026-04-20 19:10:00-07:00 2026-04-20 19:15:00-07:00 26304.0
231 2026-04-20 19:15:00-07:00 2026-04-20 19:15:00-07:00 2026-04-20 19:20:00-07:00 26306.0

232 rows × 4 columns

Load Forecast#

Another dataset we can query is the load forecast

nyiso = gridstatus.NYISO()
nyiso.get_load_forecast("today")
2026-04-21 02:22:50 - INFO - Requesting http://mis.nyiso.com/public/csv/isolf/20260420isolf.csv
/home/docs/checkouts/readthedocs.org/user_builds/isodata/checkouts/v0.36.0/gridstatus/nyiso.py:1226: FutureWarning: Parsed string "04/19/26 07:30 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-04-20 00:00:00-04:00 2026-04-20 00:00:00-04:00 2026-04-20 01:00:00-04:00 2026-04-19 07:30:00-04:00 13639
1 2026-04-20 01:00:00-04:00 2026-04-20 01:00:00-04:00 2026-04-20 02:00:00-04:00 2026-04-19 07:30:00-04:00 13279
2 2026-04-20 02:00:00-04:00 2026-04-20 02:00:00-04:00 2026-04-20 03:00:00-04:00 2026-04-19 07:30:00-04:00 13061
3 2026-04-20 03:00:00-04:00 2026-04-20 03:00:00-04:00 2026-04-20 04:00:00-04:00 2026-04-19 07:30:00-04:00 13018
4 2026-04-20 04:00:00-04:00 2026-04-20 04:00:00-04:00 2026-04-20 05:00:00-04:00 2026-04-19 07:30:00-04:00 13270
... ... ... ... ... ...
139 2026-04-25 19:00:00-04:00 2026-04-25 19:00:00-04:00 2026-04-25 20:00:00-04:00 2026-04-19 07:30:00-04:00 14937
140 2026-04-25 20:00:00-04:00 2026-04-25 20:00:00-04:00 2026-04-25 21:00:00-04:00 2026-04-19 07:30:00-04:00 15088
141 2026-04-25 21:00:00-04:00 2026-04-25 21:00:00-04:00 2026-04-25 22:00:00-04:00 2026-04-19 07:30:00-04:00 14767
142 2026-04-25 22:00:00-04:00 2026-04-25 22:00:00-04:00 2026-04-25 23:00:00-04:00 2026-04-19 07:30:00-04:00 14190
143 2026-04-25 23:00:00-04:00 2026-04-25 23:00:00-04:00 2026-04-26 00:00:00-04:00 2026-04-19 07:30:00-04:00 13528

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-04-21 02:22:51 - INFO - Fetching URL: https://www.caiso.com/outlook/history/20200101/demand.csv?_=1776738171
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