# German Energy Assets Scraper (MaStR) (`pohjastudio/german-energy-assets-mastr-scraper`) Actor

Scrape German solar, wind, battery and other power units from the official Marktstammdatenregister: capacity, location, commissioning date, operator and grid operator.

- **URL**: https://apify.com/pohjastudio/german-energy-assets-mastr-scraper.md
- **Developed by:** [Pohja Studio](https://apify.com/pohjastudio) (community)
- **Categories:** Business
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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

## German Energy Assets Scraper (MaStR)

Scrape Germany's official energy-unit registry — the **Marktstammdatenregister (MaStR)** — for solar, wind, battery, biomass, hydro and conventional generation units. Every power-generating installation in Germany must be registered here by law, which makes it the complete picture of who generates electricity, where, at what capacity, and since when.

9.3 million registered units. No API key, no account.

### What you get

| Field | Description |
|---|---|
| `unitName`, `mastrNumber` | Unit designation and its registry number |
| `energySource` | Solar, wind, battery storage, biomass, hydro, natural gas, … |
| `grossPowerKw`, `netPowerKw` | Installed capacity |
| `operationalStatus` | In operation, planned, temporarily or permanently shut down |
| `commissionedAt`, `plannedCommissioningAt`, `decommissionedAt`, `registeredAt` | Full lifecycle dates |
| `postalCode`, `city`, `municipality`, `district`, `state`, `street`, `latitude`, `longitude` | Location |
| `operatorName`, `operatorMastrNumber`, `operatorIsCompany` | Who runs the unit |
| `gridOperatorName`, `gridOperatorMastrNumber` | Which grid it feeds |
| `solarModuleCount`, `solarOrientation`, `solarInstallationType` | Solar-specific detail |
| `eegInstalledPowerKw`, `eegNumber` | Renewable Energy Act registration |
| `url` | Direct link to the unit in the registry |

### Use cases

- **Solar, heat-pump and battery installers** — find every commercial-scale system in your service area, with capacity, age and operator, to target maintenance, repowering and battery-retrofit offers.
- **Repowering and O\&M providers** — filter by commissioning date to find installations reaching end of subsidy or end of life.
- **Energy sales and PPA origination** — locate operators above a capacity threshold in a given region.
- **Grid and market analysts** — capacity build-out by technology, region and year.
- **M\&A and asset scouting** — portfolios by operator across municipalities.

### Input

| Option | Description |
|---|---|
| `cities` | German city names, spelled as the registry stores them (`München`, not `Munich`). |
| `municipalities` | Municipality names, where the Gemeinde differs from the city. |
| `energySources` | `solar`, `wind`, `battery`, `biomass`, `hydro`, `naturalGas`, `geothermal`, `nuclear`. |
| `minPowerKw` / `maxPowerKw` | Capacity window. A domestic rooftop array is roughly 3–15 kW, a commercial rooftop 30–750 kW. |
| `postalCodePrefix` | Narrow to part of a city, e.g. `20`. |
| `operationalStatus` | Defaults to units in operation. |
| `commissionedAfter` / `commissionedBefore` | Commissioning window. |
| `registeredAfter` | Monitor newly registered units. |
| `onlyCompanyOperators` | Keep only units run by a legal entity. |
| `maxItems`, `pageSize`, `includeRawFields` | Run size, request size, raw payload. |

#### Example: commercial rooftop solar in Hamburg

```json
{
  "cities": ["Hamburg"],
  "energySources": ["solar"],
  "minPowerKw": 30,
  "onlyCompanyOperators": true,
  "operationalStatus": "In Betrieb",
  "maxItems": 500
}
```

#### Example: battery storage added this year across three cities

```json
{
  "cities": ["München", "Köln", "Stuttgart"],
  "energySources": ["battery"],
  "registeredAfter": "2026-01-01T00:00:00Z"
}
```

### How filtering works

The registry only applies **location** filters on its side. Everything else — technology, capacity, dates, operator type — is applied by this Actor over the rows it reads, which is why a location is worth giving: with one it reads a city's few tens of thousands of rows, without one it starts at the top of all 9.3 million.

Capacity and status filters are strict: a unit with no capacity recorded does not pass a `minPowerKw` filter rather than slipping through.

### Privacy

The registry pseudonymises units held by private individuals — they appear as `natürliche Person (ABR…)` with no name or street. This Actor keeps it that way: `operatorName` is only populated for legal entities, and `onlyCompanyOperators` restricts output to those. No attempt is made to re-identify private operators.

### Pricing

Billed per unit delivered. Rows that are read but filtered out, and duplicates, are not charged.

# Actor input Schema

## `cities` (type: `array`):

German city names, spelled exactly as the registry stores them (München, not Munich). This is the only filter the registry applies itself, so listing cities is what keeps a run fast.

## `municipalities` (type: `array`):

Municipality names, for areas where the Gemeinde differs from the city name.

## `energySources` (type: `array`):

Keep only these technologies. Leave empty for all.

## `minPowerKw` (type: `integer`):

Drop units below this gross capacity. Useful for skipping small rooftop systems: a domestic PV array is typically 3–15 kW, a commercial rooftop 30–750 kW.

## `maxPowerKw` (type: `integer`):

Drop units above this gross capacity.

## `postalCodePrefix` (type: `string`):

Keep only units whose postal code starts with this, e.g. 20 for northern Hamburg.

## `operationalStatus` (type: `string`):

Registry status of the unit.

## `commissionedAfter` (type: `string`):

Only units that went into operation on or after this date.

## `commissionedBefore` (type: `string`):

Only units that went into operation before this date.

## `registeredAfter` (type: `string`):

Only units registered in MaStR on or after this date. Use this to monitor new additions.

## `onlyCompanyOperators` (type: `boolean`):

Keep only units operated by a legal entity. Private individuals are pseudonymised by the registry and carry no usable operator name, so this is the setting to use for B2B research.

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

Stop after this many units. You are charged per unit delivered.

## `pageSize` (type: `integer`):

Rows fetched per request (100–5000). Larger pages are fewer requests but slower each; 1000 is a good balance.

## `includeRawFields` (type: `boolean`):

Attach the untouched registry record under `raw`.

## Actor input object example

```json
{
  "cities": [
    "Hamburg",
    "München",
    "Köln"
  ],
  "operationalStatus": "In Betrieb",
  "onlyCompanyOperators": false,
  "maxItems": 1000,
  "pageSize": 1000,
  "includeRawFields": false
}
```

# Actor output Schema

## `units` (type: `string`):

Solar, wind, battery and other generation units with capacity, location, commissioning date, operator and grid operator.

## `unitsInConsole` (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 = {
    "cities": [
        "Hamburg"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("pohjastudio/german-energy-assets-mastr-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 = { "cities": ["Hamburg"] }

# Run the Actor and wait for it to finish
run = client.actor("pohjastudio/german-energy-assets-mastr-scraper").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "cities": [
    "Hamburg"
  ]
}' |
apify call pohjastudio/german-energy-assets-mastr-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,pohjastudio/german-energy-assets-mastr-scraper"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/JOXbc90jBdvg51APb/builds/cCK6auHz0O2JvgzQ5/openapi.json
