TL;DR
The Carbon Intensity API provides real-time and forecast data on the carbon emissions intensity of the UK's electricity grid, powered by the National Grid. Each response tells you how many grams of CO2 are emitted per kilowatt-hour of electricity consumed, along with a qualitative index (very low to very high). Regional breakdowns and 24-hour forecasts are available via separate endpoints. Completely open data, no API key required.
Quick start: https://api.carbonintensity.org.uk/intensity
No API key needed — just make a request!
https://api.carbonintensity.org.uk/intensity
How to Use This API
1. Current National Intensity
Returns the latest half-hour carbon intensity reading:
https://api.carbonintensity.org.uk/intensity
2. 24-Hour Forecast
Get predicted carbon intensity for the next 24 hours:
https://api.carbonintensity.org.uk/intensity/forecast
3. Regional Breakdown
See intensity by UK region:
https://api.carbonintensity.org.uk/regional
Returns data for North Scotland, South Scotland, North West England, Yorkshire, Wales, London, South East, and other regions.
4. JavaScript — Green Energy Alert
fetch('https://api.carbonintensity.org.uk/intensity')
.then(res => res.json())
.then(data => {
const intensity = data.data[0].intensity;
console.log(`Current intensity: ${intensity.forecast} gCO2/kWh`);
console.log(`Index: ${intensity.index}`);
if (intensity.index === 'very low') {
console.log('Great time to charge your EV!');
}
});
5. Python — Forecast Analysis
import requests
resp = requests.get('https://api.carbonintensity.org.uk/intensity/forecast')
forecast = resp.json()
for slot in forecast['data']:
from_time = slot['from'][11:16]
to_time = slot['to'][11:16]
idx = slot['intensity']['index']
print(f"{from_time}-{to_time}: {idx}")
Frequently Asked Questions
- What does carbon intensity mean?
- Carbon intensity measures the amount of CO2 produced per unit of electricity (grams per kilowatt-hour). Lower numbers mean greener electricity from renewable sources like wind, solar, and nuclear.
- What regions are covered?
- The API covers all UK regions defined by the National Grid's distribution network: 14 regions including Scotland, England, Wales, and offshore boundaries.
- Do I need an API key?
- No. The Carbon Intensity API is open data from the UK National Grid, freely accessible without any authentication.
- How often is data updated?
- Real-time data updates every 30 minutes (matched to the UK's settlement period). Forecast data covers the next 48 hours in 30-minute intervals.
- What is the intensity index?
- The index categorizes intensity into: very low (0-50), low (50-100), moderate (100-150), high (150-200), and very high (200+).
- Does the API include generation mix?
- Yes, the generation mix endpoint (
/generation) shows the current contribution from fossil fuels, nuclear, wind, solar, hydro, biomass, and imports.
API Details
- API URL
https://api.carbonintensity.org.uk- Documentation
- carbon-intensity.github.io/api-definitions
- Category
- Environment
- Authentication
- Not Required
- Geographic Coverage
- United Kingdom (GB) — 14 regions
What You Can Build
- Smart EV charging scheduler that starts charging when carbon intensity is lowest
- Home energy dashboard showing the environmental impact of current usage
- Carbon-aware laundry reminder — push a notification when the grid is greenest
- Office display board showing real-time grid carbon data with color-coded indicators
- Energy supplier comparison tool that factors grid carbon data into recommendations