API & Open Source

Access the raw data

We don't run a public API for UK Grid. The good news: everything you see here is built from three public APIs anyone can call, and the full source code for this dashboard is on GitHub under the MIT licence. Use it, fork it, or skip it.

Upstream APIs — call them directly

Source code

The complete frontend (React + Vite) and the ingest functions (Node + Firebase Cloud Functions) are open source under the MIT licence on github.com/samaxbytez/energy-grid. Run your own copy, lift the ingest logic, or read the code to see exactly how each metric is computed.

Why no UK Grid API?

Two reasons. First, the upstream APIs are already free and well-documented — there's nothing meaningful we could add by relaying them. Second, running a public API would add a rate-limiting and abuse-prevention layer that the project doesn't need today. If you have a specific case where having UK Grid's normalised Firestore data would be useful, get in touch: hello@andelle.co.

Embedding

The dashboard sets frame-ancestors 'none' in its CSP, so it can't be embedded in an <iframe> on another site. If you want a UK-Grid-style display elsewhere, fork the repo or use the upstream APIs directly.