# German Insolvency Notices + Handelsregister Extractor (`brsksr/german-insolvency-commercial-register`) Actor

German company insolvencies from the official insolvenzbekanntmachungen.de as clean JSON: court, file number, procedure, insolvency administrator with contact, claims deadline. Optionally enriched with the structured Handelsregister record (XJustiz SI): share capital, purpose, managing directors.

- **URL**: https://apify.com/brsksr/german-insolvency-commercial-register.md
- **Developed by:** [BRK Data Systems](https://apify.com/brsksr) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.02 / corporate insolvency notice extracted

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

## German Insolvency Notices + Commercial Register (Handelsregister) Extractor

**Every new German company insolvency as clean JSON, with the administrator's contact details and claims deadline. Optionally enriched with the official commercial register record: share capital, business purpose, managing directors.**

This Actor reads the official German insolvency portal [insolvenzbekanntmachungen.de](https://neu.insolvenzbekanntmachungen.de), opens the full text of each court decision and turns it into structured data. On request it then looks up each company on [handelsregister.de](https://www.handelsregister.de) and adds the **structured register content (XJustiz "SI")**. No account and no browser are needed, and every run fetches the data live.

🇩🇪 [Deutsche Beschreibung weiter unten](#deutsch)

### Who uses this

- **Credit management and trade credit insurance:** know on the day of publication when a customer goes into preliminary administration, and file your claim before the deadline (§ 28 InsO).
- **Distressed M\&A, asset buyers, restructuring advisors:** a daily list of companies in insolvency with line of business, share capital and the administrator to contact.
- **Lawyers, insolvency administrators, service providers:** who was appointed where, with the firm's address, phone and e-mail.
- **CRM and risk automation (n8n, Make, Zapier, own code):** flat, stable JSON with one record per notice, ready to match against your customer base by register number.

### Why this Actor

- **The decision, not just the headline.** The portal's result list only shows name, court and file number. This Actor reads every notice and extracts the **procedure** (opened, self-administration, preliminary administration, dismissed for lack of assets), **date and time of the decision**, **grounds** (illiquidity, over-indebtedness), the **insolvency administrator / Sachwalter** with firm, address, phone, fax and e-mail, the **claims deadline** and the **first hearing**.
- **Works with every state's layout.** The 16 federal states publish in different text layouts. The parser was hardened on a corpus of 64 real company notices from all 16 states: decision date found in 64/64, administrator and claims deadline in 32/32 openings.
- **Commercial register in the same record.** Legal form, share capital (including old DEM capital), business purpose, registered address, EUID, managing directors / general partners / limited partners with role and representation rules, Prokura, and the register's own insolvency note.
- **Only companies.** Consumer insolvencies (IK) and private persons are filtered out free of charge using the result list, before any notice is opened.
- **Fair, two-stage pricing.** You pay for a notice only if it was actually parsed. You pay for the register enrichment only if a register record was actually delivered.

### Pricing: two events

| Event | Charged when | Not charged when |
|---|---|---|
| `insolvency-notice-extracted` | The full text of a company notice was loaded **and** parsed into a structured record (procedure, register reference, decision date or administrator) | Notice filtered out (private person, keyword), full text empty or unparseable |
| `commercial-register-enriched` | The XJustiz SI record of that company was downloaded from handelsregister.de **and** parsed (company name plus legal form / seat / officers) | Status `foreign_register`, `not_found`, `skipped_limit`, `disabled`, `no_register` or `error` |

The status of the enrichment is always in `commercialRegister.status`, so you can see exactly what you paid for. See the *Pricing* tab for the current prices. Set a maximum cost per run in the Apify Console. The Actor reserves the price of both events before each register lookup and stops cleanly before exceeding your limit.

### The handelsregister.de limit (60 retrievals per hour)

The terms of use of handelsregister.de allow at most **60 retrievals per hour**. This Actor complies strictly and does **not** rotate proxies or IPs to get around the limit:

- one session per run: the search page is loaded once, then **about 2 requests per company** (search + SI download),
- at least **2 seconds** between two requests,
- `maxEnrichments` (default 15, maximum 25) caps the lookups per run, and a hard cap of 55 requests per run applies on top. 25 lookups are about 51 requests.

Notices beyond the cap are still delivered, with `commercialRegister.status = "skipped_limit"` and without the register event. **If you use `maxEnrichments: 25`, schedule the Actor at most once per hour.** For more companies per day, run it several times spread over the day (for example every hour with 15 lookups), or enrich only the notices you care about (filter by state or keyword).

#### Measured run with the defaults

A real cloud run with the default input (`daysBack: 2`, `maxNotices: 25`, `maxEnrichments: 15`) on 3 November 2026, build 1.0.2, 512 MB memory:

| Metric | Value |
|---|---|
| Run time | **103 s** (status `SUCCEEDED`) |
| Memory | 110 MB average, **122 MB peak** (of 512 MB) |
| Notices | 716 listed, 38 private debtors filtered out, 25 delivered |
| Requests | 58 to the insolvency portal, 22 to handelsregister.de |
| `insolvency-notice-extracted` | 25 × $0.02 = $0.50 |
| `commercial-register-enriched` | 8 × $0.03 = $0.24 |
| Register status of the 25 items | 8 `enriched`, 7 `error`, 10 `skipped_limit` (none of the 17 charged) |
| Platform usage | $0.0024 (0.014 compute units) |

In that run handelsregister.de answered two SI downloads in a row with a read timeout. Build 1.0.2 then stopped enriching for the run and still delivered every notice. Since build 1.0.4 the Actor allows three errors in a row. It has these safeguards so that it always fits into the 300-second timeout of n8n's HTTP node:

- each request to handelsregister.de times out after 25 seconds;
- after three failed lookups in a row, enrichment stops for the rest of the run (status `error`);
- the whole run has a time budget of 240 seconds, and lookups that no longer fit get `skipped_limit`.

### Data protection (GDPR)

- **Always included:** names, roles and representation rules of officers (managing directors, partners, board members, Prokura). These are published in the commercial register for exactly this purpose.
- **Only with `includeOfficerPersonalData: true`:** the officers' **date of birth** (`birthDate`) and **place of residence** (`cityOfResidence`), and the raw "represented by" clause of the notice (which can contain private addresses). By default these fields are `null`, and dates of birth inside the register's free-text entries are redacted (`[geb. redacted]`). Only enable the option if you have a legal basis under Art. 6 GDPR.
- **Nothing is stored between runs.** Insolvency notices are subject to statutory deletion periods (§ 3 InsoBekV). The Actor keeps no cache and no history: each run fetches live data and only writes your run's dataset. Make sure your own downstream storage respects these periods too.

### Input

| Field | Default | Description |
|---|---|---|
| `daysBack` | `2` | Publication days to search, today included (1 to 14; the portal's search window is 14 days) |
| `dateFrom` / `dateTo` | – | Optional explicit period (YYYY-MM-DD, max. 14 days) |
| `subjects` | `EROEFF`, `SICHMASS`, `ABWMASS` | Openings, preliminary measures, dismissals for lack of assets. Also available: `ENT_VERF`, `ENT_AUF_VERF`, `INSO_PLAN`, `SONST` |
| `onlyCorporate` | `true` | Skip consumer and private insolvencies (free) |
| `federalStates` | all | e.g. `["BY", "NW", "BE"]` |
| `nameKeywords` | – | Keep only notices whose company name or text contains one of these words, e.g. `["Bau", "Immobilien", "Logistik"]` |
| `maxNotices` | `25` | Max. extracted notices per run (up to 500) |
| `enrichCommercialRegister` | `true` | Add the Handelsregister SI record |
| `maxEnrichments` | `15` | Max. register lookups per run (up to 25) |
| `includeOfficerPersonalData` | `false` | GDPR opt-in, see above |
| `includeFullText` | `false` | Add the complete text of the court decision |

Example: all openings and preliminary measures in Bavaria and Baden-Württemberg from the last 3 days, construction companies only:

```json
{
  "daysBack": 3,
  "subjects": ["EROEFF", "SICHMASS"],
  "federalStates": ["BY", "BW"],
  "nameKeywords": ["Bau"],
  "maxNotices": 50,
  "maxEnrichments": 15
}
```

### Output

One record per notice. Example (fictitious data, real structure, shortened):

```json
{
  "noticeId": "583abb3d1ff2f1fc",
  "publishedDate": "2026-11-02",
  "subject": "EROEFF",
  "subjectLabel": "Eröffnungen",
  "fileNumber": "1508 IN 9001/26",
  "insolvencyCourt": "München",
  "federalState": "BY",
  "debtorName": "Musterhandel Einrichtungs-GmbH",
  "debtorAddress": { "street": "Beispielstraße 5", "postalCode": "80333", "city": "München" },
  "registerCourt": "München",
  "registerType": "HRB",
  "registerNumber": "900001",
  "procedureType": "opened",
  "procedureLabel": "Eröffnung (Regelinsolvenzverfahren)",
  "decisionDate": "2026-10-30",
  "decisionTime": "09:00",
  "insolvencyGrounds": ["illiquidity", "over_indebtedness"],
  "businessLine": "Handel mit Einrichtungsgegenständen",
  "administrator": {
    "role": "Insolvenzverwalter",
    "profession": "Rechtsanwalt",
    "name": "Beispiel Erika",
    "street": "Musterweg 2",
    "postalCode": "81373",
    "city": "München",
    "phone": "+49(89)1234567",
    "email": "muenchen@kanzlei-beispiel.example"
  },
  "claimsDeadline": "2026-12-16",
  "firstHearingDate": "2027-01-20",
  "shareCapital": 25000.0,
  "managingDirectors": ["Anna Beispiel"],
  "commercialRegister": {
    "status": "enriched",
    "data": {
      "companyName": "Musterhandel Einrichtungs-GmbH",
      "legalForm": "GmbH",
      "seat": "München",
      "businessPurpose": "Handel mit Einrichtungsgegenständen und Zubehör.",
      "shareCapital": { "amount": 25000.0, "currency": "EUR", "type": "Stammkapital" },
      "generalRepresentation": "Ist nur ein Geschäftsführer bestellt, so vertritt er die Gesellschaft allein. …",
      "officers": [
        { "role": "Geschäftsführer(in)", "type": "person", "name": "Anna Beispiel",
          "representation": "einzelvertretungsberechtigt", "birthDate": null, "cityOfResidence": null }
      ],
      "insolvencyNoteInRegister": true,
      "lastEntryDate": "2026-10-12"
    }
  }
}
```

`procedureType` is one of `opened`, `opened_self_administration`, `protective_shield`, `preliminary_administration`, `preliminary_self_administration`, `measures_lifted`, `dismissed_insufficient_assets`, `other`.

`commercialRegister.status`:

| Status | Meaning | Register event |
|---|---|---|
| `enriched` | SI record downloaded and parsed | charged |
| `foreign_register` | Company is registered abroad (e.g. Dutch B.V. at the Kamer van Koophandel) | free |
| `not_found` | Not found on handelsregister.de, or the register court is unknown there | free |
| `skipped_limit` | `maxEnrichments`, the request cap, the 240-second run time budget or your max cost per run was reached | free |
| `no_register` | The notice names no German register entry | free |
| `disabled` | `enrichCommercialRegister` is off | free |
| `error` | handelsregister.de did not answer in time (25 s), returned an error page instead of the SI record, or the connection failed twice. After three errors in a row, enrichment stops for the rest of the run | free |

The Console offers two table views: **Insolvencies** (one row per notice) and **Administrators** (contact list).

### Limitations

- The portal shows notices of the last 14 days in the date search. Older notices are not available through this Actor.
- A single search returns at most 1,000 hits. The Actor searches day by day and automatically splits a day by federal state if needed.
- Some register extracts list no officers (old records not yet migrated by the register court). Share capital is only available for corporations (GmbH, UG, AG).

***

<a name="deutsch"></a>

## Deutsch: Insolvenzbekanntmachungen + Handelsregister als JSON

**Jede neue Firmeninsolvenz in Deutschland als sauberes JSON, mit Kontaktdaten des Insolvenzverwalters und Anmeldefrist. Auf Wunsch angereichert mit dem amtlichen Handelsregister-Datensatz: Stammkapital, Gegenstand, Geschäftsführer.**

Der Actor liest das amtliche Portal [insolvenzbekanntmachungen.de](https://neu.insolvenzbekanntmachungen.de), öffnet den Volltext jedes Beschlusses und macht daraus strukturierte Daten. Optional sucht er jede Firma auf [handelsregister.de](https://www.handelsregister.de) und ergänzt den **Strukturierten Registerinhalt (XJustiz "SI")**. Kein Konto, kein Browser, bei jedem Lauf live abgerufen.

### Für wen

- **Kreditmanagement und Warenkreditversicherung:** am Tag der Veröffentlichung wissen, dass ein Kunde unter vorläufiger Verwaltung steht, und die Forderung fristgerecht anmelden (§ 28 InsO).
- **Distressed M\&A, Verwerter, Sanierungsberater:** tägliche Liste der Unternehmen in der Insolvenz mit Geschäftszweig, Stammkapital und dem zuständigen Verwalter.
- **Kanzleien, Insolvenzverwalter, Dienstleister:** wer wurde wo bestellt, mit Kanzleianschrift, Telefon und E-Mail.
- **CRM- und Risiko-Automatisierung (n8n, Make, Zapier, eigener Code):** flaches, stabiles JSON, ein Datensatz pro Bekanntmachung, per Registernummer direkt mit dem eigenen Kundenstamm abgleichbar.

### Was Sie bekommen

- **Aus der Bekanntmachung:** Verfahrensart (Eröffnung, Eigenverwaltung, Schutzschirm, vorläufige Verwaltung, Abweisung mangels Masse), Datum und Uhrzeit des Beschlusses, Eröffnungsgrund, **Insolvenzverwalter bzw. Sachwalter** mit Kanzlei, Anschrift, Telefon, Fax und E-Mail, **Anmeldefrist** und erster Termin (Berichts-/Prüfungstermin), Registergericht und HRA/HRB/GnR/VR-Nummer, Geschäftszweig, Anschrift der Schuldnerin.
- **Aus dem Handelsregister (SI):** Rechtsform, Stammkapital (auch historisch in DM), Gegenstand des Unternehmens, Sitz und Anschrift, EUID, Geschäftsführer, persönlich haftende Gesellschafter, Kommanditisten mit Hafteinlage, Prokuristen, Vertretungsregelungen inklusive Befreiung von § 181 BGB und der Insolvenzvermerk des Registers.
- **Alle 16 Länder-Layouts:** Der Parser wurde an 64 echten Firmen-Bekanntmachungen aus allen Bundesländern gehärtet: Beschlussdatum 64/64, Verwalter und Anmeldefrist bei 32/32 Eröffnungen.
- **Nur Unternehmen:** Verbraucherinsolvenzen (IK) und Privatpersonen werden kostenlos anhand der Ergebnisliste aussortiert, bevor ein Volltext geöffnet wird.

### Preise: zwei Events

- **`insolvency-notice-extracted`:** nur wenn der Volltext einer Firmen-Bekanntmachung geladen **und** strukturiert ausgewertet wurde.
- **`commercial-register-enriched`:** zusätzlich nur, wenn der SI-Datensatz dieser Firma von handelsregister.de geladen **und** ausgewertet wurde. Nie bei ausländischem Register (z. B. niederländische B.V.), nicht gefundener Firma, erreichtem Limit, abgeschalteter Anreicherung oder Netzwerkfehler. Der Grund steht immer in `commercialRegister.status`.

Die aktuellen Preise finden Sie im Tab *Pricing*. Mit dem Kostenlimit pro Lauf in der Apify Console behalten Sie die volle Kontrolle. Der Actor reserviert vor jeder Registerabfrage den Preis beider Events und hält vor Überschreiten des Limits sauber an.

### Das 60-pro-Stunde-Limit von handelsregister.de

Die Nutzungsbedingungen von handelsregister.de erlauben höchstens **60 Abrufe pro Stunde**. Der Actor hält sich strikt daran und umgeht das Limit **nicht** über wechselnde Proxys oder IP-Adressen: eine Sitzung pro Lauf, rund **2 Anfragen pro Firma** (Suche + SI-Abruf), mindestens **2 Sekunden** Abstand, höchstens `maxEnrichments` Abfragen pro Lauf (Standard 15, maximal 25, das sind rund 51 Anfragen) und zusätzlich eine harte Obergrenze von 55 Anfragen pro Lauf. Bekanntmachungen darüber hinaus werden trotzdem geliefert, mit Status `skipped_limit` und ohne Register-Event. **Mit `maxEnrichments: 25` den Actor höchstens einmal pro Stunde planen.**

#### Gemessener Lauf mit Standardwerten

Ein echter Cloud-Lauf mit der Standard-Eingabe (`daysBack: 2`, `maxNotices: 25`, `maxEnrichments: 15`) am 3. November 2026, Build 1.0.2, 512 MB Arbeitsspeicher:

| Messwert | Ergebnis |
|---|---|
| Laufzeit | **103 s** (Status `SUCCEEDED`) |
| Arbeitsspeicher | 110 MB im Schnitt, **122 MB Spitze** (von 512 MB) |
| Bekanntmachungen | 716 gelistet, 38 Privatpersonen ausgefiltert, 25 geliefert |
| Anfragen | 58 an das Insolvenzportal, 22 an handelsregister.de |
| `insolvency-notice-extracted` | 25 × 0,02 $ = 0,50 $ |
| `commercial-register-enriched` | 8 × 0,03 $ = 0,24 $ |
| Register-Status der 25 Datensätze | 8 `enriched`, 7 `error`, 10 `skipped_limit` (keiner dieser 17 berechnet) |
| Plattform-Kosten | 0,0024 $ (0,014 Compute Units) |

In diesem Lauf hat handelsregister.de zwei SI-Abrufe nacheinander nicht rechtzeitig beantwortet. Build 1.0.2 hat die Anreicherung daraufhin für den Rest des Laufs eingestellt und trotzdem alle Bekanntmachungen geliefert. Seit Build 1.0.4 toleriert der Actor drei Fehler in Folge. Damit jeder Lauf sicher in das 300-Sekunden-Timeout des HTTP-Knotens von n8n passt, gelten diese Schutzregeln:

- jede Anfrage an handelsregister.de bricht nach 25 Sekunden ab;
- nach drei fehlgeschlagenen Abfragen in Folge endet die Anreicherung für diesen Lauf (Status `error`);
- der ganze Lauf hat ein Zeitbudget von 240 Sekunden, und Abfragen, die nicht mehr hineinpassen, bekommen `skipped_limit`.

### Datenschutz (DSGVO)

Name, Funktion und Vertretungsregelung der Organe werden immer ausgegeben. **Geburtsdatum** (`birthDate`) und **Wohnort** (`cityOfResidence`) der Geschäftsführer sowie die "vertreten durch"-Klausel der Bekanntmachung (kann Privatanschriften enthalten) gibt es nur mit `includeOfficerPersonalData: true`. Standardmäßig sind diese Felder `null`, Geburtsdaten in den Freitext-Eintragungen des Registers werden geschwärzt. Aktivieren Sie die Option nur mit einer Rechtsgrundlage nach Art. 6 DSGVO.

**Keine Speicherung zwischen Läufen:** Wegen der Löschfristen nach § 3 InsoBekV arbeitet der Actor rein ephemer. Jeder Lauf ruft live ab, es gibt keinen Cache und keine Historie. Bitte beachten Sie die Fristen auch in Ihren eigenen Systemen.

### Eingabe

`daysBack` (1 bis 14, Standard 2), optional `dateFrom` / `dateTo`, `subjects` (Standard: Eröffnungen, Sicherungsmaßnahmen, Abweisungen mangels Masse), `onlyCorporate` (Standard `true`), `federalStates`, `nameKeywords` (z. B. `["Bau", "Immobilien", "Logistik"]`), `maxNotices` (Standard 25, bis 500), `enrichCommercialRegister` (Standard `true`), `maxEnrichments` (Standard 15, bis 25), `includeOfficerPersonalData` (Standard `false`), `includeFullText` (Standard `false`). Details siehe englische Tabelle oben.

### Grenzen

Die Datumssuche des Portals umfasst die letzten 14 Tage. Eine Suche liefert höchstens 1.000 Treffer; der Actor sucht deshalb tageweise und teilt einen Tag bei Bedarf automatisch nach Bundesländern auf. Manche Registerauszüge enthalten keine Organe (alte, noch nicht migrierte Datensätze). Stammkapital gibt es nur bei Kapitalgesellschaften.

# Actor input Schema

## `daysBack` (type: `integer`):

Number of publication days to search, counting back from today (Europe/Berlin), today included. 1 = today only, 2 = today and yesterday. Ignored if 'Published from' is set.

## `dateFrom` (type: `string`):

Optional start of the publication period, YYYY-MM-DD. The span is capped at 14 days.

## `dateTo` (type: `string`):

Optional end of the publication period, YYYY-MM-DD. Defaults to today.

## `subjects` (type: `array`):

Which kinds of insolvency decisions to load.

## `onlyCorporate` (type: `boolean`):

Skip consumer and private insolvencies (IK file numbers) using the result list, free of charge. Keeps notices with a register entry (HRA, HRB, GnR, VR, PR) or a clear legal form in the name (GmbH, UG, AG, KG, OHG, e.K., SE, B.V., Ltd., eG, e.V. ...).

## `federalStates` (type: `array`):

Optional. Only notices from insolvency courts in these states. Leave empty for all of Germany.

## `nameKeywords` (type: `array`):

Optional, case-insensitive. A notice is kept if a keyword appears in the company name or anywhere in the notice text, e.g. the line of business. Notices without a match are not output and not charged.

## `maxNotices` (type: `integer`):

Maximum number of extracted notices per run.

## `enrichCommercialRegister` (type: `boolean`):

Download the structured register content (XJustiz SI) from handelsregister.de for each company: legal form, share capital, business purpose, address, managing directors / partners and representation rules.

## `maxEnrichments` (type: `integer`):

Caps the handelsregister.de lookups per run to protect the 60 per hour limit (25 lookups are about 51 requests). Notices beyond the cap are output without register data (status skipped_limit) and the register event is not charged. Schedule runs at most once per hour when using the maximum.

## `includeOfficerPersonalData` (type: `boolean`):

Opt-in. Adds birthDate and cityOfResidence of natural persons from the register record and the raw 'represented by' clause of the notice (which can contain private addresses). Only enable this if you have a legal basis under the GDPR (Art. 6) for processing this data.

## `includeFullText` (type: `boolean`):

Adds the complete text of the court decision to each record (fullText). The text can contain personal data of officers.

## Actor input object example

```json
{
  "daysBack": 2,
  "subjects": [
    "EROEFF",
    "SICHMASS",
    "ABWMASS"
  ],
  "onlyCorporate": true,
  "nameKeywords": [
    "Bau",
    "Immobilien",
    "Logistik"
  ],
  "maxNotices": 25,
  "enrichCommercialRegister": true,
  "maxEnrichments": 15,
  "includeOfficerPersonalData": false,
  "includeFullText": false
}
```

# Actor output Schema

## `notices` (type: `string`):

Parsed insolvency notices with court, file number, procedure, administrator, claims deadline and register data.

## `runStats` (type: `string`):

Counts of listed, filtered, extracted and enriched notices plus requests per portal.

# 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 = {
    "daysBack": 2,
    "subjects": [
        "EROEFF",
        "SICHMASS",
        "ABWMASS"
    ],
    "maxNotices": 25,
    "maxEnrichments": 15
};

// Run the Actor and wait for it to finish
const run = await client.actor("brsksr/german-insolvency-commercial-register").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 = {
    "daysBack": 2,
    "subjects": [
        "EROEFF",
        "SICHMASS",
        "ABWMASS",
    ],
    "maxNotices": 25,
    "maxEnrichments": 15,
}

# Run the Actor and wait for it to finish
run = client.actor("brsksr/german-insolvency-commercial-register").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 '{
  "daysBack": 2,
  "subjects": [
    "EROEFF",
    "SICHMASS",
    "ABWMASS"
  ],
  "maxNotices": 25,
  "maxEnrichments": 15
}' |
apify call brsksr/german-insolvency-commercial-register --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,brsksr/german-insolvency-commercial-register"
        }
    }
}
```

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/espdbJKjfuNGfZQkt/builds/wbjlK48RxYW4Fq0sq/openapi.json
