# Elexon BMRS GB Generation Scraper (`parseforge/elexon-bmrs-generation-scraper`) Actor

Pull GB actual electricity generation per fuel type from the Elexon BMRS Insights API. Get psrType, quantity in MW, settlement period, and start time for wind, solar, nuclear, gas, and more. Output to CSV, Excel, JSON, or XML for grid and energy analysis.

- **URL**: https://apify.com/parseforge/elexon-bmrs-generation-scraper.md
- **Developed by:** [ParseForge](https://apify.com/parseforge) (community)
- **Categories:** Automation, Developer tools, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.63 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

![ParseForge Banner](https://github.com/ParseForge/apify-assets/blob/ad35ccc13ddd068b9d6cba33f323962e39aed5b2/banner.jpg?raw=true)

## ⚡ Elexon BMRS GB Generation Scraper

> 🚀 **Export Great Britain's live power mix in seconds.** Pull actual electricity generation per fuel type straight from the official Elexon BMRS Insights API, with no key and no login.

> 🕒 **Last updated:** 2026-06-08 · **📊 5 fields** per record · GB transmission grid · 11 fuel types per settlement period

Turn the Elexon BMRS Insights feed into clean, structured records you can drop into a dashboard, a model, or a warehouse. Pick a UTC time window and get one row per fuel type per 30 minute settlement period, showing exactly how many megawatts each source put onto the GB grid.

Coverage is the GB transmission system actual generation outturn (dataset AGPT) as Elexon publishes it: biomass, fossil gas, coal and oil, nuclear, hydro, pumped storage, solar, and both onshore and offshore wind, each tagged with its business type and settlement period.

| 🎯 Target Audience | 💡 Primary Use Cases |
|---|---|
| Energy analysts and traders | Track the GB fuel mix period by period |
| Grid and renewables researchers | Measure wind and solar contribution |
| Data scientists and modellers | Feed generation series into forecasts |
| Sustainability and ESG teams | Report on low carbon generation share |

### 📋 What the Elexon BMRS GB Generation Scraper does

This Actor calls the public Elexon BMRS Insights API and flattens the nested response into one clean record per fuel type per settlement period:

- **Fuel breakdown** — psrType such as Wind Offshore, Wind Onshore, Solar, Nuclear, Biomass, Fossil Gas, and more.
- **Output level** — quantity in megawatts for each fuel in each 30 minute period.
- **Time context** — settlement period number and the UTC start time of that period.
- **Category** — the business type Elexon assigns, like Production, Wind generation, or Solar generation.

You choose the UTC time window and how many records come back, and every record carries a `scrapedAt` timestamp.

### 🎬 Full Demo (_🚧 Coming soon_)

### ⚙️ Input

| Field | Type | Description |
|---|---|---|
| `from` | string | Start of the UTC time window in ISO 8601, for example `2026-06-06T00:00Z`. |
| `to` | string | End of the UTC time window in ISO 8601, for example `2026-06-06T03:00Z`. |
| `maxItems` | integer | How many records to return. Free plan is capped at 10. |

**Example 1 — a three hour window**
```json
{
    "from": "2026-06-06T00:00Z",
    "to": "2026-06-06T03:00Z",
    "maxItems": 50
}
````

**Example 2 — a single early morning hour**

```json
{
    "from": "2026-06-06T01:00Z",
    "to": "2026-06-06T02:00Z",
    "maxItems": 11
}
```

> ⚠️ **Good to Know:** Elexon returns a settlement period only once the whole 30 minute period falls inside your window, and the most recent periods may lag real time by a short publishing delay. Widen the window or step back a few hours if a query comes back empty.

### 📊 Output

Each record looks like this:

| Field | Description |
|---|---|
| ⚡ `psrType` | Fuel type, for example Wind Offshore or Nuclear |
| 🔌 `quantityMw` | Generation for that fuel in megawatts |
| 🏭 `businessType` | Elexon business category, e.g. Production or Wind generation |
| 🔢 `settlementPeriod` | Settlement period number within the day |
| 🕒 `startTime` | UTC start time of the settlement period |
| 🕒 `scrapedAt` | Collection timestamp |
| ❌ `error` | Null on success |

**Real sample — biomass**

```json
{
    "psrType": "Biomass",
    "quantityMw": 2390,
    "businessType": "Production",
    "settlementPeriod": 5,
    "startTime": "2026-06-06T01:00:00Z",
    "scrapedAt": "2026-06-08T22:19:54.070Z",
    "error": null
}
```

**Real sample — nuclear**

```json
{
    "psrType": "Nuclear",
    "quantityMw": 2577,
    "businessType": "Production",
    "settlementPeriod": 5,
    "startTime": "2026-06-06T01:00:00Z",
    "scrapedAt": "2026-06-08T22:19:54.296Z",
    "error": null
}
```

**Real sample — offshore wind**

```json
{
    "psrType": "Wind Offshore",
    "quantityMw": 3348,
    "businessType": "Wind generation",
    "settlementPeriod": 5,
    "startTime": "2026-06-06T01:00:00Z",
    "scrapedAt": "2026-06-08T22:19:54.389Z",
    "error": null
}
```

### ✨ Why choose this Actor

- One clean row per fuel per period, instead of a deeply nested payload you have to flatten yourself.
- Pulls straight from the official Elexon BMRS Insights API, the same source the GB market uses.
- No API key, no registration, and no login required.
- Megawatt values and settlement periods land in stable, database friendly field names.
- Onshore and offshore wind are reported separately, so renewable analysis is easy.

### 📈 How it compares to alternatives

| Approach | Effort | Structured rows | Flattened per fuel | Maintenance |
|---|---|---|---|---|
| This Actor | One run | Yes | Yes | None on your side |
| Reading the raw BMRS API | Hours | Nested | Manual | You own the parsing |
| Copying from a dashboard | Tedious | Inconsistent | Manual | Constant |

### 🚀 How to use

1. Create a free Apify account using [this sign-up link](https://console.apify.com/sign-up?fpr=vmoqkp).
2. Open the Elexon BMRS GB Generation Scraper.
3. Set `from` and `to` to the UTC window you want.
4. Set `maxItems` to the number of records you want.
5. Click **Start** and grab your results when the run finishes.

### 💼 Business use cases

#### Energy trading and analysis

| Goal | How this helps |
|---|---|
| Track the GB fuel mix | Pull every fuel's megawatts per period |
| Spot ramp ups and ramp downs | Compare quantity across settlement periods |

#### Renewables and grid research

| Goal | How this helps |
|---|---|
| Measure wind contribution | Sum onshore and offshore wind output |
| Study solar by time of day | Read solar quantity per settlement period |

#### Data science and forecasting

| Goal | How this helps |
|---|---|
| Build generation time series | Snapshot windows on a schedule |
| Feed models with clean inputs | Use consistent psrType and quantityMw fields |

#### Sustainability reporting

| Goal | How this helps |
|---|---|
| Report low carbon share | Group nuclear, wind, solar, and hydro |
| Document the carbon intensity story | Pair fuel mix data with emissions factors |

### 🔌 Automating Elexon BMRS GB Generation Scraper

Connect runs to the tools you already use:

- **Make** and **Zapier** to trigger runs and route records into sheets or databases.
- **Slack** to post a fuel mix summary when a run finishes.
- **Airbyte** to load results into a warehouse.
- **GitHub** Actions to schedule periodic snapshots.
- **Google Drive** to archive each run's output.

### 🌟 Beyond business use cases

- **Research:** study how the GB grid balances renewables against thermal plant.
- **Personal:** build your own live power mix tracker.
- **Non-profit:** power a community clean energy dashboard.
- **Experimentation:** prototype an energy data app without writing a scraper.

### 🤖 Ask an AI assistant

Paste your results into [ChatGPT](https://chat.openai.com), [Claude](https://claude.ai), [Perplexity](https://www.perplexity.ai), or [Microsoft Copilot](https://copilot.microsoft.com) and ask it to rank fuels by output, compute the renewable share, or chart generation across settlement periods.

### ❓ Frequently Asked Questions

**Do I need an Elexon or BMRS account?**
No. The Actor reads the public Elexon BMRS Insights API, which needs no login.

**Do I need an API key?**
No key is required. The Actor sends a descriptive User-Agent as Elexon requests.

**What does psrType mean?**
It is the power system resource type, in other words the fuel or technology, such as Wind Offshore, Solar, Nuclear, or Fossil Gas.

**What is a settlement period?**
The GB market splits each day into 48 half hour settlement periods. Period 1 starts at midnight UTC, and each record shows the period number and its UTC start time.

**Are the quantities in megawatts?**
Yes. `quantityMw` is the actual generation for that fuel during that settlement period, in megawatts.

**Why did my window return nothing?**
A period appears only after its full 30 minutes fall inside your window, and very recent periods may not be published yet. Widen the window or move it back a few hours.

**Are onshore and offshore wind separated?**
Yes. They come back as distinct psrType values, Wind Onshore and Wind Offshore.

**Which grid does this cover?**
The Great Britain transmission system actual generation outturn published by Elexon.

**How fresh is the data?**
Each run pulls live from the Elexon BMRS API, so it reflects what has been published for your window at run time.

**Can I schedule this?**
Yes. Use Apify Schedules to snapshot the GB fuel mix on any cadence.

### 🔌 Integrate with any app

Results are available through the Apify API, so you can pull them into any app, database, or workflow you already run.

### 🔗 Recommended Actors

- [Have I Been Pwned Breaches Catalog Scraper](https://apify.com/parseforge)
- [Bank of England IADB Scraper](https://apify.com/parseforge)
- More data and reference Actors in the [ParseForge collection](https://apify.com/parseforge)

> 💡 **Pro Tip:** browse the complete [ParseForge collection](https://apify.com/parseforge).

**🆘 Need Help?** [Open our contact form](https://tally.so/r/BzdKgA)

> **⚠️ Disclaimer:** independent tool, not affiliated with Elexon or BMRS. Only publicly available data is collected.

# Actor input Schema

## `from` (type: `string`):

Start of the time window in UTC ISO 8601, for example 2026-06-06T00:00Z. The Elexon BMRS API returns settlement periods that fall within this window.

## `to` (type: `string`):

End of the time window in UTC ISO 8601, for example 2026-06-06T03:00Z. Keep windows reasonable; very long windows return many settlement periods.

## `maxItems` (type: `integer`):

Free users: Limited to 10 items (preview). Paid users: Optional, max 1,000,000

## Actor input object example

```json
{
  "from": "2026-06-06T00:00Z",
  "to": "2026-06-06T03:00Z",
  "maxItems": 10
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "from": "2026-06-06T00:00Z",
    "to": "2026-06-06T03:00Z",
    "maxItems": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("parseforge/elexon-bmrs-generation-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "from": "2026-06-06T00:00Z",
    "to": "2026-06-06T03:00Z",
    "maxItems": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("parseforge/elexon-bmrs-generation-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "from": "2026-06-06T00:00Z",
  "to": "2026-06-06T03:00Z",
  "maxItems": 10
}' |
apify call parseforge/elexon-bmrs-generation-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=parseforge/elexon-bmrs-generation-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Elexon BMRS GB Generation Scraper",
        "description": "Pull GB actual electricity generation per fuel type from the Elexon BMRS Insights API. Get psrType, quantity in MW, settlement period, and start time for wind, solar, nuclear, gas, and more. Output to CSV, Excel, JSON, or XML for grid and energy analysis.",
        "version": "0.1",
        "x-build-id": "YGYmQaHJDcTcsJ9aI"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/parseforge~elexon-bmrs-generation-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-parseforge-elexon-bmrs-generation-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/parseforge~elexon-bmrs-generation-scraper/runs": {
            "post": {
                "operationId": "runs-sync-parseforge-elexon-bmrs-generation-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/parseforge~elexon-bmrs-generation-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-parseforge-elexon-bmrs-generation-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "from": {
                        "title": "From (UTC)",
                        "type": "string",
                        "description": "Start of the time window in UTC ISO 8601, for example 2026-06-06T00:00Z. The Elexon BMRS API returns settlement periods that fall within this window."
                    },
                    "to": {
                        "title": "To (UTC)",
                        "type": "string",
                        "description": "End of the time window in UTC ISO 8601, for example 2026-06-06T03:00Z. Keep windows reasonable; very long windows return many settlement periods."
                    },
                    "maxItems": {
                        "title": "Max Items",
                        "minimum": 1,
                        "maximum": 1000000,
                        "type": "integer",
                        "description": "Free users: Limited to 10 items (preview). Paid users: Optional, max 1,000,000"
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
