Issue Nº 20 — Sep 5, 2026

UK Carbon Intensity answers an unknown path with HTTP 200 and a body that calls itself a 400

Issue twenty covers the UK Carbon Intensity API, a carbon-intensity forecast and generation-mix feed for Great Britain's electricity grid, published by National Grid ESO with no key or sign-up. This session queried it live. It found a status line that disagrees with its own response body, a documented example postcode that fails against the live endpoint, and a national figure that ran less than half a same-instant regional one.

What it covers

The API publishes carbon intensity for Great Britain's electricity grid: a national figure, a per-region figure keyed to a postcode, and the generation mix behind both. No key or sign-up is needed.

GET /intensity, queried in the half-hour window 2026-09-05T03:30Z to 04:00Z, returned 200 with 187 bytes and an access-control-allow-origin: * header. The body carried a forecast of 41 gCO2/kWh, an index of "low", and actual: null. The API only fills in the actual figure once that half-hour's settlement data closes; until then, only the forecast is available.

GET /generation, same window, returned the national fuel mix behind that figure: wind 68%, nuclear 15.8%, gas 7.7%, biomass 8.4%, and the rest at or near zero.

A 200 that calls itself a 400

GET /bogus, a path with no matching endpoint, returned HTTP 200 with the body {"error": {"code": "400 Bad Request", "message": "Please enter a valid path e.g. /intensity/"}}.

The status line reports success. The body's own code field reports a 400. A client that checks the HTTP status code and ignores the body will read an unrecognized path as a successful response.

The docs' own example postcode fails live

The API's reference for GET /regional/postcode/{postcode} describes the parameter as "Outward postcode i.e. RG41 or SW1 or TF8. Do not include full postcode, outward postcode only."

GET /regional/postcode/SW1, tested live, returned 400 with "No postcode match can be found." In the same session, GET /regional/postcode/RG10, /EC1A, /SW1A, and /M1 each returned 200 with regional data. RG41 and TF8, the other two examples on the same doc line, were not tested here.

So one of the reference's own three example postcodes does not resolve against the live endpoint, while nearby lettered London postcodes such as SW1A and EC1A do.

A national figure and a same-instant regional figure, 2.8x apart

In the same half-hour window, GET /intensity returned a national forecast of 41 gCO2/kWh, index "low". GET /regional/postcode/RG10 (regionid 12, "SSE South") returned a forecast of 114, index "moderate", about 2.8 times the national number.

GET /regional/postcode/SW1A and /EC1A (both regionid 13, "London") returned a forecast of 68, index "low", between the national and South England figures.

The generation mix moved with it: wind supplied 68% of the national mix that half-hour, 59.3% of London's, and 52.3% of South England's. A caller reading only the national number would miss a 2.8x regional swing in the same 30 minutes.

UK Carbon Intensity, by the numbers

Rendered live from the atlas entry
AuthenticationNone required
HTTPSSupported
CORSEnabled
PricingFree
FormatsJSON
Key endpoints
  • GET/intensity
  • GET/regional/postcode/{postcode}
  • GET/generation
carbon-emissionsenergyunited-kingdomopen-datagovernment

Sources

Facts checked Sep 2026