Get a carbon intensity time series for a zone
get_intensity_historyPull interval-by-interval carbon intensity data for one zone over a chosen time window, enabling analysis of grid emissions trends, cleanest and dirtiest hours, and shifts across days.
Instructions
Return the interval-by-interval carbon intensity history for ONE zone over a time window.
Use it for "how has the German grid varied today", "what was the cleanest hour in France yesterday", "is Ireland's grid dirtier at breakfast than at midday".
Data contract (read this before you report any number to a user):
Unit is gCO2eq/kWh (grams of CO2-equivalent per kilowatt-hour of electricity consumed). LOWER IS CLEANER. There is no upper bound; roughly <100 is very clean, ~100-300 is moderate, >400 is fossil-heavy.
"ts" is the START of the reporting interval, in UTC (ISO-8601, "Z" suffix). A value with ts=2026-08-26T01:00:00Z and a 60-minute resolution covers 01:00-02:00 UTC.
"latest" means NEWEST PUBLISHED, NOT "now". European zones typically run 2-4 hours behind real time; US (EIA) zones run 11-28 hours behind. Every reading carries "age_minutes" and "age_human" -- state that age when you report the value. Saying "the current carbon intensity in Texas is X" about a 20-hour-old number is wrong.
GB values come from NESO and use OPERATIONAL (combustion-only) emission factors, not the IPCC AR5 lifecycle factors used for the other 44 zones. GB numbers are systematically lower and MUST NOT be compared or ranked against other zones.
Coverage starts 2026-08-21T00:00:00Z; there is no data before that date.
Attribution is a licence condition. If you surface these values to an end user, credit: ENTSO-E Transparency Platform / U.S. Energy Information Administration (EIA) / NESO Carbon Intensity API. EIA does not endorse this service or any use of it.
Window semantics:
The window is HALF-OPEN: [from, to). A point at exactly 'to' is excluded.
Default window is the last 24 hours. 'hours' is a shorthand for that.
Every point's ts is the START of its interval, in UTC. Resolution is 60 minutes for all zones except GB, which is 30.
There is no data before 2026-08-21T00:00:00Z, and none for intervals the upstream source has not published yet, so a window that reaches into the last few hours (or, for US zones, the last day) will simply have fewer points. Missing points are gaps, not zeros — never interpolate them.
Args:
zone (string, required): e.g. "DE", "FR", "US-CAISO", "GB".
from (string, optional): inclusive ISO-8601 UTC start.
to (string, optional): exclusive ISO-8601 UTC end.
hours (integer 1-2160, optional): last N hours ending now; ignored when 'from' is set.
max_points (integer, default 200): trim to the most recent N points for readability.
include_points (boolean, default true): false returns summary statistics only.
response_format ("markdown" | "json", default "markdown").
Returns (structured): { "zone": "DE", "zone_name": "Germany-Luxembourg", "source": "entsoe", "resolution_min": 60, "unit": "gCO2eq/kWh", "from": "2026-08-25T18:00:00Z", "to": "2026-08-26T00:00:00Z", "count": 6, // points the API returned for the window "server_truncated": false, // TRUE means the window is INCOMPLETE, see below "points_returned": 6, "points_omitted_for_brevity": 0, "summary": { "min": 356.5, "max": 380.7, "mean": 363.6, "first": {...}, "last": {...}, "cleanest": {"ts": "...", "gco2eq_kwh": 356.5}, "dirtiest": {"ts": "...", "gco2eq_kwh": 380.7}, "change_from_first_to_last_pct": -5.3 }, "points": [ { "ts": "2026-08-25T18:00:00Z", "gco2eq_kwh": 380.7, "method": "computed:v1" } ], "operational_factors_only": false, "warnings": [] }
Truncation — do not ignore this: The API caps a response at 5000 points. When it does, "server_truncated" is true and the series you received is only PART of the requested window. Never present a truncated series as a complete picture, and never compute a daily/weekly average from one. Narrow the window and call again instead.
Examples:
"Chart France's grid over the last two days" -> zone="FR", hours=48
"Cleanest hour in Spain yesterday" -> zone="ES", from/to spanning that UTC day, then read summary.cleanest
"Average intensity last week" -> hours=168, include_points=false
Don't use for: a single current value (get_carbon_intensity) or cross-zone ranking (compare_zones).
Errors:
Unknown zone -> error with near matches; call list_zones.
Unparseable from/to -> error naming the offending field.
Empty window -> a message saying no intervals were published in that range.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | Window end, EXCLUSIVE — the window is half-open [from, to). ISO-8601 UTC, e.g. '2026-08-25T18:00:00Z'. Local times and offsets are not accepted. Omit for "up to now". | |
| from | No | Window start, INCLUSIVE. ISO-8601 UTC, e.g. '2026-08-25T18:00:00Z'. Local times and offsets are not accepted. Omit to use 'hours' or the default last 24h. Nothing exists before 2026-08-21T00:00:00Z. | |
| zone | Yes | Zone code, e.g. 'DE' (Germany-Luxembourg), 'FR' (France), 'US-ERCOT' (Texas), 'IT-NORD', 'GB'. Case-insensitive and '_' is accepted for '-'. An unambiguous country/region name such as 'Texas' or 'Portugal' also resolves. Call list_zones if you are unsure — never substitute a neighbouring zone that is not covered. | |
| hours | No | Convenience alternative to from/to: the last N hours ending now. Ignored if 'from' is given. Example: hours=48 for the last two days. | |
| max_points | No | Cap on how many interval points are included in the response, to keep it readable. If the window holds more, the MOST RECENT max_points are returned and the response says how many were omitted. Summary statistics are always computed over the WHOLE window, never over the trimmed subset. | |
| include_points | No | Set false to get only the summary statistics (min/max/mean/cleanest/dirtiest) without the individual intervals. Useful for long windows. | |
| response_format | No | Output format for the text content. 'markdown' is compact and human-readable; 'json' returns the full structured payload as text. Structured data is always returned alongside either way. | markdown |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | ||
| from | Yes | ||
| unit | Yes | ||
| zone | Yes | ||
| count | Yes | Points the API returned for the window. | |
| points | Yes | ||
| source | No | ||
| summary | No | ||
| warnings | Yes | ||
| zone_name | No | ||
| resolution_min | No | ||
| points_returned | Yes | ||
| server_truncated | Yes | True if the API hit its 5000-point cap and the window is INCOMPLETE. | |
| server_truncation_note | No | ||
| operational_factors_only | Yes | ||
| points_omitted_for_brevity | Yes |