# GLEIF Global Legal Entity (LEI) & KYB Registry API (`regenerative_cornice/gleif-lei-company-registry`) Actor

Verify global companies via the official GLEIF LEI REST API (3.5M+ entities). Look up by name, LEI code, BIC/SWIFT, or country to extract official legal name, status, legal & HQ addresses, jurisdiction, legal form, registration authority ID, BICs, and renewal dates.

- **URL**: https://apify.com/regenerative_cornice/gleif-lei-company-registry.md
- **Developed by:** [John Erlbacher](https://apify.com/regenerative_cornice) (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 $3.00 / 1,000 lei legal 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.
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?

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 Global Legal Entity (LEI) & KYB Registry API

Verify global companies, financial institutions, funds, and corporate subsidiaries directly against the **official Global Legal Entity Identifier Foundation (GLEIF) REST API** (`https://api.gleif.org/api/v1/lei-records`) covering **3.5M+ authoritative global legal entities**.

Built for **Know Your Business (KYB) onboarding, fintech & payment compliance, B2B lead enrichment, bank BIC-to-LEI mapping, supply chain vendor verification, procurement due diligence, n8n/Make automations, and AI agents (MCP)**.

Because this Actor queries the official public GLEIF Open Data API directly—with **zero API key required, zero proxy costs, zero CAPTCHAs, and sub-second JSON responses**—your compliance and enrichment workflows remain 100% legal, auditable, and deterministic.

***

### Why Use This GLEIF LEI & KYB Registry Actor?

- **Official Authoritative Registry Data:** Directly consumes the GLEIF Global LEI Index (ISO 17442), maintained by accredited Local Operating Units (LOUs) and corroborated against official national business registers worldwide.
- **Multi-Modal Entity Lookup:** Search seamlessly by **company name** (full-text or exact legal name), **20-character LEI code** (single or batch comma-separated), **8- or 11-character BIC/SWIFT code**, **ISO country code**, **entity status** (`ACTIVE` / `INACTIVE`), and **LEI registration lifecycle status** (`ISSUED`, `LAPSED`, `RETIRED`, `MERGED`).
- **Complete KYB & Compliance Record:** Every record normalizes the official legal name, alternative names, entity status, legal jurisdiction, ISO 20275 Entity Legal Form (ELF) code, GLEIF Registration Authority (RA) code, local business registry ID (e.g., Delaware file number or German HRB), structured + formatted legal and headquarters addresses, mapped SWIFT/BIC codes, OpenCorporates ID, S\&P Global IDs, initial registration date, last update date, and next renewal date.
- **Ready for Tables, CRMs & Pipelines:** Provides both nested structured address objects (`legalAddress`, `headquartersAddress`) and flat overview columns (`legalCountry`, `headquartersCity`, `primaryBic`, `legalAddressFormatted`) so CSV/Excel exports, Airtable, HubSpot, Salesforce, and SQL warehouses work cleanly out of the box.

***

### Supported Lookup Modes

| Lookup Method | Example Input | GLEIF API Filter Used | Best Use Cases |
| :--- | :--- | :--- | :--- |
| **Auto-Detect (`auto`)** | `query: "Cloudflare"` or `query: "5493007DY18BGNLDWU14"` | `filter[lei]` for 20-char LEIs, otherwise `filter[fulltext]` | General company search, KYB checks, AI agent tool calls |
| **Full-Text (`fulltext`)** | `query: "Stripe"`, `country: "US"` | `filter[fulltext]` | Broad search across legal names, aliases, LEIs, and BICs |
| **Legal Name (`legalName`)** | `query: "Deutsche Bank"`, `searchMode: "legalName"` | `filter[entity.legalName]` | High-precision matching strictly on official registered legal names |
| **Batch LEI Lookup (`lei`)** | `lei: "5493007DY18BGNLDWU14,7LTWFZYICNSX8D621K86"` | `filter[lei]` | Bulk KYB verification & renewal monitoring for known counterparties |
| **BIC / SWIFT Lookup (`bic`)** | `bic: "DEUTDEFFXXX"` or `bic: "DEUTDEFF"` | `filter[bic]` | Mapping bank SWIFT/BIC codes to legal entities for ISO 20022 & payments |
| **Country Registry Sweep** | `query: ""`, `country: "DE"`, `status: "ACTIVE"` | `filter[entity.legalAddress.country]` + `filter[entity.status]` | Regional B2B prospecting and jurisdiction-level compliance monitoring |

***

### Input Configuration

#### Example 1: Quick Company KYB Lookup (Default)

```json
{
  "query": "Cloudflare",
  "country": "",
  "status": "ACTIVE",
  "maxItems": 10
}
```

#### Example 2: Batch Counterparty LEI Verification

```json
{
  "query": "",
  "lei": "5493007DY18BGNLDWU14,7LTWFZYICNSX8D621K86,B4TYDEB6GKMZO031MB27",
  "status": "ALL",
  "maxItems": 10
}
```

#### Example 3: Bank SWIFT / BIC-to-LEI Resolution

```json
{
  "query": "",
  "bic": "DEUTDEFF,BOFAUS3NXXX",
  "status": "ACTIVE",
  "maxItems": 10
}
```

#### Input Parameters

| Field | Type | Default | Description |
| :--- | :--- | :--- | :--- |
| `query` | `string` | `"Cloudflare"` | Company name, keyword, 20-character LEI code, or 11-character BIC/SWIFT code. Leave empty when using `lei`, `bic`, or `country` alone. |
| `searchMode` | `string` | `"auto"` | One of `auto`, `fulltext`, `legalName`, `lei`, `bic`. |
| `country` | `string` | `""` | Optional ISO 3166-1 alpha-2 legal country code (e.g., `"US"`, `"GB"`, `"DE"`) or comma-separated list (`"US,GB"`). |
| `status` | `string` | `"ACTIVE"` | Official entity operating status: `"ACTIVE"`, `"INACTIVE"`, or `"ALL"`. |
| `maxItems` | `integer` | `10` | Maximum deduplicated GLEIF LEI records to extract (`1`–`1000`). |
| `lei` | `string` | `""` | Optional exact 20-character LEI code or comma-separated list of LEIs. |
| `bic` | `string` | `""` | Optional 8- or 11-character BIC/SWIFT code or comma-separated list (8-character codes are automatically padded with `XXX`). |
| `registrationStatus` | `string` | `"ALL"` | Optional LEI registration status filter (`ALL`, `ISSUED`, `LAPSED`, `RETIRED`, `MERGED`, `ANNULLED`, `DUPLICATE`). |

***

### Normalized Output Schema

Every run writes clean, strongly typed JSON records to the default Apify dataset, complete with an **Overview Table** view for instant inspection.

#### Example Output Record

```json
{
  "lei": "5493007DY18BGNLDWU14",
  "legalName": "CLOUDFLARE, INC.",
  "legalNameLanguage": "en",
  "otherNames": [],
  "entityStatus": "ACTIVE",
  "entityCategory": "GENERAL",
  "jurisdiction": "US-DE",
  "legalFormId": "XTIQ",
  "legalFormOther": "",
  "registrationAuthorityId": "RA000602",
  "registrationAuthorityEntityId": "4710875",
  "legalAddress": {
    "addressLines": [
      "C/O REGISTERED AGENT SOLUTIONS, INC.",
      "838 WALKER ROAD",
      "SUITE 21-2"
    ],
    "city": "DOVER",
    "region": "US-DE",
    "country": "US",
    "postalCode": "19904",
    "formatted": "C/O REGISTERED AGENT SOLUTIONS, INC., 838 WALKER ROAD, SUITE 21-2, DOVER, US-DE, 19904, US"
  },
  "legalCountry": "US",
  "legalCity": "DOVER",
  "legalAddressFormatted": "C/O REGISTERED AGENT SOLUTIONS, INC., 838 WALKER ROAD, SUITE 21-2, DOVER, US-DE, 19904, US",
  "headquartersAddress": {
    "addressLines": ["101 Townsend Street"],
    "city": "San Francisco",
    "region": "US-CA",
    "country": "US",
    "postalCode": "94107",
    "formatted": "101 Townsend Street, San Francisco, US-CA, 94107, US"
  },
  "headquartersCountry": "US",
  "headquartersCity": "San Francisco",
  "headquartersAddressFormatted": "101 Townsend Street, San Francisco, US-CA, 94107, US",
  "bicCodes": [],
  "primaryBic": "",
  "micCodes": [],
  "ocid": "us_de/4710875",
  "spGlobalIds": ["81851700"],
  "registrationStatus": "ISSUED",
  "conformityFlag": "CONFORMING",
  "corroborationLevel": "FULLY_CORROBORATED",
  "managingLou": "5493001KJTIIGC8Y1R12",
  "entityCreationDate": "2009-07-17T00:00:00Z",
  "initialRegistrationDate": "2020-05-06T14:29:00Z",
  "lastUpdateDate": "2026-10-28T13:52:47Z",
  "nextRenewalDate": "2027-11-08T16:47:24Z",
  "successorLei": "",
  "gleifUrl": "https://search.gleif.org/#/record/5493007DY18BGNLDWU14",
  "apiRecordUrl": "https://api.gleif.org/api/v1/lei-records/5493007DY18BGNLDWU14",
  "sourceApiUrl": "https://api.gleif.org/api/v1/lei-records?filter%5Bentity.status%5D=ACTIVE&filter%5Bfulltext%5D=Cloudflare&page%5Bnumber%5D=1&page%5Bsize%5D=10"
}
```

***

### Pricing & Pay-Per-Event (PPE) Billing

This Actor uses transparent **Pay-Per-Event** billing on event **`lei-record`** (one official GLEIF LEI corporate record returned).

- You are charged **only for deduplicated LEI records actually stored** in your dataset.
- Idempotency keys (`lei-<LEI_CODE>`) guarantee you are never double-charged for the same entity within a run.
- Maximum spending limits set on your Apify run are strictly honored—the Actor stops cleanly as soon as the event charge cap is reached.

***

### Integration Examples

#### Python (`apify-client`)

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("YOUR_USERNAME/gleif-lei-company-registry").call(
    run_input={
        "query": "Cloudflare",
        "status": "ACTIVE",
        "maxItems": 10,
    }
)
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["lei"], item["legalName"], item["jurisdiction"], item["nextRenewalDate"])
```

#### AI Agents, MCP & Automation (n8n / Make / Zapier)

Connect this Actor directly to **n8n**, **Make**, **Zapier**, or **Apify MCP** to automate real-time merchant KYB checks, enrich inbound B2B CRM leads with verified legal headquarters and registration authority IDs, and alert compliance teams ahead of upcoming `nextRenewalDate` expirations or `LAPSED` LEI statuses.

***

### Data Source & Compliance

All corporate registry data is retrieved in real time from the official **Global Legal Entity Identifier Foundation (GLEIF) API v1** (`https://api.gleif.org/api/v1/lei-records`). GLEIF publishes the Global LEI Index as open data under the **CC0 1.0 Universal Public Domain Dedication** with no licensing fees or third-party scraping required.

