# LEI Lookup & Health Check: Status, Renewal, Parents (GLEIF) (`yzy001/lei-health-check`) Actor

Check a list of LEIs or company names against official GLEIF data: registration status (lapsed, retired, duplicate), renewal due dates, direct and ultimate parents or why none is reported, successors, BIC, addresses and data-quality flags. Batch lookups; track changes between runs.

- **URL**: https://apify.com/yzy001/lei-health-check.md
- **Developed by:** [宗諭 楊](https://apify.com/yzy001) (community)
- **Categories:** Business, Lead generation, Automation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.50 / 1,000 entity checkeds

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 Lookup & Health Check: Status, Renewal, Parents (GLEIF)

Check a list of Legal Entity Identifiers (LEIs), or company names, against the official GLEIF data and get one row per entity: whether the LEI is still valid (issued, lapsed, retired, duplicate, annulled), when it must be renewed, who the direct and ultimate parents are or why none is reported, whether the entity was merged into a successor, its BIC codes, registered and headquarters addresses, and GLEIF's own data-quality markers. Every row carries a `checkStatus` and a list of `flags`, so a counterparty list can be screened at a glance and scheduled for monitoring.

Up to 5,000 LEIs per run, looked up in batches of 200; a list of 1,000 LEIs takes about a minute.

### What you get for each entity

| Field | Meaning |
|---|---|
| `inputType`, `input`, `expectedName`, `lei` | `LEI`, `NAME`, `ISIN` or `BIC`; what you gave; the name you expected (after a `|`); the LEI checked |
| `checkStatus`, `flags` | `OK`, `ATTENTION` (see flags), `NOT_FOUND`, `INVALID_LEI`, `INVALID_ISIN`, `INVALID_BIC`, `NAME_NOT_RESOLVED`, `NAME_AMBIGUOUS` or `CODE_MAPS_TO_SEVERAL_LEIS` |
| `legalName`, `otherNames`, `nameMatch` | Registered legal name, trading and transliterated names; `EXACT`, `OTHER_NAME` or `DIFFERENT` from the name you expected |
| `entityCategory`, `legalFormCode`, `jurisdiction`, `registeredAs`, `registrationAuthorityId` | Kind of entity, legal form (ISO 20275 code), jurisdiction, company number and the register it is in |
| `entityStatus`, `expirationDate`, `expirationReason`, `successorLei`, `successorName` | Active or inactive, and the successor after a merger or for a duplicate LEI |
| `registrationStatus`, `initialRegistrationDate`, `lastUpdateDate`, `nextRenewalDate`, `daysToRenewal` | The LEI's own status and renewal date |
| `managingLouLei`, `managingLouName` | The LEI issuer that manages the record (where it is renewed) |
| `corroborationLevel`, `conformityFlag` | How far the issuer checked the data against a register; GLEIF's conformity marker |
| `legalAddress`, `headquartersAddress` | Address lines, city, region, postal code, country |
| `bic`, `mic`, `ocid`, `spglobal` | BIC codes, market identifier code, OpenCorporates ID, S\&P Global IDs |
| `directParentLei`, `directParentName`, `directParentJurisdiction`, `directParentRelationshipStatus`, `directParentRecordStatus`, `directParentException` | The accounting-consolidation parent, or the reason none is reported |
| `ultimateParent…` | The same for the ultimate parent |
| `headOfficeLei/Name`, `fundManagerLei/Name`, `umbrellaFundLei/Name`, `masterFundLei/Name` | A branch's head office; a fund's manager, umbrella fund and master fund |
| `candidates`, `otherExactMatches` | For names: the closest matches when none is exact, or other exact matches |
| `changeStatus`, `changedFields`, `firstSeen` | With tracking: `FIRST_RUN`, `NEW`, `CHANGED` (and which fields) or `SEEN` |

### Flags

| Flag | Raised when |
|---|---|
| `LAPSED` | The LEI was not renewed by its renewal date |
| `RETIRED`, `ANNULLED`, `DUPLICATE`, `PENDING_TRANSFER`, `PENDING_ARCHIVAL` | Any other registration status than ISSUED (a duplicate points to the LEI to use in `successorLei`) |
| `RENEWAL_DUE` | An issued LEI must be renewed within the warning period (60 days by default) |
| `RENEWAL_DATE_PASSED` | An issued LEI whose renewal date is already past |
| `ENTITY_INACTIVE` | The legal entity itself is no longer active |
| `HAS_SUCCESSOR` | The entity was merged or taken over; see `successorLei` / `successorName` |
| `NOT_FULLY_CORROBORATED` | The issuer did not fully check the data against a register |
| `NON_CONFORMING` | GLEIF marks the record as not conforming to its data rules |
| `NAME_DIFFERS` | The name you gave after `|` is neither the legal name nor another registered name |
| `PARENT_NOT_REPORTED` | An issued LEI with neither a direct parent nor a reason for not reporting one (branches report their head office instead and are not flagged) |
| `INVALID_LEI_FORMAT`, `INVALID_CHECK_DIGITS`, `NOT_FOUND` | The input is not an LEI, has wrong check digits (ISO 17442), or is unknown to GLEIF |

### Input

One LEI per line. To verify that an LEI belongs to the company you think, add the name after a `|`:

```
HWUPKR0MPOU8FGXBT394 | Apple Inc.
W38RGI023J3WT1HWRP32 | Siemens AG
2549008YU9EOMHFUA249
```

Lowercase LEIs and repeated lines are fine. Company names can be given instead of LEIs.

### ISINs and BICs

Give securities ISINs or bank BICs (SWIFT codes) instead of LEIs and each is mapped to its LEI with GLEIF's own ISIN-LEI and BIC-LEI data, then checked like any LEI. ISINs are checked against their ISO 6166 check digit first; an 8-character BIC is read as the head office (`DEUTDEFF` = `DEUTDEFFXXX`). A code GLEIF does not map comes back as `NOT_FOUND`, one mapped to several LEIs as `CODE_MAPS_TO_SEVERAL_LEIS` with the candidates. All 956 ISINs GLEIF maps to Apple Inc. pass the check-digit test.

### Company names

Names are matched exactly after removing punctuation, accents and case, and short legal forms are tried in both spellings, so "Heineken NV" finds Heineken N.V., "Nestle SA" finds NESTLÉ S.A. and "Siemens AG" finds Siemens Aktiengesellschaft. Nothing is guessed: without an exact match the row is `NAME_NOT_RESOLVED` and lists the closest candidates with their LEIs (for "Siemens AG" the first search hit is a different company, Siemens Energy AG in Switzerland). When several entities have exactly that name, the only issued one is used and the others are listed; if that does not decide it, the row is `NAME_AMBIGUOUS`. For long lists, LEIs are faster and certain.

### Parents

For runs of up to 10 entities, parents are read from the GLEIF API entity by entity; for larger runs, from GLEIF's relationship and reporting-exception files, which cover every LEI and are read once per run. Both give the same answers (checked on the same entities), with one difference: when an entity gives several reasons for not reporting a parent (about 2 in 1,000 exceptions), the API gives the first and the files give all. The run summary names the source and the GLEIF publication used. When no parent is reported, the reason is given, for example `NATURAL_PERSONS` (owned by individuals), `NON_CONSOLIDATING`, `NO_KNOWN_PERSON`, `NO_LEI` (the parent has no LEI) or `NON_PUBLIC`. Parent data is declared by the entity itself; it is accounting consolidation, not beneficial ownership. If the files cannot be downloaded before the run's time limit, the entities are returned without parents and the status message says so.

### Sole proprietors

Sole proprietors are people. Their names, street addresses and postal codes are not returned (`nameWithheld` is true); their LEI status, dates, city and country are.

### Monitoring

Schedule the Actor with `trackChanges` on to see what changed since the last run: a lapsed LEI, a new renewal date, a new parent, a changed address. With `onlyChanged`, only new and changed entities are returned. The state is kept in your own key-value store for 400 days.

### Things to know

- The check digits are verified before anything is looked up. They catch every swap of two neighbouring characters and nearly every single wrong character, but not all; an LEI with valid check digits that GLEIF does not know is `NOT_FOUND`.
- GLEIF publishes three times a day. When an entity's parent data changed between the publication the API serves and the newest files, the row says so in `parentDataNote`.
- If GLEIF cannot be reached or its data format changes, the run fails instead of returning entities without their data.

### Data

GLEIF (Global Legal Entity Identifier Foundation): the public LEI API and the Level 2 golden copy files, published under CC0. No login, no API key and no scraping of web pages.

# Actor input Schema

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

One LEI per line (20 characters). Optionally add the name you expect after a '|', for example 'HWUPKR0MPOU8FGXBT394 | Apple Inc.', to have a different registered name flagged. Up to 5,000 per run.

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

Optional. Full legal names, for example 'Heineken N.V.' or 'Siemens AG'. Only exact matches (ignoring punctuation, accents and case) are used; otherwise the row lists the closest candidates. Up to 100 per run.

## `isins` (type: `array`):

Optional. Securities ISINs, mapped to the issuer's LEI with GLEIF's ISIN-LEI data (check digit verified first). Up to 300 per run; a name after '|' works as for LEIs.

## `bics` (type: `array`):

Optional. Bank BICs, 8 or 11 characters, mapped to the LEI with GLEIF's BIC-LEI data. An 8-character BIC is read as the head office (XXX). Up to 2,000 per run.

## `renewalWarningDays` (type: `integer`):

Flag RENEWAL_DUE when an issued LEI must be renewed within this many days (0-365).

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

Add the direct and ultimate parent (or the reason none is reported), the head office of a branch, and a fund's manager, umbrella and master fund. Adds a few seconds per entity for up to 10 entities, and about 30 seconds for any larger list.

## `onlyProblems` (type: `boolean`):

Return only rows with at least one flag, or whose input could not be matched.

## `trackChanges` (type: `boolean`):

Remember each entity's status, renewal date, name, addresses and parents, and mark rows NEW, CHANGED (with the changed fields), SEEN or FIRST_RUN.

## `onlyChanged` (type: `boolean`):

With tracking on, return only entities that are new or changed since the last run.

## Actor input object example

```json
{
  "leis": [
    "HWUPKR0MPOU8FGXBT394 | Apple Inc.",
    "2549008YU9EOMHFUA249",
    "W38RGI023J3WT1HWRP32 | Siemens AG",
    "353800SZHNPYLZTIX835",
    "529900B2SJHRNHASKN89",
    "529900EEAO54DO6SOW04",
    "HWUPKR0MPOU8FGXBT395"
  ],
  "companyNames": [
    "Heineken NV"
  ],
  "isins": [
    "US5949181045"
  ],
  "bics": [
    "DEUTDEFF"
  ],
  "renewalWarningDays": 60,
  "includeParents": true,
  "onlyProblems": false,
  "trackChanges": false,
  "onlyChanged": false
}
```

# Actor output Schema

## `items` (type: `string`):

One row per input with status, flags and parents.

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

Counts by status and flag, the GLEIF publications used, caveats.

# 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 | Apple Inc.",
        "2549008YU9EOMHFUA249",
        "W38RGI023J3WT1HWRP32 | Siemens AG",
        "353800SZHNPYLZTIX835",
        "529900B2SJHRNHASKN89",
        "529900EEAO54DO6SOW04",
        "HWUPKR0MPOU8FGXBT395"
    ],
    "companyNames": [
        "Heineken NV"
    ],
    "isins": [
        "US5949181045"
    ],
    "bics": [
        "DEUTDEFF"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("yzy001/lei-health-check").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 | Apple Inc.",
        "2549008YU9EOMHFUA249",
        "W38RGI023J3WT1HWRP32 | Siemens AG",
        "353800SZHNPYLZTIX835",
        "529900B2SJHRNHASKN89",
        "529900EEAO54DO6SOW04",
        "HWUPKR0MPOU8FGXBT395",
    ],
    "companyNames": ["Heineken NV"],
    "isins": ["US5949181045"],
    "bics": ["DEUTDEFF"],
}

# Run the Actor and wait for it to finish
run = client.actor("yzy001/lei-health-check").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 | Apple Inc.",
    "2549008YU9EOMHFUA249",
    "W38RGI023J3WT1HWRP32 | Siemens AG",
    "353800SZHNPYLZTIX835",
    "529900B2SJHRNHASKN89",
    "529900EEAO54DO6SOW04",
    "HWUPKR0MPOU8FGXBT395"
  ],
  "companyNames": [
    "Heineken NV"
  ],
  "isins": [
    "US5949181045"
  ],
  "bics": [
    "DEUTDEFF"
  ]
}' |
apify call yzy001/lei-health-check --silent --output-dataset

```

## MCP server setup

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

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/IWvghcAZvyguUhkQQ/builds/s7WCdI6ECE2pKrSEz/openapi.json
