CARBON INTENSITY API
Last-hour grid carbon intensity, by country
Operational, lifecycle and consumption-based carbon intensity (gCO2eq/kWh) for every country with published electricity data — 213 in total. Real last-hour readings where a live grid feed exists; a labelled annual snapshot everywhere else. Refreshed hourly.
Quick example
Get the latest hour for one country (ISO code, alpha-3, or name):
curl https://ci-api.fabiocicerchia.it/v1/last-hour/DE
{
"country": "Germany",
"country_code": "DE",
"hour_start": "2026-08-08T13:00:00Z",
"hour_end": "2026-08-08T14:00:00Z",
"unit": "gCO2eq/kWh",
"direct": 330,
"lifecycle": 380,
"consumption": 370,
"basis": "measured",
"source": "ENTSO-E",
"generated_at": "2026-08-08T13:05:00Z",
"stale": false
}
Each country is a static file for O(1) access. basis is
"measured" (a real live reading) or "annual-average"
(fallback); stale is true if the hourly refresh is late.
Endpoints
| Path | Returns |
|---|---|
/v1/last-hour/<CODE> | Last-hour reading for one country (O(1); accepts ISO-2/ISO-3/name) |
/v1/latest.json | All countries in one snapshot |
/v1/countries | Supported countries (with data source per country) |
/health, /license | Service + license info |
Data & methodology
Built from raw grid-operator data with lifecycle factors following IPCC AR6 and consumption-based accounting in the spirit of the ECON-PowerCI method (Nature, 2025). Live readings compute operational intensity from each grid's generation mix; lifecycle and consumption are layered on per country.
Sources & attribution
- Annual figures: Our World in Data energy dataset (Ember; Energy Institute Statistical Review) — CC-BY 4.0.
- Real-time source catalogue: compiled from electricitymaps-contrib.
- Lifecycle emission factors: IPCC AR6, WG III (2022), Annex III.
- Live readings: the grid operators / market data providers named in each response's
data_source(ENTSO-E, EIA, NESO, ONS, OpenNEM, EMC, Eskom, …). Data remain subject to their publishers' terms.