Referencia de API
Accede a datos completos de empresas alemanas a través de nuestra API RESTful. Información en tiempo real de registros comerciales oficiales.
https://handelsregister.ai/api
JSON
Clave API
60/min (5/min documentos)
Autenticación
La API de Handelsregister AI admite dos métodos de autenticación: Clave API y Token Bearer. Ambos métodos funcionan en todos los endpoints de la API.
Métodos de Autenticación
1. Autenticación con Clave API
Tu clave API se puede proporcionar de dos maneras:
x-api-key: YOUR_API_KEY
?api_key=YOUR_API_KEY
2. Autenticación con Token Bearer
Para mayor seguridad y gestión de tokens, puedes crear tokens API:
Authorization: Bearer YOUR_TOKEN
Mejores Prácticas y Casos de Uso
Ejemplos de Autenticación con Clave API
curl -X GET "https://handelsregister.ai/api/v1/search-organizations?q=company" \
-H "x-api-key: YOUR_API_KEY"
# Using query parameter (legacy)
curl "https://handelsregister.ai/api/v1/fetch-organization?api_key=YOUR_API_KEY&q=company"
# Using x-api-key header (recommended)
curl -X GET "https://handelsregister.ai/api/v1/fetch-organization?q=company" \
-H "x-api-key: YOUR_API_KEY"
Gestión de Tokens Bearer
Crear un Token API
curl -X POST "https://handelsregister.ai/api/v1/auth/tokens/create" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"token_name": "My Application",
"abilities": ["*"],
"expires_at": "2026-01-01 00:00:00"
}'
La respuesta incluirá tu token Bearer. ¡Guárdalo de forma segura!
Usar un Token Bearer
curl -X GET "https://handelsregister.ai/api/v1/search-organizations?q=company" \
-H "Authorization: Bearer YOUR_API_TOKEN"
Endpoints de Gestión de Tokens
POST /api/v1/auth/tokens/create- Crear nuevo tokenGET /api/v1/auth/tokens- Listar todos los tokensDELETE /api/v1/auth/tokens/{id}- Revocar token específicoDELETE /api/v1/auth/tokens- Revocar todos los tokens
Endpoints
/v1/fetch-organization
5-21 créditos • 60/minObtiene información completa sobre una empresa alemana incluyendo estado legal, datos financieros, gestión y más.
Parámetros
| Nombre | Tipo | Requerido | Descripción |
|---|---|---|---|
| api_key | string | Condicional* | Tu clave API. Requerida si no usas el encabezado x-api-key o token Bearer |
| q | string | REQUERIDO | Nombre de empresa, número de registro o consulta de búsqueda |
| feature | string | opcional | Característica de datos adicional para incluir. Se puede especificar múltiples veces (ver tabla de características abajo) |
| ai_search | string | opcional | Habilitar búsqueda AI. Valores: on-default o dejar el parámetro completamente |
| realtime_mode | string | opcional | Echtzeitmodus für Live-Daten aus dem Handelsregister aktivieren. Werte: handelsregister-default oder Parameter komplett weglassen |
Características Disponibles
financial_kpi
1 crédito
balance_sheet_accounts
3 créditos
profit_and_loss_account
3 créditos
related_persons
2 créditos
publications
1 crédito
news
10 créditos
insolvency_publications
1 crédito
annual_financial_statements
5 créditos
annual_financial_statements__html
5 Credits
shareholders
Beta
ubos
Beta
shareholdings
Beta
website_content
AI
Solicitud de Ejemplo
curl -X GET 'https://handelsregister.ai/api/v1/fetch-organization?q=BMW%20AG&feature=financial_kpi&feature=related_persons&feature=publications&feature=website_content&ai_search=on-default' \
-H 'x-api-key: YOUR_API_KEY'
Respuesta de Ejemplo
{
"entity_id": "add84642a957b08a3f252c69c9d063de",
"name": "Polyden-Folienfabrik GmbH",
"status": "INACTIVE",
"legal_form": "GmbH",
"purpose": "Herstellung von Folien...",
"registration_date": "1978-02-23T00:00:00",
"address": {
"house_number": "38",
"street": "Ansbacher Straße",
"postal_code": "91560",
"city": "Heilsbronn",
"coordinates": {
"latitude": 49.33438,
"longitude": 10.78262
}
},
"registration": {
"court": "Ansbach",
"register_type": "HRB",
"register_number": "405"
},
"contact_data": {
"website": "https://www.polyden.de",
"phone_number": "+49 9872 808 0"
},
"financial_kpi": [
{
"year": 2022,
"revenue": 41855558.25,
"net_income": -19668989.99,
"employees": 208
}
],
"related_persons": {
"current": [
{
"name": "Knut Neumann",
"role": {
"en": {"long": "Managing Director"},
"de": {"long": "Geschäftsführer"}
},
"start_date": "2019-06-03"
}
]
},
"publications": [...],
"news": [
{
"title": "Company News Title",
"source": "News Source",
"publication_date": "2023-08-08"
}
],
"meta": {
"request_credit_cost": 55,
"credits_remaining": "73841334"
}
}
Detalles de Estructura de Respuesta
Datos Principales de la Empresa
Siempre incluidos: entity_id, name, status, legal_form, address, registration, contact_data, purpose, keywords, products_and_services
financial_kpi
Array de métricas financieras anuales (ingresos, ingreso_neto, empleados, etc.) abarcando múltiples años
balance_sheet_accounts
Datos de balance jerárquico con desglose de activos y pasivos por año
profit_and_loss_account
Estados de PyG detallados con desglose de ingresos, gastos y ganancias por año
related_persons
Directores/funcionarios actuales y pasados con roles, nombres y períodos de mandato
publications
Publicaciones y anuncios oficiales del registro comercial
news
Array de artículos de noticias con título, fuente, fecha de publicación y URL
insolvency_publications
Publicaciones del tribunal de insolvencia con fechas, IDs de caso y detalles de eventos
annual_financial_statements
Informes anuales completos en formato markdown con metadatos
annual_financial_statements__html
Vollständige Jahresberichte im HTML-Format mit Metadaten
shareholders Beta
Lista de accionistas de la empresa con porcentajes de propiedad y roles
ubos Beta
Wirtschaftlich Berechtigte (UBOs) mit Beteiligungsquoten, inklusive aufgelöster und nicht aufgelöster Eigentümer sowie Abdeckungsgrad
shareholdings Beta
Aktuelle Beteiligungen dieses Unternehmens an anderen Gesellschaften mit Anteilshöhe, Einlage und Stichtag
website_content
Unternehmens-Website als strukturiertes Markdown, optimiert für LLM-Verarbeitung (nur AI Mode, 0 Credits)
/v1/fetch-person
15-20 Credits • 60/minPersonenprofile aus dem deutschen Handelsregister und dem öffentlichen Web zusammenführen. ai_search ist immer aktiv; die Grundkosten von 15 Credits enthalten die AI-Anreicherung bereits.
Parameter
| Nombre | Tipo | Requerido | Descripción |
|---|---|---|---|
| api_key | string | REQUERIDO | Tu clave API. Requerida si no usas el encabezado x-api-key o token Bearer |
| person_q | string | REQUERIDO | Name der Person (min. 2 Zeichen, erforderlich) |
| organization_q | string | REQUERIDO | Unternehmenskontext zur Disambiguierung gleichnamiger Personen (min. 2 Zeichen, erforderlich) |
| feature | string[] | opcional | Zusätzliches Datenfeature. Zurzeit unterstützt: shareholdings. |
Verfügbare Features
shareholdings
+5 credits
Beteiligungen der Person an Unternehmen (Name, Anteil, Rolle, Stichtag). +5 Credits, nur wenn Daten geliefert werden.
Beispiel-Anfrage
curl -X GET 'https://handelsregister.ai/api/v1/fetch-person?person_q=Max%20Mustermann&organization_q=Beispielwerk%20Analytics%20GmbH&features=shareholdings' \
-H 'x-api-key: YOUR_API_KEY'
Beispiel-Antwort
{
"entity_id": "f1e2d3c4b5a69788a7b6c5d4e3f2a1b0",
"name": "Max Mustermann",
"birth_date": "1985-07-14",
"name_parts": {
"given": "Max",
"family": "Mustermann",
"maiden": null,
"canonical_name": "Mustermann, Max",
"previous_names": null
},
"location": {
"home": {
"city": "München"
}
},
"bio": "Max Mustermann ist Mitgründer und Geschäftsführer der Beispielwerk Analytics GmbH...",
"expertise": [
"Produktentwicklung",
"Softwareentwicklung",
"Datenanalyse",
"KI"
],
"contact": {
"emails": [
{
"address": "[email protected]",
"type": "organization",
"label": "Allgemeine Kontakt-E-Mail"
}
],
"phones": []
},
"profiles": {
"linkedin": "https://linkedin.com/in/max-mustermann",
"github": "https://github.com/max-mustermann",
"other": []
},
"affiliations": [
{
"organization": "Beispielwerk Analytics GmbH",
"relation": "Geschäftsführer"
}
],
"handelsregister_roles": [
{
"entity_id": "b4a3c2d1e5f697887a6b5c4d3e2f1a0b",
"name": "Beispielwerk Analytics GmbH",
"label": "MANAGING_DIRECTOR",
"role": {
"en": "Managing Director",
"de": "Geschäftsführer"
},
"start_date": "2019-06-03",
"end_date": null
}
],
"shareholdings": {
"holdings": {
"current": [
{
"organization": {
"entity_id": "b4a3c2d1e5f697887a6b5c4d3e2f1a0b",
"name": "Beispielwerk Analytics GmbH",
"status": "ACTIVE",
"legal_form": "GmbH",
"address": {
"house_number": "12",
"street": "Beispielstraße",
"postal_code": "80331",
"city": "München",
"county": "München (Stadt)",
"state": "Bayern",
"country": "DEU",
"coordinates": {
"latitude": 48.13743,
"longitude": 11.57549
}
},
"registration": {
"court": "München",
"register_type": "HRB",
"register_number": "254891"
}
},
"ownership": {
"percentage": 25.0,
"contribution": {
"amount": 12500,
"currency": "EUR"
}
},
"as_of": "2025-03-15"
}
]
},
"summary": {
"total_current": 1
}
},
"meta": {
"request_credit_cost": 20,
"credits_remaining": 9996743
}
}
Grundlegende Personendaten
Immer enthalten: entity_id, name, birth_date, name_parts, location, bio, expertise, contact, profiles, handelsregister_roles, affiliations
/v1/search-organizations
1 crédito • 60/minBusca empresas alemanas con filtrado avanzado y soporte de paginación.
Parámetros
| Nombre | Tipo | Requerido | Descripción |
|---|---|---|---|
| api_key | string | Condicional* | Tu clave API. Requerida si no usas el encabezado x-api-key o token Bearer |
| q | string | REQUERIDO | Consulta de búsqueda (mín: 2 caracteres) |
| skip | integer | opcional | Número de resultados a omitir (predeterminado: 0) |
| limit | integer | opcional | Resultados por página (predeterminado: 10, máx: 30) |
| filters | object | opcional | Filtrar solo por postal_code. Formato: |
Filter
Alle Filter-Schlüssel sind optional. Bereichsfilter akzeptieren {"gte": min, "lte": max} – jede Grenze kann weggelassen werden.
GET /v1/search-organizations?q=GmbH&limit=10&filters={"postal_code":"80331","legal_form_code":"GmbH","pl_revenue":{"gte":1000000,"lte":5000000}}
Zur besseren Lesbarkeit nicht URL-kodiert – in echten Requests muss der filters-Wert URL-kodiert werden.
Identität & Registrierung
6-
registration_date_fromdate - Frühestes Registrierungsdatum (ISO 8601, YYYY-MM-DD).
-
registration_date_todate - Spätestes Registrierungsdatum (ISO 8601, YYYY-MM-DD).
-
legal_form_codestring / array - Deutscher Rechtsformcode, z. B. GmbH, AG, e.V., UG. Einzelner String oder Array.
-
industry_codestring / array - NACE/WZ-Branchencode. Einzelner String oder Array.
-
industry_schemestring - Klassifikationsschema zu industry_code. Standard: WZ2025.
-
activeboolean - true = nur aktive Unternehmen, false = nur inaktive. Weglassen für beide.
Standort
5-
postal_codestring - Deutsche 5-stellige Postleitzahl (PLZ).
-
citystring - Stadtname.
-
statestring - Deutsches Bundesland (z. B. Bayern, Hessen).
-
location_coordinatescoordinates - WGS84-Dezimalkoordinaten als Mittelpunkt für die Geo-Suche.
-
location_max_distance_kmnumber - Radius in km (1–100). Erfordert location_coordinates.
Gericht & Register
3-
registration_typestring / array - Registertyp: HRA, HRB, GnR, PR oder VR. Einzelner String oder Array.
-
registration_authority_namestring - Name des Gerichts/Registergerichts (z. B. München).
-
registration_numberstring - Registernummer (z. B. HRB 12345).
Größe & Mitarbeiter
2-
company_size_categoryenum - Größenklasse: micro, small, medium oder large.
-
emp_countrange - Mitarbeiterzahl-Bereich.
Bilanz
7-
bs_assets_totalEUR range - Bilanzsumme, in EUR.
-
bs_equity_totalEUR range - Eigenkapital, in EUR.
-
bs_liabilities_totalEUR range - Gesamtverbindlichkeiten, in EUR.
-
bs_cash_and_equivalentsEUR range - Kassenbestand & Zahlungsmitteläquivalente, in EUR.
-
bs_cash_to_liabilitiesdecimal range - Liquiditätsgrad (Kassenbestand ÷ Verbindlichkeiten), Dezimalwert.
-
bs_equity_ratioratio (0–1) - Eigenkapitalquote (Eigenkapital ÷ Bilanzsumme), Dezimalwert 0–1.
-
bs_debt_to_assetsratio (0–1) - Fremdkapitalquote (Schulden ÷ Bilanzsumme), Dezimalwert 0–1.
Gewinn- und Verlustrechnung
3-
pl_revenueEUR range - Jahresumsatz, in EUR.
-
pl_net_incomeEUR range - Jahresüberschuss, in EUR.
-
pl_ebitEUR range - EBIT / Betriebsergebnis, in EUR.
Solicitud de Ejemplo
curl 'https://handelsregister.ai/api/v1/search-organizations?api_key=your_api_key_here&q=tech&limit=10&filters=%7B%22postal_code%22%3A%2280992%22%7D'
Respuesta de Ejemplo
{
"results": [
{
"entity_id": "65063129c1bf565e4244b943a188bbda",
"name": "m50 GmbH",
"registration": {
"court": "München",
"register_type": "HRB",
"register_number": "189767"
},
"address": {
"house_number": "20",
"street": "Gubestraße",
"postal_code": "80992",
"city": "München",
"county": "München (Stadt)",
"state": "Bayern",
"country": "DEU",
"coordinates": {
"latitude": 48.18005,
"longitude": 11.51116
}
},
"registration_date": "2011-01-04T00:00:00",
"purpose": "Film- und Fernsehproduktion..."
}
],
"total": 988,
"meta": {
"request_credit_cost": 1,
"credits_remaining": "73841333"
}
}
/v1/fetch-document
5 créditos • 5/minDescarga documentos PDF oficiales del registro comercial alemán.
Parámetros
| Nombre | Tipo | Requerido | Descripción |
|---|---|---|---|
| api_key | string | Condicional* | Tu clave API. Requerida si no usas el encabezado x-api-key o token Bearer |
| company_id | string | REQUERIDO | ID único de entidad de empresa de los resultados de búsqueda |
| document_type | string | REQUERIDO | Tipo de documento. Valores: shareholders_list, articles_of_association, AD, CD, SI |
Solicitud de Ejemplo
curl 'https://handelsregister.ai/api/v1/fetch-document?api_key=your_api_key_here&company_id=20a1510e88cd2e9b166db4d0bc5d563d&document_type=shareholders_list' \
-o document.pdf
Respuesta
Éxito (200): Devuelve archivo PDF directamente
Content-Type: application/pdf · application/xml (application/pdf für AD, CD, shareholders_list, articles_of_association — application/xml für SI.)
Error: Devuelve JSON con detalles del error
Tipos de Documento
shareholders_list
Documento de registro de accionistas
articles_of_association
Gesellschaftervertrag / Satzung / Statut Dokument
AD
Extractos actuales (Aktuelle Daten)
CD
Extractos históricos (Chronologische Daten)
SI
Strukturierte Inhalte – als XML-Datei zurückgegeben.
Manejo de Errores
Solicitud exitosa
Parámetros inválidos
Clave API inválida o faltante
Créditos insuficientes
Límite de velocidad excedido
Error interno del servidor
Formato de Respuesta de Error
{
"error": {
"code": "INSUFFICIENT_CREDITS",
"message": "Your account has insufficient credits",
"details": {
"required": 10,
"available": 5
}
}
}
Python SDK
pip install handelsregister
Uso Básico
from handelsregister import Handelsregister
client = Handelsregister(api_key="your_key")
company = client.fetch_organization(q="BMW AG")
print(company['name'])
print(company['registration'])
Interfaz de Objeto
from handelsregister import Company
company = Company("BMW AG", features=[
"financial_kpi",
"related_persons"
])
print(company.revenue)
print(company.current_ceo)
Enriquecimiento de Datos
client.enrich(
file_path="companies.csv",
query_properties={"name": "company_name", "location": "city"},
features=["financial_kpi", "related_persons"],
output_format="json"
)
SDK npm
npm install handelsregister
Uso Básico
const { Handelsregister, Company } = require('handelsregister');
const client = new Handelsregister('your-api-key');
const companyData = await client.fetchOrganization('OroraTech GmbH');
console.log(companyData.name);
console.log(companyData.registration);
Soporte TypeScript
import { Handelsregister, Company, CompanyData } from 'handelsregister';
const client = new Handelsregister(process.env.API_KEY);
const company: CompanyData = await client.fetchOrganization({
q: 'Konux GmbH',
features: ['financial_kpi', 'related_persons']
});
Interfaz Async/Await
// Using async/await
async function getCompanyInfo() {
try {
const company = await client.fetchOrganization('OroraTech GmbH');
return company;
} catch (error) {
console.error('Error fetching company:', error.message);
}
}
// Multiple companies
const companies = ['OroraTech GmbH', 'Konux GmbH', 'Celonis SE'];
const results = await Promise.all(
companies.map(name => client.fetchOrganization(name))
);
Enriquecimiento de Datos
await client.enrich({
filePath: 'companies.csv',
queryProperties: { name: 'company_name', location: 'city' },
features: ['financial_kpi', 'related_persons'],
outputFormat: 'json'
});
MCP Server Beta
Universeller MCP (Model Context Protocol) Server für nahtlose Integration mit KI-Agenten und Workflow-Automatisierung.
https://mcp.handelsregister.ai/mcp
Kompatibilität & Integration
Unser MCP Server ist mit jedem MCP-kompatiblen Client verwendbar und ermöglicht die einfache Integration von Handelsregister-Daten in Ihre KI-gestützten Workflows.
Hauptfunktionen
- Universelle Kompatibilität mit allen MCP Clients
- Echtzeit-Zugriff auf deutsche Unternehmensdaten
- Perfekt für agentenbasierte Workflows
- Native Integration mit OpenAI SDK
Verwendung mit OpenAI Python SDK
Der MCP Server kann direkt mit dem OpenAI Python SDK verwendet werden, um Handelsregister-Daten in Ihre KI-Anwendungen zu integrieren:
import os
from openai import OpenAI
client = OpenAI(api_key=os.environ["OPENAI_API_KEY"])
resp = client.responses.create(
model="gpt-5",
input="Gib mir die aktuellsten Finanzdaten der Konux GmbH aus München und gebe diese als Markdown-Tabelle aus.",
tools=[
{
"type": "mcp",
"server_label": "handelsregister",
"server_url": "https://mcp.handelsregister.ai/mcp",
"require_approval": "never",
"headers": {
"X-API-Key": os.environ["HANDELSREGISTER_API_KEY"]
},
}
],
)
print(resp.output_text)
Authentifizierung
Die Authentifizierung erfolgt über Ihren handelsregister.ai API-Schlüssel, der als Header übermittelt wird:
X-API-Key: YOUR_API_KEY
Verwenden Sie denselben API-Schlüssel wie für die REST API.
Agentenbasierte Workflows
Der MCP Server ermöglicht die nahtlose Integration von Handelsregister-Daten in komplexe agentenbasierte Workflows:
- • Automatische Datenextraktion und -analyse
- • Multi-Agenten-Systeme mit Zugriff auf Unternehmensdaten
- • Workflow-Automatisierung mit Echtzeit-Datenabruf
- • Integration in bestehende KI-Pipelines
Credits & Preise
MCP-Anfragen verbrauchen dieselben Credits wie direkte API-Aufrufe, basierend auf den angeforderten Features. Die Preise entsprechen exakt den Preisen der Standard-REST-API.
Anforderungen
- Gültiger handelsregister.ai API-Schlüssel
- MCP-kompatibler Client (z.B. OpenAI SDK)
- Python 3.8+ (für OpenAI SDK)
Wichtige Hinweise
- • Diese Funktion befindet sich derzeit in der Beta-Phase. Funktionalität und API können sich ändern.
- • Die Credit-Preise entsprechen exakt den Preisen der Standard-REST-API.
- • Es gelten dieselben Rate Limits wie für die REST API.
- • Bei Fragen oder Problemen wenden Sie sich bitte an unseren Support.