AgentStack
SKILL unreviewed MIT Self-run

Gridstatus Api

skill-misterclean-claude-plugins-gridstatus-api · by MisterClean

This skill should be used when the user asks to "get electricity data", "query grid data", "get LMP prices", "fetch load data", "get fuel mix", "query ERCOT data", "query CAISO data", "query PJM data", "get electricity prices", "analyze grid operations", "get ISO data", or mentions electricity market data (load, generation, pricing, LMP, fuel mix, ancillary services, etc.).

No reviews yet
0 installs
8 views
0.0% view→install

Install

$ agentstack add skill-misterclean-claude-plugins-gridstatus-api

Open-source listing — not yet scanned by AgentStack. Follow the source repository for install instructions.

Are you the author of Gridstatus Api? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

GridStatus API Skill

Query electricity grid data from US Independent System Operators (ISOs) using the GridStatus.io API. Access real-time and historical data for load, pricing (LMP), generation, fuel mix, and more.

Quick Start

IMPORTANT: Always use the Python SDK. The direct curl API has issues with date filtering on the free tier and returns stale sample data. The Python SDK correctly handles all parameters.

Setup

  1. Install SDK (use uv for isolation):
cd /tmp && uv venv -q && source .venv/bin/activate && uv pip install gridstatusio pandas -q
  1. API Key: Check for GRIDSTATUS_API_KEY in the user's .env file. If not present, instruct the user to:
  • Create account at https://www.gridstatus.io
  • Get API key from Settings page
  • Add to .env: GRIDSTATUS_API_KEY=your_key_here
  1. Query data:
import os
os.environ['GRIDSTATUS_API_KEY'] = 'key_from_dotenv'

from gridstatusio import GridStatusClient
client = GridStatusClient()

df = client.get_dataset(
    dataset="isone_fuel_mix",
    start="2026-01-25",
    end="2026-01-26",
    limit=100
)
print(df.tail())

Free tier limit: 500,000 rows per month. Always use limit parameter.

Supported ISOs

| ISO | Region | Key Datasets | |-----|--------|--------------| | ERCOT | Texas | ercot_load, ercot_spp_*, ercot_fuel_mix | | CAISO | California | caiso_load, caiso_lmp_*, caiso_fuel_mix | | PJM | Mid-Atlantic/Midwest | pjm_load, pjm_lmp_*, pjm_standardized_* | | MISO | Midwest | miso_load, miso_lmp_* | | NYISO | New York | nyiso_load, nyiso_lmp_* | | ISO-NE | New England | isone_load, isone_lmp_*, isone_fuel_mix | | SPP | Southwest/Central | spp_load, spp_lmp_* |

See references/datasets-by-iso.md for complete dataset catalog.

Standard Query Template

Use this template for all queries. Run in a Python heredoc:

cd /tmp && source .venv/bin/activate && python3 `, `=`, `<=`, `in` |
| `resample` | str | Aggregate frequency (`"1 hour"`, `"1 day"`) |
| `resample_function` | str | `mean`, `sum`, `min`, `max` |

See `references/api-reference.md` for complete documentation.

## Troubleshooting

| Issue | Cause | Fix |
|-------|-------|-----|
| Old/stale data returned | Using curl directly | **Use Python SDK instead** - curl has date filtering issues on free tier |
| 401 Unauthorized | Invalid/missing API key | Check `GRIDSTATUS_API_KEY` is set correctly |
| Empty DataFrame | Date range outside coverage | Check dataset metadata for available date range |
| ModuleNotFoundError | SDK not installed | Run: `cd /tmp && uv venv -q && source .venv/bin/activate && uv pip install gridstatusio pandas -q` |
| "Unknown column" error | Wrong filter column | Zone data is in columns after fetch, not filterable. Use `df['load.comed']` |
| 429 Rate Limited | Too many requests | SDK auto-retries with backoff |

### Why Not curl?

The direct HTTP API has a critical issue on the free tier: **date parameters are ignored** and it returns sample data from years ago. The Python SDK correctly handles date filtering and returns current data.

If you must use curl (e.g., for dataset metadata), it works for non-query endpoints:
```bash
# This works - metadata endpoint
curl -s -H "x-api-key: $GRIDSTATUS_API_KEY" \
  "https://api.gridstatus.io/v1/datasets/pjm_load"

# This returns stale data - query endpoint has issues
curl -s -H "x-api-key: $GRIDSTATUS_API_KEY" \
  "https://api.gridstatus.io/v1/datasets/pjm_load/query?start=2026-01-25"  # BROKEN

Additional Resources

Reference Files

  • references/datasets-by-iso.md - Complete dataset catalog by ISO
  • references/api-reference.md - Full API parameter documentation
  • references/common-queries.md - Ready-to-use query patterns

Example Files

  • examples/python-query.py - Python SDK examples

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet — be the first.

Versions

  • v0.1.0 Imported from the upstream source.