Download bulk historical MOER data from the WattTime API v3 for a grid region and paginate through the full dataset

domain: api.watttime.org · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Register for a WattTime account and obtain an API token by POSTing credentials to the /login endpoint; the response contains a token field (JWT) valid for a limited period — store it securely and refresh it before expiry.
  2. Identify the target grid region abbreviation using GET /region-from-loc?latitude={lat}&longitude={lon} or by consulting the WattTime region list; historical MOER data is keyed by region abbreviation (e.g., 'CAISO_NORTH').
  3. Request historical MOER data via GET /historical with parameters: region={abbrev}, signal_type=co2_moer, start={ISO8601_datetime}, end={ISO8601_datetime}; the response is a JSON object with a 'data' array of {point_time, value, version} entries at five-minute resolution for most regions.
  4. Paginate through large date ranges: if the requested range exceeds the maximum window allowed by your subscription tier, split the request into smaller sub-ranges (e.g., monthly chunks) and concatenate the results; check the response for a 'meta' object indicating truncation.
  5. Store the data keyed by (region, point_time) and handle duplicate point_time entries caused by data revisions — WattTime occasionally reissues historical data with corrected values; use the 'version' field to identify the most recent revision.
  6. For forecast data (used for carbon-aware scheduling), call GET /forecast with the same region and signal_type parameters — forecast data is a separate endpoint from historical and returns a probabilistic time series for the upcoming 24–72 hours depending on region.

Known gotchas

Related routes

retrieve the predicted marginal operating emissions rate (MOER) forecast for a grid region using the WattTime API v3 /forecast endpoint
api.watttime.org · 6 steps · unrated
Fetch real-time grid carbon intensity data from the WattTime API
api.watttime.org · 5 steps · unrated
Discover which grid regions and signal types your account is entitled to query using the WattTime v3 my-access endpoint
api.watttime.org · 5 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans