NESO Energy Data Portal API
Free GB electricity data API with no key: the National Energy System Operator's open data catalogue over standard CKAN, covering demand, generation mix and carbon intensity. Tested example included.
Endpoint tested and returned HTTP 200 on 2026-08-21
What is the NESO Energy Data Portal API?
The National Energy System Operator publishes Great Britain's electricity system data through a standard CKAN open data portal that needs no API key. Package search returns dataset metadata — title, licence, tags, maintainer and downloadable resources.
NESO is the body that balances Great Britain's electricity grid second by second, and it publishes the resulting data — demand forecasts, generation mix, carbon intensity, embedded solar and wind estimates, balancing costs — as open data. This portal replaced the old National Grid ESO site, and anything still pointing at `data.nationalgrideso.com` needs updating to `api.neso.energy`.
Because it runs CKAN, the interface is one you may already know. `package_search` finds datasets, `package_show` returns one in full, and `datastore_search` queries the rows of a resource directly with SQL-like filters — meaning you can often skip downloading a CSV entirely. The pattern is two-stage: search the catalogue to find the dataset and its resource id, then query that resource for the actual numbers. That indirection is the main thing to understand before you start.
Quick facts
- Base URL
https://api.neso.energy/api/3/action- Authentication
- No API key for reading the catalogue or querying datastore resources.
- Rate limit
- No published limit. Dataset metadata changes rarely — cache the catalogue.
- Pricing
- Free under the NESO Open Data Licence.
- CORS
- Enabled — callable directly from browser JavaScript
- Official docs
- Read the docs
How to use the NESO Energy Data Portal API
Every request below was executed against the live API on 2026-08-21, and the response shown is the real body it returned — not an illustration.
1. Search the NESO open data catalogue
GET https://api.neso.energy/api/3/action/package_search?rows=1
curl 'https://api.neso.energy/api/3/action/package_search?rows=1'const res = await fetch("https://api.neso.energy/api/3/action/package_search?rows=1");
if (!res.ok) throw new Error(`Request failed: ${res.status}`);
const data = await res.json();
console.log(data);import requests
res = requests.get("https://api.neso.energy/api/3/action/package_search?rows=1", timeout=20)
res.raise_for_status()
print(res.json()){
"help": "https://api.neso.energy/api/3/action/help_show?name=package_search",
"success": true,
"result": {
"count": 129,
"sort": "score desc, metadata_modified desc",
"facets": {},
"results": [
{
"license_title": "NESO Open Data Licence",
"maintainer": "",
"relationships_as_object": [],
"private": false,
"maintainer_email": "",
"num_tags": 5,
"id": "932245c1-2322-4515-bf5e-ea2093ba1333",
"metadata_created": "2019-11-13T07:53:53.901470",
"metadata_modified": "2026-08-21T07:40:17.032942",
"author": "National Grid Electricity System Operator",
"author_email": "",
"state": "active",
"version": "",
"creator_user_id": "91aeb31f-299c-46dc-b289-966044bbfdcd",
"type": "dataset",
"resources": [
{
"force": "true",
"cache_last_updated": null,
"package_id": "932245c1-2322-4515-bf5e-ea2093ba1333",
"datastore_active": true,
"id": "0b7e84ec-eded-4458-b111-d29ba4508e85",
"size": null,
"metadata_modified": "2026-08-21T07:40:17.032942",
"state": "active",
"hash": "",
"description": "This dataset displays all upcoming GTMA (Grid Trade Master Agreement) trades due to be delivered. The data is refreshed every ten minutes.",
"format": "CSV",
"mimetype_inner": null,
"url_type": "datastore",
"mimetype": null,
"cache_url": null,
"name": "UpcomingParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
q | query | Optional | Free-text search across dataset titles and descriptions. carbon intensity |
rows | query | Optional | How many datasets to return. 1 |
start | query | Optional | Offset for paging through search results. 0 |
fq | query | Optional | Filter query on facets such as tags or organisation, in Solr syntax. tags:demand |
/datastore_search | path | Optional | Query the actual rows of a resource by its `resource_id`, rather than the metadata. |
Response fields
successboolean- CKAN envelope flag. Check it before reading `result` — failures come back as `success: false` with an `error` object.
helpstring- URL of CKAN's own documentation for the action you called.
result.countinteger- Total datasets matching the search, not the number returned.
result.sortstring- Ordering applied, by default relevance then modification date.
result.resultsarray- The matching datasets.
result.results[].idstring- Dataset UUID, which `package_show` takes.
result.results[].title / notesstring- Dataset name and description.
result.results[].license_titlestring- Licence, typically the NESO Open Data Licence.
result.results[].metadata_created / metadata_modifiedstring- Timestamps. `metadata_modified` is how you spot a refreshed dataset.
result.results[].author / maintainerstring- Publishing team and contact, frequently empty strings rather than null.
result.results[].resourcesarray- Downloadable files and datastore tables. Each has a `resource_id` you can pass to `datastore_search`.
result.results[].num_tags / state / typeinteger / string- Tag count, publication state and CKAN object type.
What you can build with the NESO Energy Data Portal API
- Chart Great Britain's electricity generation mix over time
- Build a carbon intensity dashboard from grid-operator data
- Query historic demand data without downloading whole CSV files
- Monitor when a dataset was last refreshed before rebuilding a report
Common errors and how to fix them
Old host stops resolving
`data.nationalgrideso.com` was retired when NESO replaced National Grid ESO.
Fix: Point everything at `api.neso.energy`. The CKAN paths are otherwise unchanged.
`success: false`
CKAN returns errors inside a 200 response.
Fix: Always branch on `success` and read the `error` object rather than trusting the HTTP status alone.
Search finds the dataset but no numbers
`package_search` returns metadata only.
Fix: Take a `resource_id` from the `resources` array and call `datastore_search` to get rows.
Empty author and maintainer
CKAN serialises unset fields as empty strings.
Fix: Test for emptiness rather than null when deciding whether to render a contact.
NESO Energy Data Portal API — frequently asked questions
Is the NESO data portal API free?
Yes, free with no key. It is published under the NESO Open Data Licence, which permits commercial reuse with attribution.
What happened to the National Grid ESO API?
NESO replaced National Grid ESO as the system operator, and the portal moved to `api.neso.energy`. The CKAN action paths are the same, so only the host needs changing.
How do I get actual measurements rather than dataset descriptions?
Search the catalogue first, take a `resource_id` from the dataset's `resources` array, then call `datastore_search` against it. That second call returns rows.
Is it the same as the Carbon Intensity API?
Related but separate. The Carbon Intensity API is a purpose-built forecast service; this portal is the broader catalogue of system data including demand, generation mix and balancing.
Tools that pair with this API
Electricity Cost Calculator
Calculate what appliances cost to run: enter watts, hours per day and days per week to get kWh and cost per day, month and year, for a whole list of devices.
CSV Column Statistics Calculator
Profile a CSV column by column: type, blanks, distinct values, min, max, mean, median, standard deviation and percentiles, plus top values — all in-browser.
JSON to CSV Converter
Convert a JSON array of objects to CSV online. Automatic column headers from the union of all keys, delimiter choice and proper quoting — all in-browser.
NESO Energy Data Portal is an independent third-party service and is not affiliated with ByteTools or ByteVancer. Details on this page were verified on 2026-08-21; always check the official documentation before relying on this API in production, as terms and limits can change.