# Marktstammdatenregister Marktakteure – New Energy Companies (`nordlicht/mastr-market-actors`) Actor

Export newly registered Stromlieferanten, Netzbetreiber, Messstellenbetreiber and other energy companies from the German Marktstammdatenregister. Organisations only by default. $3 per 1,000.

- **URL**: https://apify.com/nordlicht/mastr-market-actors.md
- **Developed by:** [Nordlicht Data](https://apify.com/nordlicht) (community)
- **Categories:** Lead generation, Business, Automation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$3.00 / 1,000 market actors

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Marktstammdatenregister Marktakteure – New Energy Companies in Germany

**Export newly registered energy companies from the German Marktstammdatenregister (MaStR) as JSON, CSV or Excel.** The Actor reads the public Marktakteur list of the Bundesnetzagentur and returns one row per MaStR number: market function, roles, registration date, activity status, state, postcode and, for companies, the name and address. Private individuals are dropped by default. No API key and no MaStR web-service account.

Use it as a weekly **B2B lead list** of new Stromlieferanten, Netzbetreiber and other energy-market companies, or as a monitor of who entered the register.

### What does it do?

- Reads the public list at [marktstammdatenregister.de](https://www.marktstammdatenregister.de) (`GetOeffentlicheMarktakteure`).
- Loads each selected **Marktfunktion** in its own request. The register does not accept `OR`.
- Always applies a **registration window**. The default is the last 7 calendar days in Europe/Berlin.
- Filters by **Bundesland** with the register's numeric state id, and optionally keeps only **Aktiv** actors.
- Default `organisationsOnly` drops natural persons, sole traders and GbR names, so the list is usable for B2B outreach.
- Optional `onlyNew` remembers each MaStR number, so a weekly schedule delivers and bills each company once.
- Sends one request at a time, with at least 1.2 seconds between requests, and retries on HTTP 429, 5xx and timeouts.

### Who is it for? Use cases

- **Sales and partnerships:** new Stromlieferanten, Direktvermarkter and Stromgroßhändler (`Akteur im Strommarkt`) by Bundesland and registration week.
- **Grid and metering:** Stromnetzbetreiber and Gasnetzbetreiber, including those whose `marketRoles` include Messstellenbetreiber.
- **Services and installers:** `Sonstiger Marktakteur` (role Dienstleister), for example new technical service companies.
- **Market monitoring:** who registered this week, which function, which state, whether the activity status is Aktiv.
- **Join to units:** a grid operator's `mastrNumber` (prefix `SNB`) is the same MaStR number the [solar, wind and battery export](https://apify.com/nordlicht/mastr-energy-assets) returns as `gridOperatorMastrNr`.

### Market functions

The register filters `Marktfunktion` by a numeric id. These labels were verified on 23 November 2026. Stromlieferant is not an id: the text value is rejected. Role filters (`Marktrollen`) do not work, so roles are returned on the row and are not a separate query.

| Input label | Id | What the rows are |
| --- | --- | --- |
| Stromnetzbetreiber | 1 | Electricity grid operators. Roles include Anschlussnetzbetreiber and often Messstellenbetreiber. |
| Anlagenbetreiber | 2 | Plant operators. About 5.8 million rows, mostly private persons. Off by default. |
| Akteur im Strommarkt | 3 | Electricity-market companies. Roles include Stromlieferant, Direktvermarkter and Stromgroßhändler. |
| Organisierter Marktplatz | 4 | Exchanges. A handful of rows. |
| Behörde, Verband, Institution | 5 | Authorities and institutions. |
| Sonstiger Marktakteur | 6 | Other market actors, typically Dienstleister. |
| Bundesnetzagentur | 7 | The agency itself. One row. |
| Gasnetzbetreiber | 8 | Gas grid operators. |
| Akteur im Gasmarkt | 9 | Gas-market companies, often Bilanzkreisverantwortliche. |
| Supportpartner | 10 | Support partner. One row. |

The default selection is Stromnetzbetreiber, Gasnetzbetreiber, Akteur im Strommarkt and Sonstiger Marktakteur. That covers Netzbetreiber, Stromlieferanten, Direktvermarkter and service companies. Messstellenbetreiber appears in `marketRoles` on many of those rows. It is not its own Marktfunktion.

On 23 November 2026 a window from 17 November (the Actor's default "7 days") held 13 Akteur im Strommarkt and 16 Sonstiger Marktakteur, and no new Stromnetzbetreiber or Gasnetzbetreiber. The wider probe `gt 16.11.2026` also pulled in 16 November, because `gt` includes the named day: 15 and 23 rows for those two functions, plus 15 Akteur im Gasmarkt. Anlagenbetreiber in that wider window was about 19,000 rows, almost all natural persons. The organisations-only local run pushed 19 companies. See `samples/RUN_REPORT.md`.

### What data do you get?

| Field | Example | Notes |
| --- | --- | --- |
| `mastrNumber` | SOM978381689766 | One row per MaStR number |
| `name`, `nameWithheld` | windcomp GmbH, false | Emptied when the name is withheld |
| `marketFunction`, `marketFunctionId` | Sonstiger Marktakteur, 6 | |
| `marketRoles` | \["Dienstleister"] | Not filterable on the server |
| `registeredAt`, `lastUpdatedAt` | 2026-11-22 | Europe/Berlin calendar days |
| `activityStart`, `activityEnd`, `activityStatus` | Aktiv | Start is often empty for new service companies |
| `bundesland`, `country`, `postcode`, `city` | Berlin, Deutschland, 10999 | |
| `street`, `houseNumber` | | Organisations with a legal-form token |
| `registerCourt`, `registerNumber`, `vatId` | | Organisations |
| `acerCode`, `bnetzaOperatingNumber` | | When the register publishes them |
| `isOrganisation`, `isSme` | true, null | SME is often null |
| `closedDistributionNetwork`, `over100kCustomers` | | Grid operators |
| `mastrUrl` | public detail page | Checked once: HTTP 200 |
| `source`, `license`, `fetchedAt` | dl-de/by-2-0 | Attribution on every row |

A company that holds two market functions has two MaStR numbers and stays two rows.

### How to use it

1. Click **Try for free** (or **Start**).
2. Keep the default market functions, or add Akteur im Gasmarkt.
3. Leave **Registered since** at `7 days` for a weekly list. Set a `YYYY-MM-DD` date to start further back.
4. Optionally pick **Bundesländer** or **Active only**.
5. Click **Start** and download the companies as Excel, CSV or JSON.

Leave **Anlagenbetreiber** off unless you really want plant operators. That function is millions of private persons. With `organisationsOnly` those persons are dropped after download and are not charged, but the run still has to read them.

### Input example

```json
{
  "marketFunctions": [
    "Stromnetzbetreiber",
    "Gasnetzbetreiber",
    "Akteur im Strommarkt",
    "Sonstiger Marktakteur"
  ],
  "bundeslaender": ["Bayern", "Nordrhein-Westfalen"],
  "registeredSince": "7 days",
  "registeredUntil": "2026-11-23",
  "organisationsOnly": true,
  "activeOnly": false,
  "maxItems": 1000,
  "onlyNew": false
}
```

- `registeredSince` is `"7 days"` or an inclusive `YYYY-MM-DD`. `"7 days"` means the seven Berlin days ending today. The register's `gt` includes that calendar day; `ge` returns no rows. An end date uses `lt` of the following day.
- `registeredUntil` is optional and inclusive. Empty means through today.
- `bundeslaender` uses the state names above. `nrw` is accepted as Nordrhein-Westfalen. Empty means every state.
- `organisationsOnly` defaults to true. `onlyNew` defaults to false. `maxItems` defaults to 1000 and cannot exceed 50000.
- `activeOnly` keeps `Tätigkeitsstatus` Aktiv. There is no input for activity-start date. The register can filter `Tätigkeitsbeginn`, but many new Sonstige Marktakteure have that field empty, so a start filter would drop them.

### Output example

First row of the 23 November 2026 local run (organisations, last 7 days). The other 18 rows are in `samples/sample-output.json`.

```json
{
  "mastrNumber": "SOM953554980413",
  "name": "Hasani Elektrotechnik GmbH",
  "nameWithheld": false,
  "marketFunction": "Sonstiger Marktakteur",
  "marketFunctionId": 6,
  "marketRoles": ["Dienstleister"],
  "registeredAt": "2026-11-22",
  "lastUpdatedAt": "2026-11-22",
  "activityStart": null,
  "activityEnd": null,
  "activityStatus": "Aktiv",
  "bundesland": "Baden-Württemberg",
  "country": "Deutschland",
  "postcode": "71334",
  "city": "Waiblingen",
  "street": "Eberhardstraße",
  "houseNumber": "29",
  "registerCourt": "Stuttgart",
  "registerNumber": "HRB759999",
  "vatId": "DE312695403",
  "acerCode": null,
  "bnetzaOperatingNumber": null,
  "isOrganisation": true,
  "isSme": null,
  "closedDistributionNetwork": null,
  "over100kCustomers": null,
  "mastrUrl": "https://www.marktstammdatenregister.de/MaStR/Akteur/Marktakteur/DetailOeffentlich/7606375",
  "source": "Datenquelle: Marktstammdatenregister der Bundesnetzagentur",
  "license": "dl-de/by-2-0",
  "fetchedAt": "2026-11-23T08:31:15.996Z"
}
```

### How much does it cost?

Pay per result: **$0.003 per company ($3 per 1,000).** No start fee.

A weekly list of 40 new organisations costs 40 × $0.003 = **$0.12**. A run of 1,000 companies costs $3. Rows dropped as private persons or sole traders, rows outside the filters, and MaStR numbers skipped by `onlyNew` are not dataset items and are not charged.

See [PRICING.md](PRICING.md) for the pay-per-event setup. This Actor does not call a billing API.

### Schedule a weekly lead list

1. Set `onlyNew` to true and leave `registeredSince` at `7 days` (or `14 days` to catch a late registration).
2. Save a task and schedule it in Europe/Berlin, for example `0 7 * * 1` (Monday 07:00).
3. Send the new companies to Google Sheets, a CRM, Slack, Make, Zapier or n8n.

### Use it through the API (curl, Python, JavaScript)

Every run can be started from code. Get your token in Apify Console under **Settings → API & Integrations**.

**curl** (runs the Actor and returns the dataset items in one call; the synchronous endpoint waits up to 300 seconds):

```bash
curl -X POST "https://api.apify.com/v2/acts/nordlicht~mastr-market-actors/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"marketFunctions":["Akteur im Strommarkt","Sonstiger Marktakteur"],"registeredSince":"7 days","maxItems":200,"onlyNew":false}'
```

**Python** (`pip install apify-client`):

```python
import os
from apify_client import ApifyClient

client = ApifyClient(os.environ["APIFY_TOKEN"])
run = client.actor("nordlicht/mastr-market-actors").call(run_input={
    "marketFunctions": ["Akteur im Strommarkt", "Sonstiger Marktakteur"],
    "registeredSince": "7 days",
    "maxItems": 200,
    "onlyNew": False,
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["mastrNumber"], item["name"], item["marketFunction"])
```

**JavaScript / Node.js** (`npm install apify-client`):

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

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('nordlicht/mastr-market-actors').call({
    marketFunctions: ['Akteur im Strommarkt', 'Sonstiger Marktakteur'],
    registeredSince: '7 days',
    maxItems: 200,
    onlyNew: false,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

You can also export any dataset as JSON, CSV, Excel or XML, or connect the run to Make, Zapier, n8n, Google Sheets, Slack or a webhook.

### FAQ

**Is it legal to use Marktstammdatenregister data?** Yes. The Bundesnetzagentur publishes the public MaStR data under the **Datenlizenz Deutschland – Namensnennung – Version 2.0** (dl-de/by-2-0), which allows commercial use with attribution. Credit: "Datenquelle: Marktstammdatenregister der Bundesnetzagentur, dl-de/by-2-0". This extract is filtered and anonymised, so say that the data was modified. Every row repeats `source` and `license`. Licence text: [govdata.de/dl-de/by-2-0](https://www.govdata.de/dl-de/by-2-0).

**How are private individuals handled?** With `organisationsOnly` (the default) they are not output at all: PersonenArt 518, and any name MaStR already replaced with "(natürliche Person)". Sole traders (`e.K.`, `Inh.`, Einzelunternehmen), GbR / eGbR, and names without a corporate or public token (GmbH, AG, KG, UG, e.G., Stadt, Gemeinde, Stadtwerke and similar) are dropped the same way. Turn `organisationsOnly` off to keep those rows with the name, street, house number and VAT id set to null. Sole traders still keep postcode and city. Natural persons do not: name, street, house number, postcode, city and VAT id are emptied. Emails and phone numbers are stripped from text fields. German law (UWG) restricts unsolicited advertising by phone and email.

**Why is a name sometimes null?** It was withheld. `nameWithheld` is then true. In the default mode that row is not in the dataset at all.

**Can one company appear twice?** Yes. MaStR can give two numbers to the same name and the same commercial register entry, sometimes with different roles. In the 23 November run, Hasani Elektrotechnik GmbH had two `SOM` numbers on the same day. The Actor dedupes on the MaStR number only.

**Why can I not select only Stromlieferant?** The public list filters Marktfunktion by id. Stromlieferant, Direktvermarkter and Messstellenbetreiber are roles. Selecting Akteur im Strommarkt returns the suppliers together with direct marketers and wholesalers. Filter `marketRoles` in your sheet if you need one role.

**How fresh is the data?** The Actor reads the live public register, sorted by registration date, newest first. A morning run sees companies registered on previous days and, where MaStR already shows them, today.

**Do I need a MaStR web-service API key?** No. The Actor uses the public list that the register website itself uses.

### Auf Deutsch: Marktakteure aus dem Marktstammdatenregister

Mit diesem Actor exportieren Sie **neu registrierte Marktakteure** aus dem Marktstammdatenregister der Bundesnetzagentur als Excel, CSV oder JSON. Eine Zeile ist eine MaStR-Nummer: Marktfunktion, Marktrollen, Registrierungsdatum, Tätigkeitsstatus, Bundesland, PLZ, Ort und – bei Unternehmen – Name und Anschrift.

Die Standardauswahl liefert **Stromnetzbetreiber**, **Gasnetzbetreiber**, **Akteure im Strommarkt** (darunter Stromlieferanten, Direktvermarkter und Stromgroßhändler) und **sonstige Marktakteure** (Dienstleister). Messstellenbetreiber stehen im Feld `marketRoles`, weil das Register diese Rolle nicht als eigene Marktfunktion filtert. Anlagenbetreiber bleiben aus: das sind rund 5,8 Millionen Einträge, überwiegend natürliche Personen.

`registeredSince` ist standardmäßig `"7 days"` (die letzten sieben Kalendertage, Europe/Berlin) oder ein Datum `YYYY-MM-DD`. `organisationsOnly` (Standard) entfernt natürliche Personen, Einzelunternehmen, e.K. und GbR. Diese Zeilen werden nicht berechnet. `onlyNew` merkt sich jede MaStR-Nummer für den nächsten Lauf. Preis: **0,003 $ pro Unternehmen, 3 $ je 1.000**, keine Startgebühr.

Datenquelle: Marktstammdatenregister der Bundesnetzagentur, dl-de/by-2-0. Der Auszug ist gefiltert und gekürzt. Bitte nennen Sie die Quelle und weisen Sie auf die Bearbeitung hin.

### Related Actors

| Actor | What you get |
| --- | --- |
| [Marktstammdatenregister (MaStR) Export](https://apify.com/nordlicht/mastr-energy-assets) | New solar, wind and battery units. `gridOperatorMastrNr` joins to `mastrNumber` here. |
| [EEG Auction Results Germany](https://apify.com/nordlicht/german-eeg-auction-awards) | Bundesnetzagentur EEG awards, with capacity, site and register numbers. |

Same source family, same licence, separate datasets: units and auction awards on one side, the companies that operate in the market on the other.

### Local build

```bash
npm install
npm test
npm run local
```

`npm run local` uses `examples/INPUT.json` when `storage/key_value_stores/default/INPUT.json` is missing. The verified local run used `maxItems` 50 and the last 7 days. Results and fill rates are written to the local key-value store as `RUN_STATS`. Nothing is pushed to Apify.

# Actor input Schema

## `marketFunctions` (type: `array`):

Marktfunktion values, one query each (the register does not accept OR). Stromlieferant, Direktvermarkter and Stromgroßhändler are roles of Akteur im Strommarkt, not separate functions. Messstellenbetreiber is a role, usually on a grid operator, and is returned in marketRoles. Anlagenbetreiber is about 5.8 million rows, mostly private persons, and is off by default. A registration date window is always applied.

## `bundeslaender` (type: `array`):

German states. Leave empty for every state. The register is filtered by its numeric state id.

## `registeredSince` (type: `string`):

"7 days" (default) is the seven calendar days ending today in Europe/Berlin. Or a first day YYYY-MM-DD, inclusive. A date window is always required.

## `registeredUntil` (type: `string`):

Optional last registration day (YYYY-MM-DD), inclusive. Leave empty to include today.

## `organisationsOnly` (type: `boolean`):

Drop natural persons (PersonenArt 518 and names MaStR replaced with natürliche Person) and names without a legal-form token, including sole traders (e.K., Inh.) and GbR. Those rows are not charged. Turn this off to keep them with name, street, house number and VAT id emptied.

## `activeOnly` (type: `boolean`):

Keep Marktakteure whose Tätigkeitsstatus is Aktiv.

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

Stop after this many output companies. Default 1000, maximum 50000. You pay per company that is pushed.

## `onlyNew` (type: `boolean`):

Remember each MaStR number in the key-value store mastr-market-actors-state. A number that was pushed before is not pushed again and is not charged.

## Actor input object example

```json
{
  "marketFunctions": [
    "Stromnetzbetreiber",
    "Gasnetzbetreiber",
    "Akteur im Strommarkt",
    "Sonstiger Marktakteur"
  ],
  "registeredSince": "7 days",
  "organisationsOnly": true,
  "activeOnly": false,
  "maxItems": 1000,
  "onlyNew": false
}
```

# Actor output Schema

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

One energy company per row: Stromlieferanten, Netzbetreiber and other Marktakteure.

# 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 = {
    "marketFunctions": [
        "Stromnetzbetreiber",
        "Gasnetzbetreiber",
        "Akteur im Strommarkt",
        "Sonstiger Marktakteur"
    ],
    "registeredSince": "7 days",
    "organisationsOnly": true,
    "activeOnly": false,
    "maxItems": 1000,
    "onlyNew": false
};

// Run the Actor and wait for it to finish
const run = await client.actor("nordlicht/mastr-market-actors").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 = {
    "marketFunctions": [
        "Stromnetzbetreiber",
        "Gasnetzbetreiber",
        "Akteur im Strommarkt",
        "Sonstiger Marktakteur",
    ],
    "registeredSince": "7 days",
    "organisationsOnly": True,
    "activeOnly": False,
    "maxItems": 1000,
    "onlyNew": False,
}

# Run the Actor and wait for it to finish
run = client.actor("nordlicht/mastr-market-actors").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 '{
  "marketFunctions": [
    "Stromnetzbetreiber",
    "Gasnetzbetreiber",
    "Akteur im Strommarkt",
    "Sonstiger Marktakteur"
  ],
  "registeredSince": "7 days",
  "organisationsOnly": true,
  "activeOnly": false,
  "maxItems": 1000,
  "onlyNew": false
}' |
apify call nordlicht/mastr-market-actors --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,nordlicht/mastr-market-actors"
        }
    }
}
```

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/cICp17aiIMR8Eg9Tw/builds/sKHFKVb4HF2r0Pmgs/openapi.json
