# LEI Lookup API - GLEIF Legal Entity Identifier Search (`captainhandsome/gleif-lei-search`) Actor

Look up Legal Entity Identifiers in the official GLEIF register by company name or exact LEI. Each result carries registration status, jurisdiction, legal and headquarters addresses, and the company's own national registration number, for counterparty due diligence and KYC research.

- **URL**: https://apify.com/captainhandsome/gleif-lei-search.md
- **Developed by:** [Joseph McRell](https://apify.com/captainhandsome) (community)
- **Categories:** Business, Lead generation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.10 / 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/actors/running/actors-in-store.md#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 Search

Search the official GLEIF Legal Entity Identifier register by organization name, LEI or free text and export 72 flat columns per entity: legal and headquarters addresses, the company's number in its own national registry, legal form and registration authority resolved from codes into words, corporate events such as dissolution and bankruptcy, BIC/MIC/OpenCorporates/S\&P cross-reference IDs, and optional parent and subsidiary ownership. No API key is required. Set `max_items` before each run to keep output and cost predictable.

### What data can I extract?

- Official global GLEIF data, published under CC0
- Company-name, free-text and exact-LEI lookup modes
- Legal and headquarters addresses, plus alternative-language and transliterated names and addresses
- `registered_as`, the company's number in its OWN national registry - the join key to Companies House, SIRENE or the Handelsregister
- Codes resolved to words: `legal_form_name` ("Private Limited Company"), `registered_at_name` ("Companies House"), `managing_lou_name`, country and region names
- Corporate events: dissolution, bankruptcy, liquidation, M\&A, name and address changes, with effective dates
- Cross-reference IDs for joining: BIC, MIC, OpenCorporates and S\&P Global
- Data-quality columns: `corroboration_level`, `conformity_flag`, `next_renewal_date`
- Optional ownership: direct and ultimate parent, subsidiary count and names, ISINs

Every result is written to the default dataset and can be downloaded as JSON, CSV, Excel, or XML.

#### All 72 columns

**Identity** — `alternative_language_names`, `direct_children_names`, `direct_parent_lei`, `direct_parent_name`, `gleif_profile_url`, `hq_country_name`, `hq_region_name`, `legal_country_name`, `legal_form_name`, `legal_name`, `legal_name_language`, `legal_region_name`, `lei`, `managing_lou_name`, `ocid`, `other_names`, `previous_legal_names`, `registered_at_name`, `successor_lei`, `successor_name`, `trading_names`, `transliterated_names`, `ultimate_parent_lei`, `ultimate_parent_name`

**Status** — `category`, `conformity_flag`, `event_types`, `has_direct_children`, `has_direct_parent`, `has_isins`, `has_ultimate_parent`, `latest_event_status`, `latest_event_type`, `registration_status`, `status`, `sub_category`

**Dates** — `creation_date`, `initial_registration_date`, `last_update_date`, `latest_event_effective_date`, `next_renewal_date`

**Location** — `direct_parent_country`, `hq_address`, `hq_city`, `hq_country`, `hq_postal_code`, `hq_region`, `legal_address`, `legal_city`, `legal_country`, `legal_postal_code`, `legal_region`, `other_addresses`, `ultimate_parent_country`

**Counts and measures** — `direct_children_count`, `event_count`, `isin_count`

**Other detail** — `bic`, `corroboration_level`, `direct_parent_exception_reason`, `hq_mail_routing`, `isins`, `jurisdiction`, `legal_form`, `legal_form_code`, `legal_mail_routing`, `managing_lou`, `mic`, `registered_as`, `registered_at`, `spglobal`, `ultimate_parent_exception_reason`

### Input example

```json
{
  "query": "Tesco",
  "search_mode": "name",
  "country": "GB",
  "status": "ACTIVE",
  "include_relationships": false,
  "max_items": 10
}
```

Set `include_relationships` to `true` to add parent, subsidiary and ISIN columns. Those live on separate GLEIF endpoints, so it adds up to six requests per record and makes runs slower.

The default input is deliberately bounded and produces a small, useful Store test. `max_items` is a hard output ceiling.

### Output example

```json
{
  "lei": "213800JBW23QIB8OWZ72",
  "legal_name": "TESCO HOLDINGS LIMITED",
  "legal_name_language": "en",
  "other_names": "Custody Bank of Japan, Ltd./014152037/203702",
  "previous_legal_names": "QUERCUS INVESTMENT PARTNERS (2014) LIMITED",
  "trading_names": "リニアロジック, Linear logic",
  "alternative_language_names": "TABATA Co., Ltd.",
  "transliterated_names": "Linear Logic Ltd.",
  "status": "ACTIVE",
  "registration_status": "ISSUED",
  "jurisdiction": "GB",
  "category": "GENERAL",
  "sub_category": "LOCAL_GOVERNMENT",
  "legal_form": "H0PO",
  "legal_form_code": "H0PO",
  "registered_as": "00243011",
  "registered_at": "RA000585",
  "creation_date": "1929-10-16T00:00:00Z",
  "legal_address": "TESCO HOUSE, SHIRE PARK, KESTREL WAY",
  "legal_city": "WELWYN GARDEN CITY",
  "legal_region": "GB-HRT",
  "legal_country": "GB",
  "legal_postal_code": "AL7 1GA",
  "legal_mail_routing": "C/O Begbies Traynor(Central)Llp",
  "hq_address": "TESCO HOUSE, SHIRE PARK, KESTREL WAY",
  "hq_city": "WELWYN GARDEN CITY",
  "hq_region": "GB-HRT",
  "hq_country": "GB"
}
```

44 further columns are omitted here for length — the full list is above, and every column appears in the export whether or not the source populated it.

### Common use cases

- Entity resolution and vendor onboarding
- KYC and counterparty research
- Corporate master-data enrichment
- LEI validation and compliance workflows

### Use with AI agents and MCP

Apify's MCP server can discover and call this Actor from an AI workflow. Example intent:

> Find 10 active UK legal entities matching Tesco and return their LEIs and legal addresses.

Use the JSON from **Input example** as the tool arguments. The strict input schema rejects unsupported parameters, and the documented dataset schema tells the agent how to interpret each returned field.

### Pricing and cost control

Output is billed per result at **$0.003 per result** (about $3.00 per 1,000 results), plus a $0.0005 Actor-start charge billed once per gigabyte of memory at run start. Use `max_items` to cap both output volume and charges. The price shown on the Apify Store listing is authoritative.

`max_items` limits both output volume and result-based charges. Start with 10 records, inspect them, and then scale deliberately.

### Reliability

The Actor validates input, bounds pagination, retries transient upstream failures, writes structured records, and fails explicitly when the source cannot produce usable output. A production default-input canary is monitored by the fleet.

### Limitations and responsible use

- A name search can return similarly named entities and requires caller review.
- Coverage is limited to entities represented in the GLEIF register.
- Address completeness depends on the submitting registration authority.
- This tool supplies public reference data, not a KYC decision.

Use the data lawfully, respect source terms, and independently validate records before making consequential decisions.

### FAQ

#### Does it need my own API key?

No, the default workflow does not require a customer-supplied API key.

#### Can I export the results?

Yes. Download the default dataset as JSON, CSV, Excel, or XML, or retrieve it through the Apify API.

#### How do I control cost?

Set `max_items` to the most records you want returned. Begin with the bounded default input.

#### Can an AI agent call it?

Yes. The Actor has strict input and semantic output schemas and can be called through Apify's MCP tooling.

#### What happens when a source field is missing?

The relevant field is returned as null or an empty normalized value rather than being merged into another field.

# Actor input Schema

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

Company name, an LEI, or free text depending on Search mode.

## `search_mode` (type: `string`):

name = legal name only. fulltext = the whole record including addresses and former names. lei = exact LEI lookup.

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

Two-letter country code of the LEGAL ADDRESS, e.g. GB. Leave empty for no country filter (e.g. GB).

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

Two-letter code of the registering jurisdiction, e.g. FR. Can differ from country.

## `status` (type: `string`):

Limit to active or inactive entities. Leave empty for no status filter (e.g. ACTIVE).

## `include_relationships` (type: `boolean`):

Add direct and ultimate parent, subsidiary count and names, ISINs, and the reason an entity reports no parent. These live on separate GLEIF endpoints, so this adds up to six requests per record and makes runs slower. Leave off for a fast flat lookup.

## `max_items` (type: `integer`):

Hard cap on records returned. Also caps your spend.

## Actor input object example

```json
{
  "query": "Tesco",
  "search_mode": "name",
  "include_relationships": false,
  "max_items": 10
}
```

# Actor output Schema

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

Structured records from the default dataset.

# 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": "Tesco"
};

// Run the Actor and wait for it to finish
const run = await client.actor("captainhandsome/gleif-lei-search").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": "Tesco" }

# Run the Actor and wait for it to finish
run = client.actor("captainhandsome/gleif-lei-search").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 '{
  "query": "Tesco"
}' |
apify call captainhandsome/gleif-lei-search --silent --output-dataset

```

## MCP server setup

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

```

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/9ZCdIfPRC5woLSvvI/builds/w2sSf9dIjxr2XsXtk/openapi.json
