# LEI Lookup (GLEIF) - Company Legal Entity Identifiers (`hydramill/lei-lookup`) Actor

Look up Legal Entity Identifiers from the official GLEIF database (CC0): by LEI code or company name, filtered by country. One clean flat record per entity: legal name, legal form, status, registration dates, addresses, business register id and parent companies.

- **URL**: https://apify.com/hydramill/lei-lookup.md
- **Developed by:** [Hydramill](https://apify.com/hydramill) (community)
- **Categories:** Lead generation, Other
- **Features:** Limited permissions
- **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/actors/running/actors-in-store.md#pay-per-usage

## 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 Lookup (GLEIF) - Company Legal Entity Identifiers

Look up **Legal Entity Identifiers (LEI)** from **GLEIF**, the Global Legal Entity Identifier Foundation, as **clean, flat JSON**. Search by **LEI code**, by **company name**, or list a **country**, and get one row per legal entity: legal name, legal form, status, LEI registration dates, legal and headquarters address, business register id and, optionally, the **direct and ultimate parent company**.

It uses GLEIF's official public API directly: no scraping, no login, no API key, no proxies, no browser. The data is published under **CC0**.

### What you can use it for

- **KYC, onboarding and due diligence.** Check that a counterparty exists, is active and whether its LEI is `ISSUED` or `LAPSED` (renewal overdue).
- **Company data enrichment.** Add the registered address, legal form, register id and BIC codes to a list of companies or LEIs in your CRM or spreadsheet.
- **Corporate structure.** Find the direct and ultimate parent of an entity where GLEIF publishes it.
- **Market research.** List the entities of a country, e.g. all active LEI holders in Spain, or every company matching a name.

### Why this actor

- **One clean flat record per entity.** GLEIF returns deeply nested JSON:API objects. You get plain fields: `legalAddressStreet`, `legalAddressCity`, `legalAddressCountry`..., dates as ISO 8601, lists as lists.
- **Three ways in, in one run.** LEI codes, company names and country filters can be combined. Records are de-duplicated and `matchedBy` tells you which input found each one.
- **Unknown LEIs reported.** Codes GLEIF does not know are listed in the run summary instead of silently disappearing.
- **Parents only where they exist.** The actor reads GLEIF's relationship links first and requests a parent only when one is published.
- **Beyond 10,000 results.** It pages with GLEIF's cursor, so a country-wide list is not cut at 10,000 rows.
- **Free to use.** You only pay Apify's usual platform usage.

Many LEI actors exist on the Apify Store (about 17 found on 2026-11-12). This one is free and focuses on a clean address and parent output.

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| `leis` | list of text | none | 20-character LEI codes, e.g. `HWUPKR0MPOU8FGXBT394`. |
| `searchTerms` | list of text | none | Company names to search (legal and other names). One search per term, best matches first. |
| `countries` | list of text | all | Legal address country, ISO alpha-2 (`ES`, `DE`, `US`...). Filters name searches; alone, lists that country. |
| `activeOnly` | boolean | `false` | In name and country searches, skip entities that are not active. LEIs you list are always returned. |
| `includeParents` | boolean | `true` on the Store form | Add direct and ultimate parent (up to 2 extra requests per entity, so slower). |
| `maxItems` | integer | `100` (Store form: `20`) | Stop after this many entities in total. `0` = no limit. |

Give at least one of `leis`, `searchTerms` or `countries`.

#### Example input: Apple and every Telefonica entity in Spain, with parents

```json
{
  "leis": ["HWUPKR0MPOU8FGXBT394"],
  "searchTerms": ["Telefonica"],
  "countries": ["ES"],
  "includeParents": true,
  "maxItems": 20
}
```

#### Example input: all active LEI holders in Liechtenstein

```json
{
  "countries": ["LI"],
  "activeOnly": true,
  "maxItems": 0
}
```

### Output

One dataset item per legal entity. Real item from a run on 2026-11-12:

```json
{
  "lei": "549300FIL3FK65HUVO65",
  "legalName": "TELEFONICA INNOVATION VENTURES S.L.",
  "legalNameLanguage": "es",
  "otherNames": [
    "TELEFONICA OPEN FUTURE SL",
    "TELEFONICA DIGITAL VENTURE CAPITAL SL"
  ],
  "country": "ES",
  "jurisdiction": "ES",
  "legalFormCode": "DP3Q",
  "entityCategory": "GENERAL",
  "entityStatus": "ACTIVE",
  "registeredAs": "B86437704",
  "registeredAt": "RA000535",
  "legalAddressStreet": "RONDA DE LA COMUNICACIÓN S/N, EDIFICIO CENTRAL",
  "legalAddressCity": "MADRID",
  "legalAddressRegion": "ES-M",
  "legalAddressPostalCode": "28050",
  "legalAddressCountry": "ES",
  "registrationStatus": "LAPSED",
  "initialRegistrationDate": "2013-11-27T03:05:00Z",
  "nextRenewalDate": "2021-10-06T00:00:00Z",
  "directParentLei": "549300EEJH4FEPDBBR25",
  "directParentName": "TELEFONICA SA",
  "ultimateParentLei": "549300EEJH4FEPDBBR25",
  "ultimateParentName": "TELEFONICA SA",
  "recordUrl": "https://search.gleif.org/#/record/549300FIL3FK65HUVO65",
  "matchedBy": "search: Telefonica",
  "retrievedAt": "2026-11-12T12:05:12.053Z"
}
```

(Shortened: the real item also has the headquarters address, `bic`, `managingLou`, `successorLei`, `lastUpdateDate`, `hasDirectParent` and `hasUltimateParent`.)

| Field | Description |
|---|---|
| `lei` | Legal Entity Identifier (ISO 17442). Stable key to de-duplicate scheduled runs. |
| `legalName`, `legalNameLanguage`, `otherNames` | Registered name and other names. |
| `country`, `jurisdiction` | Country of the legal address and legal jurisdiction. |
| `legalFormCode`, `legalFormOther` | ELF code (ISO 20275) of the legal form; free text if it has none. |
| `entityCategory`, `entityStatus`, `entityCreationDate` | GENERAL, FUND, BRANCH...; ACTIVE or INACTIVE; creation date. |
| `registeredAs`, `registeredAt` | Business register id (e.g. Spanish NIF) and GLEIF's code for that register. |
| `legalAddress*`, `headquartersAddress*` | Street, city, region, postal code, country. |
| `registrationStatus` | LEI status: `ISSUED`, `LAPSED`, `RETIRED`, `ANNULLED`, `MERGED`... |
| `initialRegistrationDate`, `lastUpdateDate`, `nextRenewalDate` | LEI registration dates. |
| `managingLou`, `successorLei`, `bic` | Issuing operating unit, successor entity, SWIFT BIC codes. |
| `hasDirectParent`, `hasUltimateParent` | GLEIF publishes that relationship. |
| `directParent*`, `ultimateParent*` | Parent LEI and name, filled with `includeParents`. |
| `recordUrl`, `matchedBy`, `retrievedAt` | Official record, which input found it, read time (UTC). |

The default key-value store also gets a `SUMMARY` record: LEIs not found, searches with totals, results and the data attribution.

Export the dataset as JSON, CSV, Excel or XML, or read it through the Apify API and integrations (Make, Zapier, Slack, Google Sheets, webhooks).

### Pricing

Free: you only pay Apify's usual platform usage, which is tiny for this actor (no browser, 256 MB).

### Personal data (GDPR)

LEI records describe legal entities. Some entities are sole proprietors, whose registered name and address GLEIF already publishes. The actor adds nothing to that. If you combine this data with other personal data, you are responsible for it under the GDPR (Regulation (EU) 2016/679).

### Data source and attribution

Source: GLEIF (Global Legal Entity Identifier Foundation), <https://www.gleif.org>. Golden Copy data via the GLEIF API.

- Data: GLEIF API v1, `https://api.gleif.org/api/v1/lei-records`, anonymous access, documented at <https://www.gleif.org/en/lei-data/gleif-api>.
- Licence: GLEIF LEI Data Terms of Use, <https://www.gleif.org/en/meta/lei-data-terms-of-use>: the data "are provided under the CC0 licence" and the service is provided for free. CC0 needs no attribution; citing GLEIF is good practice.

**This is an independent tool. It is not affiliated with, endorsed by or sponsored by GLEIF.** GLEIF gives no guarantee about availability or accuracy; follow `recordUrl` for the official record.

### Limitations

- GLEIF lists entities that obtained an LEI (about 3 million), not every company in a country.
- Parent data exists only where the entity reported it; many report an "exception" instead.
- Name search is GLEIF's full-text search: the best matches come first, but loose matches appear too.
- Records can be `LAPSED` (renewal overdue) and still show old data.

### En español

Datos de **LEI** (Legal Entity Identifier) de **GLEIF** en JSON plano y limpio: busca por código LEI, por nombre de empresa o lista un país. Nombre legal, forma jurídica, estado, fechas de registro, direcciones, identificador del registro mercantil y matriz directa y última. Datos CC0. Gratuito. Fuente: GLEIF (https://www.gleif.org). Herramienta independiente, sin relación con GLEIF.

### En català

Dades de **LEI** (Legal Entity Identifier) de **GLEIF** en JSON pla i net: cerca per codi LEI, per nom d'empresa o llista un país. Nom legal, forma jurídica, estat, dates de registre, adreces, identificador del registre mercantil i matriu directa i última. Dades CC0. Gratuït. Font: GLEIF (https://www.gleif.org). Eina independent, sense relació amb GLEIF.

# Actor input Schema

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

20-character Legal Entity Identifiers, e.g. HWUPKR0MPOU8FGXBT394 (Apple Inc.). Unknown codes are listed in the run summary.

## `searchTerms` (type: `array`):

Names to search (full text over legal and other names). One search per term; the best matches come first.

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

Keep only entities whose legal address is in these countries (ISO 3166-1 alpha-2: ES, DE, US...). Applies to name searches. With no LEIs and no names, lists the entities of those countries.

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

In name and country searches, skip entities that are no longer active (dissolved, merged...). LEI codes you list are always returned.

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

Fills the direct and ultimate parent (LEI and name) when GLEIF has them. Needs up to 2 extra requests per entity, so it is slower: use it with up to a few hundred entities.

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

Stop after this many entities in total. 0 = no limit.

## Actor input object example

```json
{
  "leis": [
    "HWUPKR0MPOU8FGXBT394",
    "549300EEJH4FEPDBBR25"
  ],
  "searchTerms": [
    "Telefonica"
  ],
  "countries": [
    "ES"
  ],
  "activeOnly": false,
  "includeParents": true,
  "maxItems": 20
}
```

# Actor output Schema

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

One item per legal entity found.

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

Searches made, totals, LEIs not found (key SUMMARY in the default key-value store).

# 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 = {
    "leis": [
        "HWUPKR0MPOU8FGXBT394",
        "549300EEJH4FEPDBBR25"
    ],
    "searchTerms": [
        "Telefonica"
    ],
    "countries": [
        "ES"
    ],
    "maxItems": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("hydramill/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 = {
    "leis": [
        "HWUPKR0MPOU8FGXBT394",
        "549300EEJH4FEPDBBR25",
    ],
    "searchTerms": ["Telefonica"],
    "countries": ["ES"],
    "maxItems": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("hydramill/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 '{
  "leis": [
    "HWUPKR0MPOU8FGXBT394",
    "549300EEJH4FEPDBBR25"
  ],
  "searchTerms": [
    "Telefonica"
  ],
  "countries": [
    "ES"
  ],
  "maxItems": 20
}' |
apify call hydramill/lei-lookup --silent --output-dataset

```

## MCP server setup

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