# GLEIF LEI Lookup – Legal Entity Identifier & Parent Companies (`openharvest/lei-lookup`) Actor

GLEIF LEI lookup: search the official Legal Entity Identifier database by company name or look up LEI, ISIN and BIC codes. Get legal name, legal form, registered and HQ address, company number, registration authority, LEI status and renewal date, plus direct and ultimate parents.

- **URL**: https://apify.com/openharvest/lei-lookup.md
- **Developed by:** [Enes Bulanık](https://apify.com/openharvest) (community)
- **Categories:** Business, Lead generation, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$1.00 / 1,000 legal entities

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

## GLEIF LEI Lookup – Legal Entity Identifier & Parent Companies

GLEIF LEI lookup: search the official Legal Entity Identifier database by company name or look up LEI, ISIN and BIC codes. Get legal name, legal form, registered and HQ address, company number, registration authority, LEI status and renewal date, plus direct and ultimate parents.

**Price: $1.00 per 1,000 entities.** No API key, no login. Inputs that can't be resolved are free.

### What data do you get?

For every legal entity (company, bank, fund, branch, government body…):

- **LEI** (ISO 17442) and link to the GLEIF record page
- **Legal name** and other / trading / previous / transliterated names
- **Legal form** in plain words (e.g. *Aktiengesellschaft*, *Public Limited Company*) and its ISO 20275 ELF code
- **Legal address** and **headquarters address** (lines, city, region, postal code, country, one-line text)
- **Company number** (`registeredAs`) and **registration authority** name (e.g. *Companies House*, *Division of Corporations, Delaware*)
- **Jurisdiction**, entity category (general, branch, fund…), entity creation date
- **Entity status** (active/inactive) and **LEI registration status** (issued, lapsed, retired, merged…)
- **Initial registration**, **last update** and **next renewal** dates – spot lapsed LEIs before your counterparty does
- **Direct parent** and **ultimate parent** (LEI, name, country) from GLEIF Level 2 relationship data
- **BIC/SWIFT codes** mapped to the LEI, successor entity for merged companies

### Why this LEI lookup?

- **Official source** – uses the GLEIF REST API only, with retries and rate limiting below GLEIF's 60 requests per minute. A wrong input produces a free error row; it does not fail the run.
- **Name search that handles real-world input** – case-, accent- and punctuation-insensitive, understands legal suffixes (`Siemens AG` finds *Siemens Aktiengesellschaft*), tolerates typos (`Microsfot` → *MICROSOFT CORPORATION*) and ranks results so the group's main entity comes first. Every result has a `matchScore`.
- **Any identifier** – paste LEIs, ISINs or BICs into one list; LEI check digits are validated before any request.
- **Corporate parents included** at no extra cost.
- **$1 per 1,000 entities**, with no charge for inputs that can't be resolved.

### Use cases

- **KYC / AML onboarding** – verify a counterparty's legal name, address, register number and LEI status.
- **Regulatory reporting** (EMIR, MiFID II, SFTR, Dodd-Frank) – check that the LEIs in your trade reports are valid and not lapsed.
- **Corporate group mapping** – find the ultimate parent of suppliers, customers or investees.
- **Data enrichment & CRM cleanup** – turn company names into standardised legal entities with addresses and identifiers.
- **Securities reference data** – map ISINs to their issuer's LEI.
- **AI agents** – give an LLM a tool that answers "which legal entity is this company, and who owns it?" from the official register.

### How to use it

1. Enter one or more **Company names** (e.g. `Deutsche Bank`) and/or **LEI / ISIN / BIC codes**.
2. Optionally limit name search to **Countries** (`DE`, `GB`, `US`…) and choose **Entity status**.
3. Set **Max matches per company name** (1 = best match only) and **Max entities**.
4. Click **Start**. Export as JSON, CSV, Excel, or use the API, Make, Zapier, n8n or Google Sheets.

### Input

| Field | Type | Description |
|---|---|---|
| `companyNames` | array of strings | Company names to search. |
| `leis` | array of strings | LEIs (20 chars), ISINs (12 chars) or BIC/SWIFT codes (8/11 chars). |
| `countries` | array of strings | Optional ISO country codes for name search (legal address). |
| `entityStatus` | `ACTIVE` | `INACTIVE` | `ALL` | Name search filter. Default `ACTIVE`. |
| `maxResultsPerName` | integer | Best matches per name. Default `3`. |
| `includeParents` | boolean | Add direct & ultimate parent. Default `true`. |
| `maxItems` | integer | Max entities in total (cost cap). Default `100`. |

Example:

```json
{
    "companyNames": ["Barclays Bank PLC", "Siemens AG", "Nestle"],
    "leis": ["HWUPKR0MPOU8FGXBT394", "US0378331005"],
    "countries": [],
    "maxResultsPerName": 1,
    "includeParents": true
}
```

With empty input the Actor runs a small demo (Apple Inc. by LEI + "Deutsche Bank" by name).

### Output

Real sample (BIC list shortened):

```json
{
    "type": "entity",
    "lei": "G5GSEF7VJP5I7OUK5573",
    "legalName": "BARCLAYS BANK PLC",
    "otherNames": [],
    "legalForm": "Public Limited Company",
    "legalFormCode": "B6ES",
    "status": "ACTIVE",
    "registrationStatus": "ISSUED",
    "category": "GENERAL",
    "jurisdiction": "GB",
    "country": "GB",
    "legalAddress": {
        "addressLines": ["1 CHURCHILL PLACE"],
        "city": "LONDON",
        "region": "GB-LND",
        "postalCode": "E14 5HP",
        "country": "GB",
        "text": "1 CHURCHILL PLACE, E14 5HP LONDON, GB-LND, GB"
    },
    "headquartersAddress": { "addressLines": ["1 CHURCHILL PLACE"], "city": "LONDON", "region": "GB-LND", "postalCode": "E14 5HP", "country": "GB", "text": "1 CHURCHILL PLACE, E14 5HP LONDON, GB-LND, GB" },
    "registeredAs": "01026167",
    "registrationAuthority": "Companies House",
    "registrationAuthorityId": "RA000585",
    "entityCreationDate": "1971-10-04T00:00:00Z",
    "initialRegistrationDate": "2012-06-06T15:51:54Z",
    "lastUpdate": "2026-04-13T15:09:56Z",
    "nextRenewal": "2027-04-30T00:00:00Z",
    "corroborationLevel": "FULLY_CORROBORATED",
    "managingLou": "213800WAVVOPS85N2205",
    "directParent": { "lei": "213800LBQA1Y9L22JB70", "name": "BARCLAYS PLC", "country": "GB" },
    "ultimateParent": { "lei": "213800LBQA1Y9L22JB70", "name": "BARCLAYS PLC", "country": "GB" },
    "bic": ["BARCGB22XXX", "BARCGB21CHP", "BARCUS33XXX"],
    "expiration": null,
    "successorEntity": null,
    "url": "https://search.gleif.org/#/record/G5GSEF7VJP5I7OUK5573",
    "matchedQuery": "Barclays Bank PLC",
    "matchScore": 100,
    "scrapedAt": "2026-10-07T19:16:24.753Z"
}
```

Inputs that cannot be resolved produce a **free** row:

```json
{ "type": "error", "query": "7LTWFZYICNSX8D621K87", "errorCode": "INVALID_INPUT", "error": "\"7LTWFZYICNSX8D621K87\" looks like an LEI but its check digits are wrong (typo?)." }
```

`errorCode` values: `INVALID_INPUT`, `NOT_FOUND`, `NO_MATCH`, `LOOKUP_FAILED`, `SEARCH_FAILED`.

`directParent` / `ultimateParent` are `null` when the entity has no parent or did not report one (e.g. owned by natural persons). Console views: **Overview**, **Addresses & registration**, **Not found & errors**.

### Pricing

Pay-per-event – you only pay for entities you receive. Platform usage is included.

| Event | Price | When |
|---|---|---|
| `entity` | **$0.001** per entity ($1.00 / 1,000) | Each legal entity saved to the dataset |
| Errors / not found | **Free** | Invalid codes, unknown LEIs, names without matches |

| Job | Cost |
|---|---|
| Verify 100 LEIs | **$0.10** |
| Best match for 1,000 company names | **$1.00** |
| 5,000 entities with parents | **$5.00** |

Corporate parent lookups are free. Set **Max cost per run** in run options – the Actor stops cleanly at your budget.

### Use with AI agents (MCP)

This Actor works as a tool for AI agents through the [Apify MCP server](https://mcp.apify.com) (Claude, ChatGPT, Cursor, n8n…). Agents get small, typed inputs and flat JSON outputs. Example tool input an agent can send:

```json
{
    "companyNames": ["Siemens AG"],
    "maxResultsPerName": 1,
    "includeParents": true,
    "maxItems": 1
}
```

Typical prompts: *"What is the LEI of Barclays Bank PLC and who is its parent?"*, *"Is LEI 529900SS7ZWCX82U3W60 still active?"*, *"Which company issued ISIN US0378331005?"*.

### FAQ

**Do I need a GLEIF account or API key?** No. GLEIF publishes LEI data as open data via a free public API.

**How fresh is the data?** GLEIF updates its golden copy several times per day; every run queries the live API.

**Why does a name return several entities?** Large groups have many subsidiaries and branches with similar names. Results are sorted by name similarity, then active status, then the oldest LEI (usually the main entity). Use `maxResultsPerName: 1` for the best match only, or add `countries`.

**Why is `directParent` null?** Either the entity is the top of its group, or it reported an exception to GLEIF (e.g. natural-person owners, no consolidated accounts).

**Can I look up thousands of LEIs?** Yes. LEIs are fetched in batches of 100 per request. With parents enabled each entity needs two extra API calls, and GLEIF allows 60 calls per minute, so large runs take a few minutes. Turn off `includeParents` for maximum speed.

**Does BIC lookup work for every bank?** Only for BICs that SWIFT/GLEIF have mapped to an LEI. Use the 11-character form (`DEUTDEFFXXX`); 8-character codes get `XXX` added automatically.

### Is it legal?

LEI data is **public open data** published by the Global Legal Entity Identifier Foundation under the CC0 licence, which allows free reuse. The Actor only uses the official public API and only returns data about legal entities, not about private individuals.

### Related actors

Other actors by the same developer:

- **UK Companies House Scraper – New Companies by SIC & Profiles** – company register data for UK entities
- **TED, SAM.gov, UK & Brazil Tenders Scraper – Public Procurement** – public contracts won by the entities you look up
- **Bulk WHOIS Lookup – RDAP, DNS Records, SSL & Redirects** – check the domains of counterparties

### Support & feedback

Found a bug or need a field? Open an issue in the **Issues** tab.

# Actor input Schema

## `companyNames` (type: `array`):

Legal or trading names of companies, banks, funds or other legal entities to search for, e.g. <code>Deutsche Bank</code>, <code>Siemens AG</code>, <code>Apple Inc</code>. Matching is case-, accent- and punctuation-insensitive and tolerant of small typos; the closest matches come first.

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

Identifiers to look up directly: 20-character LEIs (e.g. <code>HWUPKR0MPOU8FGXBT394</code>), 12-character ISINs (e.g. <code>US0378331005</code>) or 8/11-character BIC/SWIFT codes (e.g. <code>DEUTDEFFXXX</code>). LEI check digits are validated.

## `countries` (type: `array`):

Optional. Only return entities whose legal address is in one of these countries - 2-letter ISO codes such as <code>DE</code>, <code>GB</code>, <code>US</code>, <code>FR</code>. Applies to company-name search only.

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

Which entities to return from name search: only active entities (default), only inactive ones (dissolved, merged...), or all.

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

How many of the best-matching entities to return for each company name (1 = only the best match). Many groups have dozens of subsidiaries with similar names.

## `includeParents` (type: `boolean`):

Add the direct parent and ultimate parent (LEI, name, country) of every entity, as reported to GLEIF (Level 2 relationship data). Free - it only makes the run a bit slower.

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

Maximum number of entities to return in total. You pay per entity, so this also caps your cost. 0 = no limit.

## Actor input object example

```json
{
  "companyNames": [
    "Deutsche Bank",
    "Siemens AG",
    "Nestle"
  ],
  "leis": [
    "HWUPKR0MPOU8FGXBT394",
    "US0378331005",
    "DEUTDEFFXXX"
  ],
  "countries": [
    "DE",
    "GB"
  ],
  "entityStatus": "ACTIVE",
  "maxResultsPerName": 3,
  "includeParents": true,
  "maxItems": 100
}
```

# Actor output Schema

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

All scraped items in the default dataset (JSON, CSV, Excel and more via the dataset export).

## `files` (type: `string`):

Records saved in the default key-value store, e.g. the run summary.

# 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 = {
    "companyNames": [
        "Deutsche Bank",
        "Siemens AG"
    ],
    "leis": [
        "HWUPKR0MPOU8FGXBT394"
    ],
    "maxItems": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("openharvest/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 = {
    "companyNames": [
        "Deutsche Bank",
        "Siemens AG",
    ],
    "leis": ["HWUPKR0MPOU8FGXBT394"],
    "maxItems": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("openharvest/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 '{
  "companyNames": [
    "Deutsche Bank",
    "Siemens AG"
  ],
  "leis": [
    "HWUPKR0MPOU8FGXBT394"
  ],
  "maxItems": 20
}' |
apify call openharvest/lei-lookup --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,openharvest/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/TIUcanI8yqX9kZzyB/builds/2imeDnQeUhxgzutNB/openapi.json
