# 🏦 GLEIF LEI Scraper — Global Company Registry Data (`hipersoft/gleif-lei-scraper`) Actor

Search the global Legal Entity Identifier (LEI) registry and export one clean row per company: LEI, legal name, legal and headquarters address, jurisdiction, legal form, status, registration dates and BIC. Filter by name, country, status or LEI, then download as JSON, CSV or Excel.

- **URL**: https://apify.com/hipersoft/gleif-lei-scraper.md
- **Developed by:** [hiper soft](https://apify.com/hipersoft) (community)
- **Categories:**
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.0015 / entity scraped

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 Scraper — Global Company Registry Data

Search the global **Legal Entity Identifier (LEI)** registry and export clean, structured company reference data. Look up any legal entity by **name**, **country**, **status** or exact **LEI code**, and get one tidy row per company: LEI, legal name, legal and headquarters address, jurisdiction, legal form, status, registration dates and BIC. Download everything as **JSON, CSV or Excel**, or pull it straight from the API.

The LEI is the worldwide standard identifier for companies, funds and other legal entities — the same code used across banking, payments, KYC and regulatory reporting. This scraper turns that public reference data into a spreadsheet in seconds.

Great for KYC and onboarding, counterparty and supplier due diligence, entity resolution, data enrichment, sanctions and compliance workflows, market research, and building or refreshing a company master-data set.

### What it does

- 🔍 **Search by name** — find entities whose legal name contains your term (e.g. `BMW`, `Volkswagen`, `Nestle`).
- 🌍 **Filter by country** — limit results to a country by its ISO two-letter code (e.g. `DE`, `US`, `GB`, `SG`).
- 📊 **Filter by status** — collect only Active or Inactive entities.
- 🔤 **Full-text search** — cast a wider net across indexed fields.
- 🧾 **Registration number lookup** — match entities by their business-registry number.
- 🆔 **Direct LEI lookup** — paste one or more exact 20-character LEI codes to fetch them straight away.
- 🏢 **Rich entity fields** — legal name, other names, legal and headquarters address, jurisdiction, legal form, category, status, registration dates, managing organisation and BIC.
- 📤 **Clean, flat output** — ready for spreadsheets, databases, CRMs and dashboards.

### Input

| Field | Description |
| --- | --- |
| **Legal name** | Name to search for (matches names that contain this text). |
| **Full-text search** | Optional broader free-text search. |
| **Country (ISO 2-letter)** | Optional country filter, e.g. `DE`, `US`, `GB`, `SG`. |
| **Entity status** | Optional: Any, Active or Inactive. |
| **Registration number** | Optional business-registry registration number. |
| **LEI codes** | Optional list of exact 20-character LEI codes for direct lookup. |
| **Max items** | Maximum number of entities to collect (0 = no limit). |

#### Example input

```json
{
  "legalName": "BMW",
  "country": "DE",
  "status": "ACTIVE",
  "maxItems": 200
}
```

Look up specific entities by code:

```json
{
  "leis": ["2138005CD4S1SP96MD71", "213800WAVVOPS85N2205"]
}
```

### Output

One clean row per legal entity. Example:

```json
{
  "lei": "2138005CD4S1SP96MD71",
  "legalName": "BMW ASSOCIATES",
  "otherNames": [],
  "country": "GB",
  "city": "GRANBOROUGH",
  "legalAddress": {
    "addressLines": ["6 CHURCH LANE"],
    "city": "GRANBOROUGH",
    "region": "GB-BKM",
    "country": "GB",
    "postalCode": "MK18 3NN"
  },
  "headquartersAddress": {
    "addressLines": ["6 CHURCH LANE"],
    "city": "GRANBOROUGH",
    "region": "GB-BKM",
    "country": "GB",
    "postalCode": "MK18 3NN"
  },
  "registeredAs": null,
  "jurisdiction": "GB",
  "entityCategory": "GENERAL",
  "legalFormCode": "8888",
  "entityStatus": "ACTIVE",
  "entityCreationDate": null,
  "registrationInitialDate": "2017-12-18T00:00:00Z",
  "registrationLastUpdate": "2019-04-09T13:11:57Z",
  "registrationStatus": "LAPSED",
  "nextRenewalDate": "2018-12-18T00:00:00Z",
  "managingLou": "213800WAVVOPS85N2205",
  "bic": [],
  "recordUrl": "https://search.gleif.org/#/record/2138005CD4S1SP96MD71",
  "url": "https://..."
}
```

| Field | Description |
| --- | --- |
| `lei` | 20-character Legal Entity Identifier. |
| `legalName` | Official legal name of the entity. |
| `otherNames` | Any alternative / previous names. |
| `country`, `city` | Country and city of the legal address (quick-filter fields). |
| `legalAddress` | Legal address: address lines, city, region, country, postal code. |
| `headquartersAddress` | Headquarters address in the same shape. |
| `registeredAs` | Business-registry registration number. |
| `jurisdiction` | Legal jurisdiction of the entity. |
| `entityCategory` | Entity category (e.g. General, Fund, Branch). |
| `legalFormCode` | Legal form / entity legal form code. |
| `entityStatus` | Entity status (Active / Inactive). |
| `registrationInitialDate` | First registration date of the LEI. |
| `registrationLastUpdate` | Last update date of the record. |
| `registrationStatus` | Registration status (e.g. Issued, Lapsed). |
| `nextRenewalDate` | Next scheduled renewal date. |
| `managingLou` | LEI of the organisation that manages the record. |
| `bic` | Associated BIC (bank identifier) codes, when available. |
| `recordUrl` | Link to the entity's public record page. |

### Tips

- Combine **Legal name** with **Country** and **Status** to zero in on a specific entity fast.
- For bulk enrichment, feed a list of **LEI codes** and get all their details back in one run.
- Increase **Max items** to build a broad country- or sector-level dataset; leave the name empty for the widest results.

### FAQ

**What is an LEI?** A Legal Entity Identifier is a 20-character code that uniquely identifies a legal entity worldwide. It is used across financial and regulatory systems to know exactly *who is who*.

**Is this public data?** Yes — it is open company and legal-entity reference data. This scraper does not collect personal profiles.

**What formats can I export?** JSON, CSV, Excel, HTML table, or via the API — the usual Apify dataset options.

# Actor input Schema

## `legalName` (type: `string`):

Company / legal-entity name to search for (matches names that contain this text, e.g. "BMW", "Volkswagen", "Nestle"). Combine with Country or Status to narrow results.

## `fulltext` (type: `string`):

Optional. Free-text search across name and other indexed fields. Use this for a broader match than Legal name.

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

Optional. Limit results to a country by its ISO 3166 two-letter code (e.g. DE, US, GB, SG, FR).

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

Optional. Only collect entities with this status.

## `registeredAs` (type: `string`):

Optional. Look up entities by their business-registry registration number (e.g. a commercial-register number).

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

Optional. One or more exact 20-character LEI codes to look up directly. When set, these are fetched instead of running a search.

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

Maximum number of entities to collect (0 = no limit; collect everything the search returns).

## Actor input object example

```json
{
  "legalName": "BMW",
  "status": "ANY",
  "maxItems": 200
}
```

# Actor output Schema

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

The results as dataset items.

# 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 = {
    "legalName": "BMW"
};

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

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

```

## MCP server setup

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

```

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/gh8qHEQr1s9L3B3aF/builds/TZuwvStW9jcdge4S9/openapi.json
