# German Handelsregister API — Company Data & KYB (`pat1987/german-handelsregister-lookup`) Actor

German company data & KYB API. Look up firms across all 5 German registers via handelsregister.de: Handelsregister (HRB/HRA), Genossenschaft (eG), Gesellschaftsregister (eGbR), Partnerschaft & Verein. Returns JSON — registration number, court, legal form, status, address. Firmendaten. Unofficial.

- **URL**: https://apify.com/pat1987/german-handelsregister-lookup.md
- **Developed by:** [Patrick Lierse](https://apify.com/pat1987) (community)
- **Categories:** Business, Lead generation, Automation
- **Stats:** 2 total users, 0 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.005 / actor start

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/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

## German Handelsregister Lookup — all five public registers

Look up German entities in the official register portal
([handelsregister.de](https://www.handelsregister.de)) and get clean,
structured JSON back: registration number, court, legal form, status and more.

**One portal, five registers — all covered:**

| Register | Section | Typical entities |
|---|---|---|
| Handelsregister | `HRB` / `HRA` | GmbH, AG, SE, UG, KG, OHG, e.K. |
| **Genossenschaftsregister** | `GnR` | eG — Volksbanken, Raiffeisen, housing & energy co-ops |
| **Gesellschaftsregister** *(new since 2024)* | `GsR` | eGbR — registered civil-law partnerships (property-holding GbRs) |
| **Partnerschaftsregister** | `PR` | PartG / PartG mbB — law, tax & audit firms |
| **Vereinsregister** | `VR` | e.V. — registered associations |

The same search handles every section — pass a name, or a register number with
its prefix (`HRB 50000`, `GnR 23`, `GsR 4711`, `PR 512`, `VR 642`). The
**Gesellschaftsregister (eGbR)** is a 2024 register that **no other Apify actor
covers** — useful for verifying the registered GbRs that now appear in land and
beneficial-ownership records.

> **Unofficial tool.** This actor is not affiliated with or endorsed by the
> Bundesministerium der Justiz or any German authority. It retrieves the same
> publicly available register data any person can view free of charge on the
> official portal — register publicity is statutory (§ 9 HGB for the commercial
> register; equivalent provisions govern the cooperative, partnership,
> association and company registers, all free and login-free via the common
> portal since DiRUG, Aug 2022). It does so politely: hard rate limit, caching,
> no personal data by default.

### Example

**Input**

```json
{
    "companyName": "Allianz SE",
    "maxResults": 1
}
````

**Output** (one dataset item per company match, trimmed)

```json
{
    "companyName": "Allianz SE",
    "registrationNumber": "HRB 164232",
    "registrationCourt": "München",
    "legalForm": "SE",
    "registeredAddress": "München",
    "status": "aktuell"
}
```

(Full records also include `registrationDate`, `persons`, `sourceUrl`,
`cachedAt` and `dataSource` — see the field notes below.)

**Beyond the commercial register** — the same actor resolves cooperatives,
partnerships, associations and the new eGbR register. Real results from a live
QA run (2026-06-13):

```json
{ "companyName": "Berliner Volksbank eG",        "registrationNumber": "GnR 23",   "registrationCourt": "Berlin (Charlottenburg)", "legalForm": "eG",       "status": "aktuell" }
{ "companyName": "eGbR Lützowgärten KH",          "registrationNumber": "GsR 4711", "registrationCourt": "Berlin (Charlottenburg)", "legalForm": "eGbR",     "status": "aktuell" }
{ "companyName": "Noerr Partnerschaftsgesellschaft mbB …", "registrationNumber": "PR 512", "registrationCourt": "München",          "legalForm": "PartG mbB","status": "aktuell" }
```

Associations (`VR`) carry no legal-form suffix, so `legalForm` is `null` for
them by design — the register type is always available from the
`registrationNumber` prefix.

### What it does

You give it a company name and/or a registration number (e.g. `HRB 50000`),
optionally a registration court (Amtsgericht). It searches the official
register portal and returns up to `maxResults` structured records. Successful
lookups are cached for **72 hours** — registry data changes slowly, and cache
hits cost zero requests against the portal.

### Rate limits — read this before bulk use

The portal's terms of use cap automated retrieval at **60 queries per hour**.
This actor enforces that limit internally with a sliding-window limiter
(strictly at most 60 requests in any rolling hour, budget persisted across
runs) — it is a
feature, not a bug, and it cannot be disabled:

- When the budget is exhausted, the actor **waits** (it does not fail, does
  not rotate proxies, does not evade). A run that needs more requests than the
  hourly budget simply takes longer.
- The internal queue accepts at most **200 pending lookups**. Beyond that the
  run fails fast with a clear error rather than accepting work it cannot
  politely complete.
- Repeat lookups within 72 hours are served from cache instantly and consume
  no quota.

If you need thousands of fresh records per hour, this is the wrong tool — and
under the portal's terms, so is every other tool.

### Input

| Field | Type | Default | Notes |
|---|---|---|---|
| `companyName` | string | — | Name or keywords. Required if no `registrationNumber`. |
| `registrationNumber` | string | — | With section prefix: `HRB`/`HRA`, `GnR`, `GsR`, `PR`, `VR` (e.g. `GnR 23`). Required if no `companyName`. |
| `registrationCourt` | string | — | Amtsgericht name, narrows the search. |
| `includePersons` | boolean | **`false`** | GDPR safety default. Reserved for deep-record retrieval of directors/officers — **not yet functional; persons stays empty and nothing extra is charged**. |
| `maxResults` | integer | `10` | 1–100. |

#### Example input

```json
{
    "companyName": "Allianz SE",
    "maxResults": 2,
    "includePersons": false
}
```

#### Example output (real result from a live QA run, 2026-06-11)

```json
{
    "companyName": "AREVA GmbH",
    "registrationNumber": "HRB 7817",
    "registrationCourt": "Fürth",
    "federalState": "Bayern",
    "legalForm": "GmbH",
    "registeredAddress": "Erlangen",
    "registrationDate": null,
    "status": "aktuell",
    "formerNames": ["Siemens Nuclear Power GmbH", "Framatome ANP GmbH", "AREVA NP GmbH"],
    "formerSeats": ["Erlangen"],
    "persons": [],
    "sourceUrl": "https://www.handelsregister.de/rp_web/erweitertesuche/welcome.xhtml",
    "cachedAt": "2026-06-11T21:28:00.000Z",
    "dataSource": "handelsregister.de/erweitertesuche"
}
```

The search result grid reliably provides name, court, register number, **federal
state (Bundesland)**, seat, status, and **company history** — `formerNames` and
`formerSeats` (the register's renaming/relocation trail; `null` when none).
These are all company data (no personal-data dimension).

Field availability honesty: `registrationDate` and `persons` — plus deeper
fields some competitors show (business purpose/Gegenstand, capital,
representatives/Prokuristen) — live only in the full filing document (a **deep
record**, the SI/AD/CD extracts). The portal serves those **only through
JavaScript command-link postbacks** that this plain-HTTP actor deliberately does
not replicate (no headless browser, no anti-bot workarounds). Consequently
`persons` is currently **always empty** (even with `includePersons: true`, which
logs a notice instead) and `registrationDate` is always `null`. **The
deep-record event is never charged**, and we do not fabricate these fields.

#### Searching by name: know this limitation

The register matches your keywords against **registered legal names**, not
brands. "Allianz SE" and "Siemens AG" resolve fine; **"BMW AG" does not** —
the registered name is "Bayerische Motoren Werke Aktiengesellschaft", which
contains neither "BMW" nor "AG". For brand-only names, search by
`registrationNumber` (e.g. `HRB 42243`) and add `registrationCourt`
(e.g. `München`) to disambiguate — register numbers repeat across courts and
the court filter is applied locally by the actor. Results are relevance-ranked
before `maxResults` is applied, because the portal itself returns up to 100
alphabetically sorted fuzzy matches.

### Pricing (pay per event)

| Event | Price | When charged |
|---|---|---|
| Actor start | $0.005 | once per run |
| Structured result | $0.004 | per record returned (**$4 per 1,000**) |
| Deep record | $0.04 | per full filing document actually retrieved — **feature not yet live, this event is currently never charged** |

Examples: 1,000 basic company lookups ≈ **$4.01–$4.05** depending on how many
runs you batch them into. Deep records will be charged only on successful
retrieval once the feature ships — today it never fires.

### GDPR note

Company register data is public by statutory design (§ 9 HGB). Personal data
(names of directors/officers) is **off by default** and retrieved only when
you explicitly enable `includePersons` — at that point *you* are choosing to
process personal data and need your own lawful basis. See `COMPLIANCE.md` in
the repository for the operator's Legitimate Interest Assessment.

Every HTTP request the actor makes is timestamped and saved to the run's
key-value store under `AUDIT_LOG`.

### Troubleshooting

- *"results grid not found"* — the portal changed its markup (it has before).
  The raw HTML is saved to the run's KV store under `PARSE_FAILURE_HTML`;
  please report it. No fabricated data is ever emitted.
- *Slow run* — that's the 60/hour limit working as designed; see above.
- The portal itself warns that its search can be flaky. Precise queries
  (exact name, or register number + court) work best.

### Contact

Support: **patrick.lierse@googlemail.com**

# Actor input Schema

## `companyName` (type: `string`):

Company name or keywords to search for, e.g. "Deutsche Bahn". Provide this and/or a registration number. The portal's own search is picky — the more precise the name, the better the match.

## `registrationNumber` (type: `string`):

Register number, ideally with register type prefix, e.g. "HRB 50000". Supported types: HRA, HRB, GnR, PR, VR, GsR.

## `registrationCourt` (type: `string`):

Name of the registering local court, e.g. "Berlin (Charlottenburg)". Optional, narrows the search.

## `includePersons` (type: `boolean`):

GDPR SAFETY DEFAULT: OFF. Reserved for deep-record retrieval of named natural persons (managing directors, board members) from filing documents. NOT YET FUNCTIONAL in this version: persons stays empty and the deep-record event is never charged. When it ships, only enable this with a legitimate purpose for processing personal data — see COMPLIANCE.md.

## `maxResults` (type: `integer`):

Maximum number of structured results to return (1–100).

## Actor input object example

```json
{
  "companyName": "Deutsche Bahn",
  "includePersons": false,
  "maxResults": 10
}
```

# Actor output Schema

## `companies` (type: `string`):

Structured Handelsregister entries (one item per company match).

# 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 = {
    "companyName": "Deutsche Bahn"
};

// Run the Actor and wait for it to finish
const run = await client.actor("pat1987/german-handelsregister-lookup").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 = { "companyName": "Deutsche Bahn" }

# Run the Actor and wait for it to finish
run = client.actor("pat1987/german-handelsregister-lookup").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 '{
  "companyName": "Deutsche Bahn"
}' |
apify call pat1987/german-handelsregister-lookup --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=pat1987/german-handelsregister-lookup",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "German Handelsregister API — Company Data & KYB",
        "description": "German company data & KYB API. Look up firms across all 5 German registers via handelsregister.de: Handelsregister (HRB/HRA), Genossenschaft (eG), Gesellschaftsregister (eGbR), Partnerschaft & Verein. Returns JSON — registration number, court, legal form, status, address. Firmendaten. Unofficial.",
        "version": "0.1",
        "x-build-id": "K7aFikD0nIrhbofNg"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/pat1987~german-handelsregister-lookup/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-pat1987-german-handelsregister-lookup",
                "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/pat1987~german-handelsregister-lookup/runs": {
            "post": {
                "operationId": "runs-sync-pat1987-german-handelsregister-lookup",
                "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/pat1987~german-handelsregister-lookup/run-sync": {
            "post": {
                "operationId": "run-sync-pat1987-german-handelsregister-lookup",
                "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": {
                    "companyName": {
                        "title": "Company name",
                        "type": "string",
                        "description": "Company name or keywords to search for, e.g. \"Deutsche Bahn\". Provide this and/or a registration number. The portal's own search is picky — the more precise the name, the better the match."
                    },
                    "registrationNumber": {
                        "title": "Registration number",
                        "type": "string",
                        "description": "Register number, ideally with register type prefix, e.g. \"HRB 50000\". Supported types: HRA, HRB, GnR, PR, VR, GsR."
                    },
                    "registrationCourt": {
                        "title": "Registration court (Amtsgericht)",
                        "type": "string",
                        "description": "Name of the registering local court, e.g. \"Berlin (Charlottenburg)\". Optional, narrows the search."
                    },
                    "includePersons": {
                        "title": "Include persons (directors, officers)",
                        "type": "boolean",
                        "description": "GDPR SAFETY DEFAULT: OFF. Reserved for deep-record retrieval of named natural persons (managing directors, board members) from filing documents. NOT YET FUNCTIONAL in this version: persons stays empty and the deep-record event is never charged. When it ships, only enable this with a legitimate purpose for processing personal data — see COMPLIANCE.md.",
                        "default": false
                    },
                    "maxResults": {
                        "title": "Max results",
                        "minimum": 1,
                        "maximum": 100,
                        "type": "integer",
                        "description": "Maximum number of structured results to return (1–100).",
                        "default": 10
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
