Overview
The UK Carbon Intensity API provides official real-time and forecast carbon intensity data for Great Britain's electricity grid, developed by National Grid. It tells you how much CO2 is generated per kilowatt-hour at any given time. No API key is needed, making it a great starting point for environmental or energy-aware applications.
Beginner Tip
This API requires no authentication — just send a GET request to get live carbon intensity data. Try the /intensity endpoint first to see the current index and forecast.
Measurement Record
What actually happened when we called this API from our own infrastructure. Every value below was recorded by the request, not copied from the provider's documentation.
- Request
- GET https://api.carbonintensity.org.uk/intensity
- Result
- HTTP 200 · application/json · 187 bytes
- Response time
- 1046 ms (median of 3) · fastest 1027 ms
- Transport
- TLSv1.3 · TLS_AES_128_GCM_SHA256 · certificate issued by Amazon
- Browser CORS
- Allowed — Access-Control-Allow-Origin: *
- Recorded
- 2026-08-10
Fields Returned
Top-level fields present in the response we captured, with the type and value we actually received.
| Field | Type | Value received |
|---|---|---|
| from | string (date) | 2026-08-10T19:00Z |
| to | string (date) | 2026-08-10T19:30Z |
| intensity | object | {1 fields} |
Captured Response
Captured from a real request to https://api.carbonintensity.org.uk/intensity on 2026-08-10. Long arrays and nested objects are truncated to keep the shape readable.
{
"data": [
{
"from": "2026-08-10T19:00Z",
"to": "2026-08-10T19:30Z",
"intensity": {
"…": "(3 more fields)"
}
}
]
} Field Reference
from ISO 8601 timestamp for the start of the half-hour period to ISO 8601 timestamp for the end of the half-hour period Implementation Example
Request skeleton. The URL below is this API's documentation page, not a live endpoint — swap in the path you need from the provider's docs before running it.
const url = "https://carbon-intensity.github.io/api-definitions/";
const response = await fetch(url);
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data); What Can You Build?
Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.
How This API Fails
We deliberately sent this API a broken request and recorded exactly what came back on 2026-08-10. Knowing the shape of an error before you hit it makes error handling much easier to write.
{
"error": {
"code": "400 Bad Request",
"message": "Please enter a valid datetime in ISO8601 format YYYY-MM-DDThh:mmZ e.g. /intensity/2017-08-25T15:30Z"
}
} Common Errors & Troubleshooting
Generated guidance based on this API's documentation, not observed by us. Treat it as a starting point and check against the provider's own error reference.
Measured Score Breakdown
Live HTTP request to the API endpoint
Fully tested on Aug 10, 2026
Technical Specifications
Related Tags
Similar APIs
View All →CO2 Offset
⭐ Beginner's PickCO2 Offset API calculates and validates the carbon footprint of electricity consumption using the Sustainable Scope 2 framework.
Danish data service Energi
Danish data service Energi provides programmatic access to open energy data from energinet to society via REST API.
GrünstromIndex
⭐ Beginner's PickGrünstromIndex (Green Power Index) provides real-time and forecast data about the proportion of renewable energy in the German electricity grid.
Luchtmeetnet
⭐ Beginner's PickLuchtmeetnet API provides real-time and predicted air quality measurements from the official Dutch national air quality monitoring network (RIVM).
Carbon Interface
Carbon Interface API calculates estimated CO2 emissions for common activities such as electricity usage, flights, vehicle travel, and shipping.