Skip to main content

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/v2 with the old shape kept serving.
  • Honest degradation. A dead upstream never fabricates a number: sections come back null or empty with a source_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

EndpointReturnsData cadence
/api/liveLive generation mix (%), carbon intensity, per-interconnector MW, embedded-inclusive MW totals and national demand.30-min data · cached 60 s
/api/history?hours=24Half-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/recordsThe all-time records board plus recently detected record breaks.after each ingest
/api/forecast48 h forward carbon intensity (the greenest-window feed) + forward national demand.30-min
/api/regionalThe 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/fleetEvery operational GB power station as GeoJSON - 3,434 sites with fuel, capacity, operator.static artifact
/api/regionsDNO licence-area boundary polygons (GeoJSON), slug-keyed to /api/regional.static artifact
/api/coastlineThe 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}/outputOne station's notified level (a plan, not a meter) and last metered actual with its age.PN ~5-min · meter ~weekly
/api/station/{id}/historyOne station's settled daily output since 2023 and monthly + trailing-year capacity factors.settled · lags ~a week
/api/station/{id}/curtailmentOne wind farm's curtailed energy in MWh - month / year / all-time totals and its share of the ledger.hourly ingest · cached 300 s
/api/frequencyGrid frequency now, status band and a ~10-min trend.~15 s
/api/pulseImbalance price, net imbalance volume, wholesale reference and the balancing/curtailment feed.~1-min
/api/outagesActive generator outages (REMIT), joined to stations where possible.~5-min
/api/curtailmentThe 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-fieldGFS ~80 m wind grid metadata for the map's weather overlay (weather, not generation).~6-hourly
/api/wind-field.pngThe paired RGBA U/V wind texture, decoded via /api/wind-field's ranges.~6-hourly
/records/feed.xmlAn 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

Open the interactive reference

Browse every endpoint and run real requests from the browser - or start with curl:

curl -s https://trydan.uk/api/live

A 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 notified figure 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-inclusive total_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 null before 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. While backfill_complete is false, "all time" means "since coverage.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-Agent if 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.