# Actor input Schema

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

Company name, keyword, 20-character LEI code, or 11-character BIC/SWIFT code (e.g., "Cloudflare", "Deutsche Bank", "5493007DY18BGNLDWU14", "DEUTDEFFXXX"). Leave empty when filtering strictly by lei, bic, or country.

## `searchMode` (type: `string`):

Controls how the query field is matched against the GLEIF API. "auto" automatically routes 20-character LEI codes to filter\[lei] and all other queries to filter\[fulltext] (which matches legal names, aliases, LEIs, and 11-char BICs).

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

Optional 2-letter ISO 3166-1 alpha-2 legal address country filter (e.g., "US", "GB", "DE", "SG") or comma-separated list ("US,GB"). Leave empty for all countries worldwide.

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

Filter by official GLEIF legal entity status (ACTIVE, INACTIVE, or ALL).

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

Maximum number of GLEIF LEI records to extract (1 to 1000).

## `lei` (type: `string`):

Optional single 20-character LEI code or comma-separated list of LEIs for direct KYB verification (e.g., "5493007DY18BGNLDWU14,7LTWFZYICNSX8D621K86").

## `bic` (type: `string`):

Optional BIC/SWIFT code or comma-separated list (e.g., "DEUTDEFFXXX" or "DEUTDEFF"). 8-character primary-office BICs are automatically normalized to 11-character format (+XXX).

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

