BYTETOOLS

UK Carbon Intensity API

Free National Grid carbon intensity API with no key: current and forecast grid carbon per half hour, by region, with generation mix. Tested curl example.

No API key requiredCORS enabledHTTPSFree tier

Endpoint tested and returned HTTP 200 on 2026-08-19

What is the UK Carbon Intensity API?

The Carbon Intensity API from National Grid ESO is free and key-free, providing actual and forecast carbon intensity of Great Britain's electricity grid in half-hour periods, broken down by region and generation fuel mix.

This is the API that makes carbon-aware software practical. It reports how many grams of CO2 are emitted per kilowatt-hour on the GB grid right now, and forecasts up to 48 hours ahead — so batch jobs, EV charging and heating can be scheduled for the cleanest periods.

The `index` field gives you a plain-language band (very low through very high) alongside the numeric value, which is usually what you want to show a user. Regional endpoints break the country into 14 DNO regions, since intensity varies considerably between, say, Scotland and London.

Quick facts

Base URL
https://api.carbonintensity.org.uk
Authentication
No API key required.
Rate limit
No published hard limit; data updates every half hour so caching is straightforward.
Pricing
Free under the Open Government Licence.
CORS
Enabled — callable directly from browser JavaScript
Official docs
Read the docs

How to use the UK Carbon Intensity API

Every request below was executed against the live API on 2026-08-19, and the response shown is the real body it returned — not an illustration.

1. Current national carbon intensity

GET https://api.carbonintensity.org.uk/intensity

curl
curl 'https://api.carbonintensity.org.uk/intensity'
JavaScript (fetch)
const res = await fetch("https://api.carbonintensity.org.uk/intensity");
if (!res.ok) throw new Error(`Request failed: ${res.status}`);
const data = await res.json();
console.log(data);
Python (requests)
import requests

res = requests.get("https://api.carbonintensity.org.uk/intensity", timeout=20)
res.raise_for_status()
print(res.json())
Response — HTTP 200
{
  "data": [
    {
      "from": "2026-08-19T19:30Z",
      "to": "2026-08-19T20:00Z",
      "intensity": {
        "forecast": 203,
        "actual": 196,
        "index": "high"
      }
    }
  ]
}

Parameters

ParameterTypeRequiredDescription
intensity/date/<date>pathOptionalAll half-hour periods for a given date. 2026-08-19
intensity/<from>/fw24hpathOptional24-hour forecast from a timestamp. 2026-08-19T12:00Z/fw24h
regional/regionid/<id>pathOptionalIntensity for one of the 14 DNO regions. 13
generationpathOptionalCurrent generation mix by fuel type. generation

Response fields

data[].from / tostring
Start and end of the half-hour settlement period, in UTC.
data[].intensity.forecastinteger
Forecast gCO2 per kWh.
data[].intensity.actualinteger
Measured value, null for future periods.
data[].intensity.indexstring
Band: very low, low, moderate, high or very high.
data[].generationmixarray
Percentage share by fuel on generation endpoints.

What you can build with the UK Carbon Intensity API

  • Schedule compute or batch jobs for the lowest-carbon half hours
  • Time EV charging or heat pump operation to clean grid periods
  • Display live grid carbon intensity in a dashboard or smart home app
  • Report the carbon impact of energy use with real regional data

Common errors and how to fix them

actual is null

The period is in the future, so only a forecast exists.

Fix: Fall back to `forecast` when `actual` is null rather than treating it as zero.

400

Malformed timestamp.

Fix: Timestamps are ISO 8601 in UTC with a Z suffix, aligned to half-hour boundaries.

Regional differences ignored

National intensity can differ sharply from a given region.

Fix: Use the regional endpoints when the answer matters locally.

UK Carbon Intensity API — frequently asked questions

Is the Carbon Intensity API free?

Yes, free with no API key, published by National Grid ESO under the Open Government Licence.

What does carbon intensity actually measure?

Grams of CO2 emitted per kilowatt-hour of electricity generated. Lower means the grid is running on more renewables and less gas or coal.

Can I get a forecast?

Yes, up to 48 hours ahead in half-hour periods. That is what makes carbon-aware scheduling possible — you can move flexible load into low-intensity windows.

Does it cover the whole UK?

Great Britain, split into 14 DNO regions. Northern Ireland is on a separate grid and is not included.

Tools that pair with this API

UK Carbon Intensity is an independent third-party service and is not affiliated with ByteTools or ByteVancer. Details on this page were verified on 2026-08-19; always check the official documentation before relying on this API in production, as terms and limits can change.