Hourly Grid Carbon Intensity by ZIP Code: Free API Guide

A practical guide to the free hourly US grid carbon intensity API, with working code for two use cases: backtesting demand response and timing EV charging. It is a timing and analysis tool, not a source of Scope 2 reporting factors.

Published April 17, 2026 · Updated October 19, 2026 · By the emission-factors.com team

Community discussion: an April 2026 three-state chart from an earlier version of this page was discussed on r/dataisbeautiful. This page no longer quotes a fixed week's figures: the method has been refined since (battery storage, hour labels, New York's "other" generation), so live values come from the API itself.

Is there a free API for hourly grid carbon intensity in the US?

Yes. emission-factors.com returns hourly grid carbon intensity for any Lower-48 US ZIP code, derived from EIA Form 930 hourly fuel-mix data. Call GET /api/intensity?zip=94105&hours=24 for up to 168 hours (7 days) for the balancing authority serving that ZIP. Data lags up to about a day; it is not real-time. For live or forecast intensity, WattTime and Electricity Maps offer commercial APIs.

How it works

  1. Resolve ZIP to balancing authority. By the first of the ZIP's utilities (EIA-861) that we can place in a balancing authority, then its state and eGRID subregion, then its state (e.g. 94105 → CISO, Tempe 85281 → SRP). The response's ba_basis says which rule applied, and ba_note appears when the ZIP's utilities sit in different balancing authorities. 47 balancing authorities are mapped; 46 currently report to EIA-930 (WACM has not reported since April 2, 2026, and returns a 404 that says so).
  2. Fetch hourly fuel mix from EIA-930. MWh generated by each fuel type for every hour, per balancing authority.
  3. Compute intensity. Multiply each fuel's MWh by its CO₂e rate (kg per MWh), sum, divide by total generation. Storage output (batteries, pumped storage) is excluded, including batteries reported inside "other" (CAISO). Negative values (plants' own use) count as 0.

Fuel factors (direct, operational CO₂e; not lifecycle):

FuelEIA codekg CO₂e per MWhSource (EPA eGRID2023)
CoalCOL1,018US coal output rate (USCC2ERT, 2,244.545 lb/MWh)
Natural gasNG408US gas output rate (USGC2ERT, 900.028 lb/MWh)
PetroleumOIL708US oil output rate (USOC2ERT, 1,560.637 lb/MWh)
OtherOTH579US all-fossil output rate (USFSC2ERT); EIA-930 does not say what "other" burns. Exception: NYISO reports its solar, biomass and landfill gas as "other", so for NYIS it counts as 0.
GeothermalGEO28Geothermal plants' CO₂e over their net generation (60.7 lb/MWh)
Nuclear / hydro / wind / solar / biomass-0No combustion; biomass CO₂ is biogenic

Because these are US-average rates applied to in-region generation only (imports are not counted), hourly values do not add up to the annual eGRID subregion factor. Use them to compare hours, not to report Scope 2.

How much does intensity vary within a day?

It depends on the grid's mix. Where solar is a large share (CAISO), midday intensity falls far below the night-time level, a several-fold swing. Where gas runs around the clock (NYISO), the hours differ little, so shifting load in time changes carbon less than shifting it in place. Texas (ERCOT) sits in between, with sun and wind pulling midday down.

The pattern moves with the season and the weather, so this page doesn't quote a fixed week. Ask the API for the last 7 days:

curl "https://emission-factors.com/api/cleanest-hours?zip=94105&duration=4"
# cleanest_window / dirtiest_window: local time (the ZIP's time zone) and UTC
# savings_vs_daily_avg_pct, savings_vs_dirtiest_pct: how much the timing matters
# hours_ranked_local: all 24 hours, cleanest first

Run it for zip=78701 (Austin, ERCOT) and zip=10001 (New York, NYISO) to compare grids. For the hour-by-hour series and fuel mix, use /api/intensity?zip=94105&hours=168.

Use case 1: Did shifting our batch job reduce carbon?

Say your ops team moved a 1 MWh (1,000 kWh) batch job in ERCOT from the evening to late morning. How much CO₂e did that avoid? Compare the two hours' intensity (both within the last 168 hours; hour_utc is the start of each hour):

import requests

r = requests.get("https://emission-factors.com/api/intensity", params={"ba": "ERCO", "hours": 168})
hours = {h["hour_utc"]: h["intensity_kg_co2e_per_kwh"] for h in r.json()["hourly"]}

def intensity_at(hour_utc):
    """kg CO2e/kWh for one past hour, e.g. "2026-10-17T01:00Z"; None if outside the last 168 hours."""
    return hours.get(hour_utc)

dirty = intensity_at("2026-10-17T01:00Z")  # 8pm CDT, the old slot
clean = intensity_at("2026-10-17T16:00Z")  # 11am CDT, the new slot

kwh = 1000
print(f"Carbon avoided: {kwh * (dirty - clean):.0f} kg CO2e ({(1 - clean / dirty) * 100:.0f}% less)")

Use hours from the last 7 days: older hours return None. For a typical saving rather than one day's, compare the two hours' averages in /api/cleanest-hours (hours_ranked_local).

Use case 2: When should I charge an EV fleet in California?

A 20-vehicle fleet in San Francisco charging 100 kWh per vehicle (2 MWh a day). When is the grid cleanest?

import requests
from collections import defaultdict

# cleanest_hours does this in one call, in local time:
r = requests.get("https://emission-factors.com/api/cleanest-hours",
                 params={"zip": "94105", "duration": 4})
print(r.json()["cleanest_window"])

# or build the hour-of-day profile yourself from the hourly series (UTC):
r = requests.get("https://emission-factors.com/api/intensity",
                 params={"zip": "94105", "hours": 168})
by_hour = defaultdict(list)
for h in r.json()["hourly"]:
    by_hour[int(h["hour_utc"][11:13])].append(h["intensity_kg_co2e_per_kwh"])
for hour in sorted(by_hour):
    print(f"{hour:02d}:00 UTC  {sum(by_hour[hour]) / len(by_hour[hour]):.3f}")

Multiply the difference between the cleanest window and the hours you charge now by the kWh moved to get the daily saving. In California the midday window is usually far cleaner than the night; note that utility time-of-use rates often price midday as peak. Grids differ, so run it for your own ZIP rather than assuming. For a depot where vehicles are parked overnight, limit the window with between, e.g. &between=20-06.

When NOT to use this API

FAQ

How is this different from the annual eGRID factor you also provide?

The annual eGRID factor (e.g. CAMX 0.195 kg/kWh) is EPA's generation-weighted rate for a subregion over a year, from plant-level data, and is the standard input for GHG Protocol Scope 2 location-based reporting. The hourly intensity here applies US-average fuel rates to each hour's in-region fuel mix, so it shows how the grid varies through the day but is not comparable to, or a substitute for, the eGRID factor.

Why can California's afternoon intensity get so low?

On sunny days solar makes up most of CAISO's midday generation, and solar, wind, hydro and nuclear burn no fuel, so the remaining gas output is a small share and the hourly intensity can approach zero.

Which balancing authorities are covered?

47 Lower-48 balancing authorities are mapped (46 currently report to EIA-930). A ZIP maps to one of them through its utility, then its state and eGRID subregion, then its state; you can also call ?ba=CISO directly.

Do I need an API key?

No. The API is free and keyless - no signup, no header, no auth token. Just call the endpoint. Full API docs.

Try it now:
curl "https://emission-factors.com/api/intensity?zip=94105&hours=24"
Returns the last 24 hours of grid carbon intensity for the California ISO. Full API docs · Use as an MCP tool for Claude.