# GLEIF LEI Lookup & Corporate Ownership for AI Agents (`haketa/gleif-lei`) Actor

Look up Legal Entity Identifiers (LEI) and corporate ownership from GLEIF for AI agents & LLMs. Get the LEI code, legal name, address, status, legal form, jurisdiction and parent/child relationships. MCP-callable KYB, compliance & entity-resolution tool.

- **URL**: https://apify.com/haketa/gleif-lei.md
- **Developed by:** [Haketa](https://apify.com/haketa) (community)
- **Categories:** AI, Agents, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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

## GLEIF LEI Lookup & Corporate Ownership — for AI Agents

A **legal-entity (KYB) and ownership tool built for AI agents, LLMs and compliance workflows.** Look up **Legal Entity Identifiers (LEI)** and **corporate ownership** from the official **GLEIF** database — LEI code, legal name, address, status, legal form, jurisdiction and **parent/child relationships**. The "which company is this, and who owns it?" lookup an agent needs for KYB, due diligence and entity resolution.

Clean, structured output — one record per entity, ready for an LLM context or an agent tool response. Callable by **Claude, ChatGPT, LangChain, CrewAI, LlamaIndex and any MCP client** (every Apify actor is MCP-callable via `mcp.apify.com`).

> **🏦 Official, ownership-aware entity data.** "What's Deutsche Bank's LEI? Who is its ultimate parent? How many subsidiaries?" — the actor returns sourced, machine-readable answers.

***

### 🤖 Why this is an AI-agent tool

Know-Your-Business (KYB) and entity resolution are core agent needs. GLEIF is the global authority on legal-entity identity:

- ✅ **Authoritative LEI** — the ISO 17442 global identifier for legal entities
- ✅ **Ownership tree** — direct & ultimate parents and child counts (most tools skip this)
- ✅ **Structured & sourced** — clean fields for compliance and due diligence
- ✅ **MCP-ready** — call it from any agent framework or MCP client

***

### 📋 What this actor does

Search by name, full text, country or LEI and get, for each entity:

- ✅ **LEI code, legal name, status** and legal form
- ✅ **Legal & headquarters address**, city, country, jurisdiction
- ✅ **Registration** — status, initial date, next renewal
- ✅ **Ownership** — direct & ultimate parent (LEI + name), number of children

***

### 🚀 Quick start

1. Enter a **Search query** (e.g. `Deutsche Bank`) or a **Country** (e.g. `DE`).
2. Keep **Include ownership** on for the parent/child tree.
3. Set **Max results** and click **Start**.
4. Read the structured entities from **Storage → Dataset**.

***

### ⚙️ Input

| Field | Type | Description |
| --- | --- | --- |
| **Search query** | string | Company name or text, e.g. `Apple`, `Deutsche Bank`. |
| **Search mode** | select | `Full text` (broad, incl. addresses) or `Legal name` (precise). |
| **Country** | string | Filter by legal-address country (ISO 2-letter, e.g. US, DE, GB). |
| **LEI codes** | array | Look up specific LEIs directly. |
| **Active registrations only** | boolean | Keep only issued/active registrations. |
| **Include ownership** | boolean | Fetch direct & ultimate parent and child count. |
| **Max results** | integer | Cap on entities. `0` = no limit. |
| **Proxy** | object | Optional — GLEIF is keyless with no anti-bot. |

#### Example 1 — Companies named "Deutsche Bank" with ownership

```json
{ "query": "Deutsche Bank", "includeOwnership": true, "maxItems": 200 }
```

#### Example 2 — Active entities in Germany

```json
{ "country": "DE", "activeOnly": true, "maxItems": 500 }
```

#### Example 3 — Specific LEIs

```json
{ "leis": ["7LTWFZYICNSX8D621K86"], "includeOwnership": true }
```

***

### 📦 Output

```json
{
  "lei": "7LTWFZYICNSX8D621K86",
  "legalName": "Deutsche Bank Aktiengesellschaft",
  "entityStatus": "ACTIVE",
  "registrationStatus": "ISSUED",
  "legalForm": "6QQB",
  "category": "GENERAL",
  "jurisdiction": "DE",
  "legalAddress": "Taunusanlage 12, Frankfurt am Main, 60325, DE",
  "legalCity": "Frankfurt am Main",
  "legalCountry": "DE",
  "hqCountry": "DE",
  "initialRegistrationDate": "2012-11-27",
  "nextRenewalDate": "2026-11-26",
  "ultimateParentLei": null,
  "ultimateParentName": null,
  "directParentLei": null,
  "directParentName": null,
  "childrenCount": "412",
  "gleifUrl": "https://search.gleif.org/#/record/7LTWFZYICNSX8D621K86",
  "scrapedAt": "2026-07-04T00:00:00.000Z"
}
```

#### Output fields

| Field | Description |
| --- | --- |
| `lei` | Legal Entity Identifier (20 chars). |
| `legalName` | Registered legal name. |
| `entityStatus` / `registrationStatus` | Entity and registration status. |
| `legalForm` / `category` / `jurisdiction` | Legal form (ELF), category, jurisdiction. |
| `legalAddress` / `legalCity` / `legalCountry` | Legal address. |
| `hqAddress` / `hqCountry` | Headquarters. |
| `initialRegistrationDate` / `lastUpdateDate` / `nextRenewalDate` | Registration dates. |
| `ultimateParentLei` / `ultimateParentName` | Ultimate parent (if part of a group). |
| `directParentLei` / `directParentName` | Direct parent. |
| `childrenCount` | Number of direct children/subsidiaries. |
| `gleifUrl` | GLEIF record link. |

> **Note:** ownership fields are populated only when the entity is part of a corporate group; independent entities have no parent.

***

### 🔌 AI & integrations

- **MCP:** every Apify actor is callable from `mcp.apify.com` — add this as a tool in Claude Desktop, VS Code or any MCP client.
- **Frameworks:** LangChain (`ApifyActorsTool`), LlamaIndex, CrewAI, Vercel AI SDK, n8n.
- **API:** run and fetch results with the Apify API or JS / Python clients.

***

### 💡 Use cases

| Use case | How it helps |
| --- | --- |
| **KYB / onboarding** | Verify a legal entity and its LEI in seconds. |
| **AML / compliance** | Resolve ownership trees for due diligence. |
| **Entity resolution** | Map company names to a global identifier. |
| **Supplier / counterparty risk** | Check status, jurisdiction and parentage. |

***

### ❓ FAQ

**Do I need an API key?**
No — GLEIF is keyless and open.

**What is an LEI?**
A 20-character ISO 17442 identifier for a legally distinct entity, issued globally under GLEIF.

**Why are ownership fields sometimes empty?**
Only entities that are part of a corporate group have parents; independent entities don't.

**Can an AI agent call this directly?**
Yes — it's designed as a tool-call source and is MCP-callable via Apify.

***

### ⚖️ Legal & responsible use

This actor uses the public GLEIF API. LEI data is published under CC0. Respect the API's rate limits and use the data for lawful purposes such as KYB, compliance and research.

***

### 🛟 Support

Need an extra field or relationship? Open a ticket from the actor's **Issues** tab.

Happy resolving! 🏦

# Actor input Schema

## `query` (type: `string`):

Type a company or organization name to look up, e.g. "Apple", "Deutsche Bank". Leave empty to get a ready-made sample of well-known entities worldwide.

## `searchField` (type: `string`):

How your search term is matched. "Legal name" is precise (name only); "Full text" is broader and also matches addresses.

## `country` (type: `string`):

Only return entities registered in this country. Leave on "Any country" to search worldwide.

## `countryCode` (type: `string`):

Optional. For a country not in the list above, enter its 2-letter ISO code here (e.g. GR, CZ, HU). Overrides the Country dropdown when set.

## `activeOnly` (type: `boolean`):

Keep only entities with an active, currently issued LEI registration.

## `includeOwnership` (type: `boolean`):

Add each entity's direct & ultimate parent company and its number of subsidiaries — the corporate ownership tree. Highly valuable for KYB and research.

## `leis` (type: `array`):

Optional. Already have LEI codes? Paste them here to look them up directly, e.g. 7LTWFZYICNSX8D621K86. Most users can leave this empty and just search by name.

## `maxItems` (type: `integer`):

Maximum number of entities to return. Set 0 for no limit.

## `proxyConfiguration` (type: `object`):

Apify Proxy settings. A proxy is not required for this Actor and is off by default.

## Actor input object example

```json
{
  "query": "Deutsche Bank",
  "searchField": "fulltext",
  "country": "",
  "activeOnly": false,
  "includeOwnership": true,
  "leis": [],
  "maxItems": 100,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `lei` (type: `string`):

Legal Entity Identifier (20 chars)

## `legalName` (type: `string`):

Registered legal name

## `entityStatus` (type: `string`):

ACTIVE / INACTIVE

## `registrationStatus` (type: `string`):

ISSUED / LAPSED / ...

## `legalForm` (type: `string`):

Legal form code (ELF)

## `category` (type: `string`):

Entity category

## `jurisdiction` (type: `string`):

Registration jurisdiction

## `legalAddress` (type: `string`):

Full legal address

## `legalCity` (type: `string`):

Legal address city

## `legalCountry` (type: `string`):

Legal address country

## `hqAddress` (type: `string`):

Headquarters address

## `hqCountry` (type: `string`):

Headquarters country

## `initialRegistrationDate` (type: `string`):

Initial registration date

## `lastUpdateDate` (type: `string`):

Last update date

## `nextRenewalDate` (type: `string`):

Next renewal date

## `ultimateParentLei` (type: `string`):

Ultimate parent LEI

## `ultimateParentName` (type: `string`):

Ultimate parent name

## `directParentLei` (type: `string`):

Direct parent LEI

## `directParentName` (type: `string`):

Direct parent name

## `childrenCount` (type: `string`):

Number of direct children

## `gleifUrl` (type: `string`):

GLEIF record URL

## `scrapedAt` (type: `string`):

Extraction timestamp

# 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 = {
    "query": "Deutsche Bank",
    "leis": [],
    "maxItems": 100
};

// Run the Actor and wait for it to finish
const run = await client.actor("haketa/gleif-lei").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 = {
    "query": "Deutsche Bank",
    "leis": [],
    "maxItems": 100,
}

# Run the Actor and wait for it to finish
run = client.actor("haketa/gleif-lei").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 '{
  "query": "Deutsche Bank",
  "leis": [],
  "maxItems": 100
}' |
apify call haketa/gleif-lei --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/6vFU81NOgeesl1h2Y/builds/XAlgfSPndCd1Xnt18/openapi.json
