handelsregister.ai 0.2: New CLI & Data Enrichment for Python

7 min lesetid

Version 0.2 adds CLI access, batch data enrichment and better stability, pulling official German Handelsregister and Bundesanzeiger company data.

Denne artikkelen finnes på engelsk.

handelsregister.ai Python package 0.2: new CLI, enrichment feature and more

With the newly released version 0.2 of the handelsregister.ai Python package, researching and enriching company data becomes even easier and more powerful. This update brings key new features: for the first time, you can use the Handelsregister.ai SDK directly from the terminal (command line interface), and there is a new enrichment feature for bulk data enrichment. Version 0.2 also offers greater stability and additional features compared with version 0.1. Developers, data scientists and business professionals can look forward to a much improved tool that seamlessly brings official sources such as the Handelsregister (commercial register) and the Bundesanzeiger (Federal Gazette) into their workflows.

CLI support: queries directly in the terminal

A highlight of version 0.2 is the introduction of a command line interface (CLI). The package can now be used directly from the terminal – version 0.1 did not offer this yet. With the new CLI tool you can retrieve company information in seconds without writing a single line of code. For example, the following command displays the most important company data right away:

handelsregister fetch "KONUX GmbH München"

This fetch command retrieves the company data for the search "KONUX GmbH München" and prints a compact company profile in the terminal. By default it retrieves all available information – including core data, management, financial KPIs, etc. – and the AI-powered search of handelsregister.ai finds the relevant company even for fuzzy queries. If the optional rich package is installed, the output even appears as a colored factsheet right in the console.

Besides the quick terminal overview, the data can also be output directly as JSON. With handelsregister fetch json "<search term>" you get the raw data as a JSON structure – ideal for feeding the results into your own applications or scripts. This new CLI feature opens up entirely new use cases: developers can now easily integrate Handelsregister queries into shell scripts or ETL processes, and business analysts can run quick ad hoc research directly in the terminal.

Enrichment feature: bulk data enrichment

Version 0.2 also introduces the new enrichment feature, which is especially valuable for enriching large company lists. With the handelsregister enrich command you can now process a file (CSV or JSON) containing company names and, optionally, further details in one go. For each entry, the program searches the official registers and automatically fills in the missing information – from address and registration data to financial KPIs and management details.

Behind the scenes, the SDK uses the new Handelsregister.enrich(...) method in the Python code, which was not yet available in version 0.1. Through this method or the CLI command, you can flexibly map input fields in the file to search parameters (e.g. company_name ➔ name, city ➔ location). You can also select specific data categories – for example only managing directors and shareholders (related_persons) or financial KPIs (financial_kpi) – to focus the enrichment process on relevant information.

A major advantage of the enrichment feature is the time saved and the data quality: instead of looking up hundreds of companies manually in the Handelsregister and the Bundesanzeiger, you get structured records for all companies in a single run. The results can be exported directly as a CSV file (--output-format csv in the CLI), which makes importing them into Excel, BI tools or databases easier. At the same time, the package ensures robustness – there is a snapshot feature that saves intermediate results, and built-in retry mechanisms handle temporary errors. This makes bulk enrichment reliable, even when you query a very large number of records.

Improved stability and new features in version 0.2

Beyond the CLI and enrichment additions, version 0.2 brings various improvements that make the package more stable and versatile. Compared with the previous version 0.1, a number of details have been optimized:

  • Greater stability: the SDK has a resilient design with automatic retries on timeouts or errors and an extended timeout limit, so that even large queries complete without problems. You benefit from more reliable communication with the API, without having to worry about interruptions with larger data volumes.
  • Flexible output formats: besides the standard output in the terminal (or as a Python object), results can now be converted more easily into different formats. As mentioned, the CLI returns plain JSON on request. For bulk exports, CSV output is available directly, and the package automatically prepares the deeply nested company data for tabular display ("flattening") – ideal for processing the data further in Excel, for example.
  • Selecting data categories: the handelsregister.ai API supports so-called features, which let you switch specific data points on or off. Version 0.2 makes this even more accessible: using parameters or CLI flags, developers can specify exactly which areas (e.g. financial data, management, balance sheets, publications) they need. This keeps you in control of the scope and credit usage of your queries.
  • Object-oriented use: the initial SDK already offered convenient, object-oriented access to all company details through the Company class – from company.name and company.registration_number to company.financial_years. In version 0.2, minor bugs were fixed and references updated, so this high-level API now works even more smoothly. As before, developers can access all properties of a company object in a few lines of code and, for example, retrieve KPIs for a specific year directly with company.get_financial_kpi_for_year(2022).

In summary, the update to 0.2 offers more features, more control and more reliability. All existing features of 0.1 – from simple search to financial and management data to historical publications – remain available, but have been further improved and extended.

Seamless integration of official sources

A core aspect of handelsregister.ai, which remains front and center in version 0.2, is combining official register data in a single interface. The package seamlessly accesses primary sources such as the German Handelsregister and the Bundesanzeiger and brings their information together for you. This means you always get current and verified information directly from the official registers, without having to go through different portals yourself. Handelsregister entries – for example on new incorporations, changes of managing directors or changes in capital – are included, as are published annual financial statements and financial data from the Bundesanzeiger.

It is precisely this combination of Handelsregister and Bundesanzeiger information that makes handelsregister.ai so valuable. In practice, you previously had to search both sources separately and laboriously merge the data by hand. With handelsregister.ai this effort disappears: through the platform or the Python package you get all relevant company data from a single source – structured, searchable and machine-readable. The integration is designed so that the official data is continuously updated ("always up to date") and can be used directly in your own applications or analyses.

Conclusion: more efficient company data research for developers and analysts

The release of version 0.2 of the handelsregister.ai Python package marks a significant step toward even more efficient company data research. Thanks to the new CLI, developers and data professionals can now query company information ad hoc in the terminal or integrate it seamlessly into automated workflows. The batch enrichment feature lets you enrich even large company lists with current register and financial data in one go – a huge advantage for use cases such as lead scoring, due diligence or CRM data maintenance. At the same time, the improvements under the hood provide more stability and flexibility, so connecting to the Handelsregister.ai API works even more smoothly.

Outlook: for anyone working with German company data, upgrading to version 0.2 is worthwhile. The update installs quickly with pip install handelsregister==0.2.0. All you need is a valid API key (available at handelsregister.ai), and you can get started right away. Whether you are a developer, data scientist or business analyst – the updated handelsregister.ai SDK saves time and hassle in company research and opens the door to current, reliable company data at the push of a button. Have fun trying it out!

Sources: official documentation on PyPI and GitHub; handelsregister.ai platform and blog.

Further guides