Optional filter on the LEI registration lifecycle status (ISSUED = active and renewed, LAPSED = past renewal date, RETIRED = entity ceased, MERGED = merged into successor).

## Actor input object example

```json
{
  "query": "Cloudflare",
  "searchMode": "auto",
  "country": "",
  "status": "ACTIVE",
  "maxItems": 10,
  "lei": "",
  "bic": "",
  "registrationStatus": "ALL"
}
```

# Actor output Schema

## `overview` (type: `string`):

Structured overview table of matched GLEIF corporate legal entities.

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

All extracted GLEIF LEI records in 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": "Cloudflare",
    "searchMode": "auto",
    "country": "",
    "status": "ACTIVE",
    "maxItems": 10,
    "registrationStatus": "ALL"
};

// Run the Actor and wait for it to finish
const run = await client.actor("regenerative_cornice/gleif-lei-company-registry").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": "Cloudflare",
    "searchMode": "auto",
    "country": "",
    "status": "ACTIVE",
    "maxItems": 10,
    "registrationStatus": "ALL",
}

# Run the Actor and wait for it to finish
run = client.actor("regenerative_cornice/gleif-lei-company-registry").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": "Cloudflare",
  "searchMode": "auto",
  "country": "",
  "status": "ACTIVE",
  "maxItems": 10,
  "registrationStatus": "ALL"
}' |
apify call regenerative_cornice/gleif-lei-company-registry --silent --output-dataset

```

## MCP server setup

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

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/iaomHhP1ekZfaOfMC/builds/1p7DklMgTamTapbJQ/openapi.json
