# GLEIF LEI Normalizer — Corporate Ownership & KYC Enrichment (`wakey7dev/gleif-lei-normalizer`) Actor

Search the global GLEIF Legal Entity Identifier (LEI) registry and get clean, KYC-ready records with direct + ultimate corporate parents resolved. Normalizes legal names, jurisdictions and legal forms. Free API, no key needed.

- **URL**: https://apify.com/wakey7dev/gleif-lei-normalizer.md
- **Developed by:** [Chris Wakefield](https://apify.com/wakey7dev) (community)
- **Categories:** Business
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

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

![Chris The Dev](https://raw.githubusercontent.com/chriswakefield87/appstore-screenshot-translator/main/assets/actor-banner.png)

## GLEIF LEI Normalizer — Corporate Ownership & KYC Enrichment

Search the global **GLEIF Legal Entity Identifier (LEI)** registry and get clean, KYC-ready records with the full corporate ownership chain resolved. This Actor queries GLEIF's free public API (no key required), then **normalizes** the raw data into structured, human-readable output.

### What it does

- 🔍 **Search** legal entities worldwide by name (e.g. `Johnson & Johnson`, `Siemens`, `Barclays`) or look up an exact 20-character LEI
- 🌍 **Jurisdiction mapping** — converts ISO country codes (`US`, `DE`, `IN`) into full country names
- 🏢 **Legal-form mapping** — converts GLEIF's cryptic legal-form codes into readable descriptions
- 🧹 **Legal-name canonicalization** — strips legal suffixes (`Inc.`, `Ltd`, `GmbH`, `S.A.S.`…) for entity resolution
- 🌳 **Corporate ownership tree** — resolves each entity's **direct parent** and **ultimate parent** (the top of the ownership chain)
- ✅ **Status normalization** — entity + registration statuses mapped to readable labels and flags
- 📍 **Address flattening** — legal and headquarters addresses normalized to single-line strings

### Why you'd use it

- **KYC / AML compliance** — verify legal entity identities and ownership structure
- **Supply-chain mapping** — trace who ultimately owns a supplier or counterparty
- **Corporate registry data** — build clean entity databases for enrichment pipelines
- **Journalism / investigations** — map corporate ownership networks
- **Competitive intelligence** — identify subsidiaries of a parent group

### Input parameters

| Parameter | Type | Required | Description |
|---|---|---|---|
| `searchQuery` | string | one of `searchQuery`/`lei` | Legal name to search (e.g. `Johnson & Johnson`) |
| `lei` | string | one of `searchQuery`/`lei` | Exact LEI lookup (e.g. `549300G0CFPGEF6X2043`) |
| `jurisdiction` | string | no | Filter by 2-letter ISO country code (`US`, `DE`, `GB`…) |
| `entityStatus` | select | no | `ACTIVE` / `INACTIVE` / all |
| `includeOwnershipTree` | boolean | no | Resolve direct + ultimate parent (default `true`) |
| `maxResults` | integer | no | Max entities to return (1–200, default 25) |

### Example input

```json
{
  "searchQuery": "Johnson & Johnson",
  "jurisdiction": "",
  "entityStatus": "ACTIVE",
  "includeOwnershipTree": true,
  "maxResults": 10
}
```

### Example output

```json
{
  "lei": "549300G0CFPGEF6X2043",
  "legalName": "Johnson & Johnson",
  "legalNameNormalized": "Johnson & Johnson",
  "country": "United States",
  "countryCode": "US",
  "legalForm": "Corporation",
  "legalAddress": "One Johnson & Johnson Plaza, New Brunswick, US-NJ, 08933, United States",
  "statusLabel": "Active",
  "isActive": true,
  "registrationStatusLabel": "Issued (active)",
  "nextRenewalDate": "2027-08-15T00:00:00Z",
  "ultimateParent": {
    "lei": "549300G0CFPGEF6X2043",
    "legalName": "Johnson & Johnson",
    "country": "United States"
  }
}
```

A search for `Janssen` returns the subsidiary **JANSSEN-CILAG** (BE) with its **ultimateParent** resolved to **Johnson & Johnson** (US) — the kind of corporate-ownership linkage that's otherwise slow and error-prone to assemble by hand.

### Data source

Data is sourced live from the [Global Legal Entity Identifier Foundation (GLEIF)](https://www.gleif.org) public API (`api.gleif.org`). GLEIF publishes the global LEI index under an open-data licence that permits commercial use. No API key is required.

# Actor input Schema

## `searchQuery` (type: `string`):

Search for legal entities by name (e.g. 'Johnson & Johnson', 'Siemens', 'Barclays'). Leave empty if using an exact LEI lookup.

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

Look up a single legal entity by its exact 20-character LEI code (e.g. '549300G0CFPGEF6X2043'). Takes precedence over name search when both are provided.

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

Optional: filter name search by 2-letter ISO country code (e.g. 'US', 'DE', 'GB', 'FR'). Leave empty for all jurisdictions.

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

Filter by entity status.

## `includeOwnershipTree` (type: `boolean`):

Resolve each entity's direct parent and ultimate parent (the top of the corporate ownership chain). Adds 'directParent' and 'ultimateParent' fields to every result.

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

Maximum number of legal entities to return (1–200).

## Actor input object example

```json
{
  "searchQuery": "Johnson & Johnson",
  "entityStatus": "",
  "includeOwnershipTree": true,
  "maxResults": 25
}
```

# Actor output Schema

## `results` (type: `string`):

Complete dataset with all normalized legal entity records.

## `summary` (type: `string`):

Human-readable summary table of the retrieved entities.

## `stats` (type: `string`):

Machine-readable run statistics.

# 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 = {
    "searchQuery": "Johnson & Johnson",
    "lei": "",
    "jurisdiction": ""
};

// Run the Actor and wait for it to finish
const run = await client.actor("wakey7dev/gleif-lei-normalizer").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 = {
    "searchQuery": "Johnson & Johnson",
    "lei": "",
    "jurisdiction": "",
}

# Run the Actor and wait for it to finish
run = client.actor("wakey7dev/gleif-lei-normalizer").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "searchQuery": "Johnson & Johnson",
  "lei": "",
  "jurisdiction": ""
}' |
apify call wakey7dev/gleif-lei-normalizer --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,wakey7dev/gleif-lei-normalizer"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/IhLsLpdZjUJfvDMX5/builds/RpmWc54VOWafiOqno/openapi.json
