# LEI Company Lookup & Ownership (GLEIF) (`cheremikin/gleif-lei-lookup`) Actor

Find legal entities in the Global LEI Index: batch LEI lookup, fuzzy company-name matching, or country/status filters. Legal name, legal form, address, registry ID, renewal dates, plus direct and ultimate parent companies. CC0 open data.

- **URL**: https://apify.com/cheremikin/gleif-lei-lookup.md
- **Developed by:** [Alexandr Cheremikin](https://apify.com/cheremikin) (community)
- **Categories:** Lead generation, Developer tools, AI
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 entity records

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

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

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## LEI Company Lookup & Ownership (GLEIF)

Look up any legal entity in the **Global LEI Index**, the official open register of Legal Entity Identifiers (LEIs) for about 3 million companies, funds, branches and government bodies worldwide. You can:

- **Search by company name.** Fuzzy matching works in any language and ignores legal-form words such as *Ltd*, *Corporation* or *Public Company Limited*. Each candidate gets a `matchScore` from 0 to 100, so you can match a messy CRM list to LEIs.
- **Look up LEI codes in bulk.** Paste hundreds of LEIs and the actor fetches them 100 per API request.
- **List by filters.** Pick a country, entity status (ACTIVE/INACTIVE), LEI registration status (ISSUED/LAPSED/…) and category (company, fund, branch, government).
- **Ownership chains.** For each entity you get the **direct parent** and the **ultimate parent** (LEI, name, country) from GLEIF Level 2 "who owns whom" data. When no parent is reported, you get the official reason, e.g. `NATURAL_PERSONS`, `NON_CONSOLIDATING` or `NO_KNOWN_PERSON`.

No API key, no login. You pay per entity record.

### What you get

One flat record per entity. Real example values from a run (Siam Commercial Bank):

| Field | Example | Notes |
|---|---|---|
| `lei` | `54930068OELHUBHH1U03` | 20-character LEI |
| `legalName` | `บริษัท ธนาคารไทยพาณิชย์ จำกัด (มหาชน)` | official legal name, original script |
| `legalNameEn` | `THE SIAM COMMERCIAL BANK PUBLIC COMPANY LIMITED` | best Latin-script name (legal or transliterated) |
| `otherNames` | `["SIAM COMMERCIAL BANK PUBLIC COMPANY LIMITED", …]` | previous, trading and transliterated names |
| `status` | `ACTIVE` | entity status |
| `registrationStatus` | `ISSUED` | LEI status (ISSUED, LAPSED, RETIRED…) |
| `category` | `GENERAL` | GENERAL / FUND / BRANCH / … |
| `legalFormCode` / `legalForm` | `O0OZ` / `บริษัทมหาชนจำกัด` | ISO 20275 code and name |
| `jurisdiction` | `TH` | legal jurisdiction |
| `country`, `city`, `region`, `postalCode`, `addressLine` | `TH`, `BANGKOK`, `TH-10`, `10900`, `9 RATCHADAPHISEK ROAD, CHATUCHAK` | registered legal address of the company |
| `hqCountry`, `hqCity`, `hqAddressLine` | `TH`, `BANGKOK`, `9 RATCHADAPISEK ROAD, CHATUCHAK` | headquarters address |
| `registrationAuthorityId` | `RA000554` | GLEIF code of the business register |
| `registrationAuthorityEntityId` | `0107536000102` | company number in that register |
| `entityCreationDate` | `2014-01-16T00:00:00Z` | as reported |
| `initialRegistrationDate` | `2014-01-16T03:08:00Z` | LEI first issued |
| `lastUpdate` | `2026-09-23T13:07:09Z` | last change to the record |
| `nextRenewal` | `2027-10-17T00:00:00Z` | LEI renewal due date |
| `corroborationLevel` | `FULLY_CORROBORATED` | how the data was validated |
| `managingLou` | `213800WAVVOPS85N2205` | LEI issuer managing the record |
| `bic` | `["SICOTHBKXXX", …]` | mapped SWIFT/BIC codes |
| `successorLei` | `null` | set after mergers |
| `directParent` | `{"lei": "254900TG41KIWX7VDO42", "name": "SCB X Public Company Limited", "country": "TH", "exceptionReason": null}` | direct accounting parent |
| `ultimateParent` | `{"lei": "254900TG41KIWX7VDO42", "name": "SCB X Public Company Limited", "country": "TH", "exceptionReason": null}` | top of the chain |
| `matchedQuery`, `matchScore` | `Siam Commercial Bank`, `100` | name mode only |
| `url` | `https://search.gleif.org/#/record/54930068OELHUBHH1U03` | public GLEIF record page |

### How to use

1. Choose a **Mode**:
   - *Search by company names*: enter one name per line. Use **Max results per name** and **Min match score** to control how strict matching is. **Country** narrows the search.
   - *Look up LEI codes*: paste LEIs, one per line. Invalid or unknown codes are logged and not charged.
   - *List by country / status filters*: set a country and/or statuses.
2. Leave **Include direct & ultimate parent** on if you need ownership. Each entity then takes 2–4 extra API calls, which slows the run.
3. Set **Max entity records** and start the run. Export the dataset as JSON, CSV or Excel, or call the actor through the Apify API or MCP.

Example input:

```json
{
  "mode": "names",
  "names": ["Siam Commercial Bank", "Toyota Motor"],
  "maxResultsPerName": 5,
  "includeOwnership": true
}
```

Speed: GLEIF allows 60 API requests per minute, and the actor stays just under that. Expect about 50–60 records per minute without ownership, or about 15–25 per minute with ownership.

### Use cases

- **KYB / AML onboarding.** Confirm that a counterparty exists, that its LEI is current (not LAPSED), and who its parent and ultimate parent are.
- **Supplier and vendor verification.** Get the legal name, registered address and business-register number for procurement master data.
- **CRM and data enrichment.** Match free-text company names to LEIs, then add legal form, country, BIC and group structure.
- **Regulatory reporting.** Check LEI validity and renewal dates before EMIR, MiFID II or SFTR reporting.
- **AI agents (MCP).** Give an assistant a tool for "who is this company and who owns it?" with structured, citable output.

### Data source & licence

Data comes live from the public **GLEIF API** (`api.gleif.org`), which is built on the GLEIF Golden Copy. GLEIF provides LEI data free of charge under the **CC0 1.0** licence (see GLEIF's *LEI Data Terms of Use*). Source: Global Legal Entity Identifier Foundation (GLEIF), https://www.gleif.org.

**This actor is not affiliated with, endorsed by or supported by GLEIF or any LEI issuer (LOU).** It is an independent tool that reads the open data. Only the original LEI reference data comes from GLEIF. The match scores, the ranking and the flattened format are this actor's own work.

Fuzzy name matching is statistical. Before you rely on a match for compliance decisions, confirm it against other identifiers such as the registry number and address.

### Privacy & fair use

- Only legal-entity reference data is returned: company names, registered and headquarters addresses, and identifiers.
- **Sole-proprietor LEIs are always skipped**, because they describe natural persons and their home addresses.
- The actor respects GLEIF's published rate limit (60 requests per minute) and backs off on HTTP 429.

Built and maintained by Alexandr Cheremikin (Koh Samui, Thailand) with an AI assistant.

# Actor input Schema

## `mode` (type: `string`):

names = fuzzy search by company name; lei = look up a list of LEI codes; filters = list entities by country / status / category.

## `names` (type: `array`):

Company names to match (any language; legal-form words like Ltd / Corporation / Public Company Limited are ignored when scoring). Each name returns up to 'Max results per name' candidates ranked by match score.

## `lei` (type: `array`):

20-character LEI codes, e.g. 5493006W3QUS5LMH6R84. Looked up in batches of 100. Unknown codes are logged and not charged.

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

Optional. Legal-address country, e.g. TH, JP, US, DE. Narrows name search; in filters mode give a country or at least one status/category filter.

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

ACTIVE = legal entity still exists; INACTIVE = dissolved/merged.

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

ISSUED = LEI is current; LAPSED = not renewed on time; RETIRED / MERGED / ANNULLED etc.

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

GENERAL = companies; FUND; BRANCH; RESIDENT_GOVERNMENT_ENTITY; INTERNATIONAL_ORGANIZATION. Sole proprietors are never returned.

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

Adds directParent and ultimateParent (LEI, name, country) from GLEIF Level 2 'who owns whom' data, or the reported reason when no parent is given (e.g. NATURAL_PERSONS, NON_CONSOLIDATING). Costs 2-4 extra API calls per entity, so runs are slower.

## `maxResultsPerName` (type: `integer`):

How many best-matching entities to return for each company name.

## `minMatchScore` (type: `integer`):

Name mode only: drop candidates whose name similarity is below this score. 100 = exact name (ignoring legal-form words).

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

Stop after this many entity records in total.

## Actor input object example

```json
{
  "mode": "names",
  "names": [
    "Siam Commercial Bank",
    "Toyota Motor"
  ],
  "lei": [
    "5493006W3QUS5LMH6R84",
    "54930068OELHUBHH1U03"
  ],
  "entityStatus": "ACTIVE",
  "registrationStatus": "ISSUED",
  "category": "ANY",
  "includeOwnership": true,
  "maxResultsPerName": 5,
  "minMatchScore": 0,
  "maxItems": 50
}
```

# Actor output Schema

## `entities` (type: `string`):

No description

# 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 = {
    "names": [
        "Siam Commercial Bank",
        "Toyota Motor"
    ],
    "lei": [
        "5493006W3QUS5LMH6R84",
        "54930068OELHUBHH1U03"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("cheremikin/gleif-lei-lookup").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 = {
    "names": [
        "Siam Commercial Bank",
        "Toyota Motor",
    ],
    "lei": [
        "5493006W3QUS5LMH6R84",
        "54930068OELHUBHH1U03",
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("cheremikin/gleif-lei-lookup").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 '{
  "names": [
    "Siam Commercial Bank",
    "Toyota Motor"
  ],
  "lei": [
    "5493006W3QUS5LMH6R84",
    "54930068OELHUBHH1U03"
  ]
}' |
apify call cheremikin/gleif-lei-lookup --silent --output-dataset

```

## MCP server setup

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

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/OF91vWKbQIYWmVXfk/builds/vgjxC0riXUqXGgp8M/openapi.json
