Developers
A free API for Great Britain's grid
Everything this site shows comes from its own read-only JSON API - and it is open to you too. No key, no sign-up, no quota tiers: the same normalised model the dashboard renders, built entirely on public open data.
The deal
- Free and keyless. Every endpoint is a plain HTTPS GET returning JSON (two return GeoJSON, one a PNG, one Atom XML).
- CORS-open.
Access-Control-Allow-Origin: *on GET - call it straight from a browser app. - Stable by policy. Changes are additive-only: fields are added, never renamed or removed. If a breaking change is ever unavoidable it ships as
/api/v2with the old shape kept serving. - Honest degradation. A dead upstream never fabricates a number: sections come back
nullor empty with asource_ok-style flag, and only the carbon-intensity backbone can 503 a request. - JSON only. The HTML pages on this site are not an API - their markup can change any day. Scrape the JSON, not the pages.
Endpoints
| Endpoint | Returns | Data cadence |
|---|---|---|
| /api/live | Live generation mix (%), carbon intensity, per-interconnector MW, embedded-inclusive MW totals and national demand. | 30-min data · cached 60 s |
| /api/history?hours=24 | Half-hourly generation mix for the dashboard chart, up to 48 h back. | 30-min |
| /api/history/range?from=&to= | Deep history 2009 to now, bucketed day/week/month/year (resolution=auto), with demand and carbon. | settled half-hours |
| /api/records | The all-time records board plus recently detected record breaks. | after each ingest |
| /api/forecast | 48 h forward carbon intensity (the greenest-window feed) + forward national demand. | 30-min |
| /api/regional | The 14 DNO regions' modelled generation mix, intensity index and renewable share. | 30-min |
| /api/regional/forecast | ~24 h of forward per-region frames (the map scrubber feed), aligned to shared steps. | 30-min |
| /api/fleet | Every operational GB power station as GeoJSON - 3,434 sites with fuel, capacity, operator. | static artifact |
| /api/regions | DNO licence-area boundary polygons (GeoJSON), slug-keyed to /api/regional. | static artifact |
| /api/coastline | The NW-Europe coastline backdrop (GeoJSON) the map's interconnector arcs land on. | static artifact |
| /api/stations?fuel=&q=&has_live_feed= | The whole fleet as a flat, filterable directory - the way to discover station ids without the GeoJSON. | static artifact |
| /api/station/{id} | One station's canonical card: metadata, both capacities, BM units, page + endpoint links, and its active outages inlined. | metadata static · outages ~5-min |
| /api/station/{id}/output | One station's notified level (a plan, not a meter) and last metered actual with its age. | PN ~5-min · meter ~weekly |
| /api/station/{id}/history | One station's settled daily output since 2023 and monthly + trailing-year capacity factors. | settled · lags ~a week |
| /api/station/{id}/curtailment | One wind farm's curtailed energy in MWh - month / year / all-time totals and its share of the ledger. | hourly ingest · cached 300 s |
| /api/frequency | Grid frequency now, status band and a ~10-min trend. | ~15 s |
| /api/pulse | Imbalance price, net imbalance volume, wholesale reference and the balancing/curtailment feed. | ~1-min |
| /api/outages | Active generator outages (REMIT), joined to stations where possible. | ~5-min |
| /api/curtailment | The wind-curtailment ledger in MWh: month/year/all-time totals, a per-farm league and monthly + daily series. | hourly ingest · cached 300 s |
| /api/wind-field | GFS ~80 m wind grid metadata for the map's weather overlay (weather, not generation). | ~6-hourly |
| /api/wind-field.png | The paired RGBA U/V wind texture, decoded via /api/wind-field's ranges. | ~6-hourly |
| /records/feed.xml | An Atom feed of detected grid record breaks. | after each ingest |
Every shape is published as an OpenAPI schema at /api/openapi.json and browsable in the interactive reference; the narrative contract - degradation matrices included - lives in the project's docs/api.md. Served from trydan.uk.
Try it
Browse every endpoint and run real requests from the browser - or start with curl:
curl -s https://trydan.uk/api/liveA trimmed response - the real one carries every fuel, all ten interconnectors and the full totals blocks:
{
"carbon": { "actual": 161, "forecast": 168, "index": "moderate" },
"mix": [
{ "fuel": "wind", "label": "Wind", "perc": 24.9, "mw": 14290,
"category": "renewable", "low_carbon": true },
{ "fuel": "gas", "label": "Gas", "perc": 28.4, "mw": 16299,
"category": "fossil", "low_carbon": false }
],
"interconnectors": [
{ "code": "INTFR", "label": "France (IFA)", "mw": 1980, "direction": "import" }
],
"mw_totals": { "total_mw": 37196, "basis": "measured" },
"demand": { "indo_mw": 21538, "net_import_pct": 9.0 }
}Read the numbers honestly
- Percentages (
mix[].perc) are the source of truth for proportions and include embedded generation; the MW fields are the measured total shared out by those percentages, not an independent meter per fuel. - A station's
notifiedfigure is a physical notification - a plan, not a meter. The metered actual (settled) lags about a week; always show its age. - Regional figures are modelled (forecast-only, ML-derived) - label them "modelled", never "measured".
- National demand (
indo_mw) is net of embedded generation, so it is NOT comparable to the embedded-inclusivetotal_mw- their difference is not spare capacity. - Coal at 0 MW is real: the last GB coal plant closed in September 2024. And in deep history, a fuel is
nullbefore its data begins (solar pre-2013, biomass pre-2017-11) - "not tracked yet", never zero. - Curtailment is energy (
mwh), never money, and covers transmission-connected wind only - an honest lower bound on what GB curtailed. Whilebackfill_completeis false, "all time" means "sincecoverage.min".
Fair use
- Responses are edge-cached and most data refreshes every 30 minutes - polling live endpoints more than once a minute buys you nothing.
- Cache on your side too, and send a descriptive
User-Agentif you fetch at volume. Sustained abusive traffic may be rate-limited at the edge. - No SLA - this is a free public service built on free public data.
Attribution
The numbers originate from Elexon BMRS (Insights), NESO open data, the Carbon Intensity API (NESO and University of Oxford), Sheffield Solar PV Live, DESNZ (REPD/DUKES) and NOAA GFS. If you republish data you fetched here, credit those sources and comply with their licences - most are Open Government Licence v3.0; GFS is public domain. A "via trydan.uk" is appreciated but the upstream credits are the ones that matter.