Company Data via API – Instant Access to the German Commercial Register with handelsregister.ai
Learn how handelsregister.ai’s API and Python SDK let you fetch up-to-date company and financial data from the German Commercial Register in seconds, automate workflows, and ship projects faster.
Company data via API – easy access to the German commercial register for developers
You may know the problem: for a project, you need to obtain current company data – such as company details, managing directors or financial figures – and integrate it into your application. In Germany, this often means tedious manual work: searching the Handelsregister (commercial register) by hand, combing through PDFs or scraping together data from various portals. How nice it would be to have a simple API that delivers all this information in structured form at the push of a button! In this article, I'll show you exactly such a solution: handelsregister.ai. It offers the complete commercial register data as a modern REST API and even provides a handy Python package that lets you retrieve company data in just a few lines of code. Let's look at the advantages this brings, how it works and what you get out of it as a developer.
Company data in Germany: official sources and hurdles
Before we dive into the world of APIs, it's worth looking at the status quo. In Germany, companies are legally required to disclose certain information – this includes commercial register entries (e.g. incorporations, changes of managing director) and financial reports (annual financial statements in the Bundesanzeiger, the Federal Gazette). This data is generally publicly accessible and current, because companies have to publish it regularly. There are official portals such as the joint register portal of the German federal states (Handelsregister.de) or Unternehmensregister.de, where you can view such information. However, you quickly run into practical hurdles here if you want to query this data automatically.
The crux of the matter: there is no official API from the authorities. Neither the justice portal (for commercial register data) nor the Bundesanzeiger offers developers an open interface for direct data access. Instead, you have to research company information manually via web portals or download and parse PDF documents. That costs time and nerves – especially if you want to check many companies or fetch regular updates. No wonder many developers long for a more elegant way to get company data via API.
This is where unofficial solutions come in: some services (such as handelsregister.ai) collect this public company data, prepare it and provide it through their own interfaces. For us developers, this means we can skip the tedious scraping and parsing effort and access structured JSON data directly. Let's look at what handelsregister.ai offers in this context.
The handelsregister.ai API: features and benefits
Handelsregister.ai is best described as "the entire German commercial register as an API". In the background, AI models extract the relevant information from official registers and documents and make it machine-readable, structured and searchable. Via a REST API, you can retrieve this company data within seconds and integrate it into your applications – without having to worry about the complicated details of data collection.
A few highlights of the handelsregister.ai API at a glance:
- Always up-to-date company data: You get real-time information from the Handelsregister, because the data is pulled directly from the published sources. This means changes at companies (new managing directors, address changes, insolvencies, etc.) show up in your system promptly.
- Structured JSON data: Instead of unstructured text or PDFs, the API returns clean JSON documents. In them, you'll find clearly defined fields – from name, address and legal form to register information and financial metrics. This makes further processing child's play.
- Comprehensive information in one go: With a single query, you can get a complete profile of a company. This includes, for example: basic company data (name, address, legal form, status), registration details (register court, register number, date of incorporation), the business purpose, current and former managing directors/board members including positions and terms of office, as well as available financial data (annual financial statements, revenue, employee numbers, balance sheet and income statement items). Even publications and announcements from the register can be included.
- Flexible search: The API allows a simple search by company name and other parameters. For example, you can search for "Muster GmbH Berlin" or filter specifically by register number/location. The built-in search (optionally AI-powered) helps you find the right company even with imprecise input.
- Batch queries & data enrichment: If you want to retrieve not just one company but a whole list of companies, that's possible too. The API (and the SDK) provide functions to query several companies one after another in bulk or to enrich an existing data set automatically – useful e.g. for CRM data maintenance or market analysis.
- Developer-friendly and robust: As a developer, you'll appreciate the well-thought-out extras: there is detailed documentation as well as built-in mechanisms such as rate limiting, error handling and retry logic, so that everything runs smoothly even with large queries. A credit system lets you scale your usage, and you only pay for the queries you actually make. In addition, handelsregister.ai provides SDKs and tools (e.g. for Python) that make getting started easier.
In short: handelsregister.ai does the heavy lifting for you by centrally bundling public company data and making it available through a convenient interface. Next, let's look at the official Python package, which adds an extra helping of developer convenience on top of this API.
Getting to know the handelsregister.ai Python package
To make access to the API as easy as possible, there is an official Python SDK called handelsregister. This package (available on PyPI) offers a modern Python client that handles the HTTP requests and data processing for you in the background. This means you can access all the company data in a few lines of code without having to worry about the details of the API call.
Installation is quick via pip:
pip install handelsregister
After installation, all you need is your API key from handelsregister.ai. You can either set it as an environment variable (HANDELSREGISTER_API_KEY) or pass it directly in your code. Then you're ready to go – here's a short example of how to retrieve company data:
from handelsregister import Handelsregister
# Initialize the API client (API key read automatically from the environment variable or passed as a parameter)
client = Handelsregister(api_key="YOUR_API_KEY_HERE")
# Fetch company data via search (example: Konux GmbH in Munich)
company_data = client.fetch_organization(q="Konux GmbH München")
# Print a few fields
print(f"Name: {company_data['name']}")
print(f"Register number: {company_data['registration']['register_number']}")
print(f"Status: {company_data['status']}")
As you can see, a few lines of code are enough to get important basic information about a company. The fetch_organization method searches the Handelsregister for the given query and returns a dictionary (or JSON) with the company data. In the example above, we query Konux GmbH in Munich and then print the name, the register number and the status (active/inactive). Of course, you can also access all other data points contained in the record (address, purpose, management, financials, etc.).
For more advanced use cases, the SDK also provides an object-oriented interface. For example, you can instantiate a Company object and specify right away which features (data areas) you are interested in. The SDK then fetches the corresponding information and offers it to you as conveniently accessible attributes. Example:
from handelsregister import Company
# Create a Company object and request specific data areas
company = Company(
"BMW AG München",
features=["related_persons", "financial_kpi", "balance_sheet_accounts"]
)
# Basic information
print(company.name) # "Bayerische Motoren Werke AG"
print(company.registration_number) # e.g. HRB 42243
print(company.is_active) # True/False depending on status
print(company.formatted_address) # e.g. "Petuelring 130, 80809 München"
# Management information (current persons with their role)
for person in company.current_related_persons:
print(f"{person['name']} – {person['role']['de']['long']}")
# Example: financial data (latest known year)
if company.financial_years:
jahr = company.financial_years[0]
umsatz = company.get_financial_kpi_for_year(jahr, "revenue")
mitarbeiter = company.get_financial_kpi_for_year(jahr, "employees")
print(f"Revenue {jahr}: {umsatz} EUR, employees: {mitarbeiter}")
As you can see, this class encapsulates the API queries and makes the results available to you directly as properties. This is especially handy if you want to access the same company repeatedly in your code or handle several company objects in parallel. It also makes the code more readable.
Another helpful feature of the SDK is batch processing. With the client.enrich() method, for example, you can enrich an entire list of companies (say, from a JSON or CSV file) with current commercial register data. You simply define which fields in your data set correspond to the API query (e.g. company name, city) – the SDK takes care of the rest and can even save intermediate results if you want. This gives you bulk processing with minimal effort, without having to write loops and your own error handling. Ideal for updating a company database, for example.
Typical use cases for developers
Now the question is: what could you actually use company data via API for? Here are some typical use cases that come up frequently in development practice:
-
Form autocompletion: Imagine you're building a web or mobile form in which users are supposed to enter their company details. With the commercial register API, as soon as the user enters a company name, you can automatically pre-fill the remaining fields (address, register information, etc.). This saves time and prevents typos. Your form becomes more user-friendly because the customer has to type less, and you still get verified data.
-
CRM data enrichment and maintenance: Many companies run CRM or ERP systems with hundreds of company contacts. With the API, you can keep this master data up to date by regularly importing the public register information. For example, you could query all customer companies once a quarter and check whether their status has changed, new managing directors have been registered or new financial figures are available. This way, your databases stay always up to date without manual maintenance.
-
Lead qualification & analytics: In marketing and sales, knowing who you're dealing with is worth its weight in gold. Suppose a new company signs up on your platform – you could use the API to check right away roughly how large the company is (e.g. via employee numbers or capital), who sits in management and what the financial situation looks like. Such background information helps with lead scoring (i.e. assessing whether a lead is promising) and can flow automatically into your pipeline. For market or competitive analyses, too, you can quickly pull data via API instead of laboriously gathering reports.
-
Automated reports & monitoring: If you build applications that generate reports regularly (e.g. for investors, risk analyses, KYC checks), you can obtain the required company data directly via API. For example, you could develop a monitoring tool that notifies you as soon as an important change appears in the Handelsregister for a company you are watching (new managing director, insolvency filing, etc.). Without an API, this kind of automation would be hard to achieve in real time.
These examples show only some of the possibilities. As a general rule: wherever public company data needs to flow into software projects, you benefit from an interface that delivers this data without hassle. You can develop more creatively and faster, because data collection is no longer the bottleneck.
Conclusion: using company data more smartly with handelsregister.ai
The days when you had to struggle through PDFs or outdated databases are over – at least if you make use of offerings like handelsregister.ai. For developers and software consultancies that frequently work with company information, this means an enormous relief. You get the German Handelsregister in modern form: as an API with JSON output, retrievable in real time, integrated into your workflows. The Python SDK makes getting started even easier, so you can get going in minutes instead of first building complex scrapers.
Handelsregister.ai shows how official data can be turned into real added value for the developer community: through simple queries, clean structures and tools tailored to our needs. So the next time you need company data – whether for a prototype, a client project or an internal tool – remember that it's now much easier. Feel free to try the API (a free quota of requests is available) and see the time savings for yourself.
Have fun developing with company data via API and discovering the possibilities it opens up! 🚀