# GLEIF LEI Batch Validator - Official API Lookup (`rtworule/gleif-lei-batch-validator`) Actor

Validate LEI codes and company-name searches against the official GLEIF API for KYB, DORA register, and counterparty data-quality workflows.

- **URL**: https://apify.com/rtworule/gleif-lei-batch-validator.md
- **Developed by:** [Kunteper Koyu](https://apify.com/rtworule) (community)
- **Categories:** Business, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$1.00 / 1,000 lei records

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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js/docs.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/integrations/mcp.md).

If your project is in a different language, use 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 Batch Validator - Official API Lookup

Validate Legal Entity Identifiers (LEIs) and company-name searches against the official Global Legal Entity Identifier Foundation (GLEIF) API. The Actor returns structured validation rows for KYB onboarding, vendor due diligence, counterparty master-data cleanup, DORA third-party register checks, and finance workflow automation.

This Actor is intentionally narrow. It does not scrape private sources, does not require cookies or accounts, and does not claim to make a legal compliance decision for you. It turns public GLEIF records into clean Apify Dataset rows with the fields teams usually need before routing a counterparty to approve, review, or manual remediation.

Legal basis: the upstream source is the official public GLEIF API for LEI reference data. That makes the data source suitable for public-record lookup automation, but it does not make any downstream use legally approved. Users remain responsible for their own compliance basis, retention rules, audit process, and decisions made from the data.

### What it does

- Looks up exact LEI codes through the official GLEIF API.
- Searches company names through GLEIF full-text search.
- Validates LEI format and MOD 97-10 checksum.
- Reports whether a record exists in GLEIF.
- Reports entity status, registration status, renewal date, legal name, country, legal form, managing LOU, BIC codes, and ISIN codes when present.
- Emits deterministic dataset rows that can be exported to JSON, CSV, Excel, Google Sheets, Make, Zapier, n8n, or an internal onboarding queue.

### Quick start

The default input validates one public LEI:

```json
{
  "queries": ["5493001KJTIIGC8Y1R12"],
  "maxResultsPerQuery": 3,
  "maxRecordsTotal": 100,
  "onlyActive": false,
  "timeoutSeconds": 30
}
````

That first run succeeds without credentials and produces at least one validation row when the GLEIF API is available.

### Use cases

- Validate a CSV column of LEIs before client onboarding.
- Check whether counterparties have active entities and issued LEI registrations.
- Add legal names and countries to a vendor or customer master-data table.
- Build DORA or third-party register checks that include LEI validation output.
- Enrich company-name searches with candidate LEI records before a human chooses the correct entity.
- Feed recurring KYB refresh workflows where expired renewals or inactive entities need follow-up.

### Input

`queries` accepts LEI codes or company names. LEI-shaped values use exact lookup and return at most one record. Company names use GLEIF full-text search and return up to `maxResultsPerQuery` candidate records.

`maxResultsPerQuery` controls name-search breadth from 1 to 10.

`maxRecordsTotal` caps one run's total dataset rows and PPE events. Use it to bound spend when a batch contains many company-name searches.

`onlyActive` asks GLEIF to return active entities with issued registrations for name searches. Exact LEI lookups still return the public record as-is so you can see why it failed a validation check.

`timeoutSeconds` bounds each official API request.

### Example output

Each dataset item includes:

```json
{
  "query": "5493001KJTIIGC8Y1R12",
  "queryType": "lei",
  "matchRank": 1,
  "lei": "5493001KJTIIGC8Y1R12",
  "legalName": "Example Legal Entity",
  "entityStatus": "ACTIVE",
  "registrationStatus": "ISSUED",
  "country": "US",
  "headquartersCountry": "US",
  "category": "GENERAL",
  "legalFormId": "8888",
  "initialRegistrationDate": "2014-01-01T00:00:00.000Z",
  "lastUpdateDate": "2026-01-01T00:00:00.000Z",
  "nextRenewalDate": "2027-01-01T00:00:00.000Z",
  "managingLou": "EVK05KS7XY1DEII3R011",
  "bicCodes": [],
  "isinCodes": [],
  "validation": {
    "formatValid": true,
    "checksumValid": true,
    "existsInGleif": true,
    "activeEntity": true,
    "issuedRegistration": true,
    "renewalCurrent": true
  },
  "sourceUrl": "https://api.gleif.org/api/v1/lei-records/5493001KJTIIGC8Y1R12",
  "fetchedAt": "2026-07-16T00:00:00.000Z"
}
```

For an LEI-shaped value that does not exist in GLEIF, the Actor emits one factual non-match row with `existsInGleif: false`. For company-name searches with no matches, it emits no rows because there is no official record to attach to that name.

### Pricing

This Actor uses pay per event pricing. The primary event is **LEI record**. One dataset row equals one charged LEI record event. Exact LEI lookups therefore cost one event when a row is emitted. Company-name searches cost one event per returned candidate record.

Example: 1,000 exact LEI records cost $1.00 at `$0.001` per LEI record before any Apify platform minimums or account-level limits.

### API example

```bash
curl "https://api.apify.com/v2/acts/rtworule~gleif-lei-batch-validator/runs?token=$APIFY_TOKEN" \
  -H "content-type: application/json" \
  -d '{
    "queries": ["5493001KJTIIGC8Y1R12", "Apple Inc"],
    "maxResultsPerQuery": 2,
    "onlyActive": true
  }'
```

### Integrations

- Apify Scheduler for recurring KYB refreshes.
- Webhooks for alerting when a validation batch finishes.
- Google Sheets, Make, Zapier, and n8n through Apify integrations.
- Data warehouses and internal onboarding systems through the Apify Dataset API.
- Portfolio pairing: use Bulk Website Tech Stack Detector for public website enrichment, Public ATS Job Feed Normalizer for hiring signals, and Bulk URL Health Auditor to verify source URLs.

### Limitations

- GLEIF data is public reference data, not a legal opinion or compliance approval.
- Name searches can return multiple legal entities. Use `matchRank`, `country`, and legal name fields before deciding which entity is correct.
- Parent ownership and relationship expansion are not included in this first version.
- GLEIF API availability and response schemas are upstream dependencies.
- Renewal status is calculated from the returned next renewal date at run time.

### FAQ

#### Is this an official GLEIF product?

No. It is an Apify Actor that uses the official public GLEIF API and links each returned row back to the source record.

#### Can I upload company names instead of LEI codes?

Yes. Company-name searches use GLEIF full-text search and can return multiple candidate records. Use the country, legal name, and match rank before choosing the correct entity.

#### Does the Actor decide whether a counterparty is safe?

No. It returns factual validation fields. Your compliance, onboarding, or risk team decides what those fields mean for your workflow.

#### Why does an invalid LEI still produce a row?

If the input is LEI-shaped, the Actor emits a non-match row so batch jobs can preserve row-level traceability and explain why that identifier failed.

### Responsible use

Use this Actor for public legal-entity reference data, KYB data-quality checks, and workflow automation against the official public GLEIF API. Do not treat the output as legal advice, sanctions clearance, credit approval, identity verification, or permission to transact. Keep private customer files and regulated personal data out of support messages and logs. When using the output in compliance workflows, preserve the GLEIF source URL and fetched timestamp so reviewers can reproduce the result.

### More tools

Related Actors in this portfolio:

- Bulk URL Health Auditor checks public URL status and redirects.
- Bulk Website Tech Stack Detector enriches public websites with technology signals.
- Public ATS Job Feed Normalizer normalizes public job-board feeds.
- Public RSS, Atom & JSON Feed Normalizer turns public feeds into consistent rows.
- NWS Weather Alert Change Monitor emits official weather-alert lifecycle changes.

### Support

Open an issue or contact the Actor maintainer through the Apify Store listing with the run ID, input, and the LEI or company name that behaved unexpectedly. Do not send private customer records, secrets, or regulated personal data in support messages.

# Actor input Schema

## `queries` (type: `array`):

Enter LEI codes or company names. The default uses a known public LEI and succeeds without credentials.

## `maxResultsPerQuery` (type: `integer`):

For company-name searches, return up to this many GLEIF matches. LEI-code lookups return at most one row.

## `maxRecordsTotal` (type: `integer`):

Hard cap on total dataset rows and PPE events emitted by one run.

## `onlyActive` (type: `boolean`):

For company-name searches, ask GLEIF for active entities with issued registrations only.

## `timeoutSeconds` (type: `integer`):

Maximum seconds for each GLEIF API request.

## Actor input object example

```json
{
  "queries": [
    "5493001KJTIIGC8Y1R12"
  ],
  "maxResultsPerQuery": 3,
  "maxRecordsTotal": 100,
  "onlyActive": false,
  "timeoutSeconds": 30
}
```

# Actor output Schema

## `dataset` (type: `string`):

No description

# 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 = {};

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

# Run the Actor and wait for it to finish
run = client.actor("rtworule/gleif-lei-batch-validator").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call rtworule/gleif-lei-batch-validator --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=rtworule/gleif-lei-batch-validator",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "GLEIF LEI Batch Validator - Official API Lookup",
        "description": "Validate LEI codes and company-name searches against the official GLEIF API for KYB, DORA register, and counterparty data-quality workflows.",
        "version": "0.1",
        "x-build-id": "6fzaOzuDjaZUhY07a"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/rtworule~gleif-lei-batch-validator/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-rtworule-gleif-lei-batch-validator",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/rtworule~gleif-lei-batch-validator/runs": {
            "post": {
                "operationId": "runs-sync-rtworule-gleif-lei-batch-validator",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/rtworule~gleif-lei-batch-validator/run-sync": {
            "post": {
                "operationId": "run-sync-rtworule-gleif-lei-batch-validator",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "queries": {
                        "title": "LEI codes or company names",
                        "type": "array",
                        "description": "Enter LEI codes or company names. The default uses a known public LEI and succeeds without credentials.",
                        "default": [
                            "5493001KJTIIGC8Y1R12"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxResultsPerQuery": {
                        "title": "Maximum matches per name",
                        "minimum": 1,
                        "maximum": 10,
                        "type": "integer",
                        "description": "For company-name searches, return up to this many GLEIF matches. LEI-code lookups return at most one row.",
                        "default": 3
                    },
                    "maxRecordsTotal": {
                        "title": "Maximum charged records",
                        "minimum": 1,
                        "maximum": 1000,
                        "type": "integer",
                        "description": "Hard cap on total dataset rows and PPE events emitted by one run.",
                        "default": 100
                    },
                    "onlyActive": {
                        "title": "Only active issued records",
                        "type": "boolean",
                        "description": "For company-name searches, ask GLEIF for active entities with issued registrations only.",
                        "default": false
                    },
                    "timeoutSeconds": {
                        "title": "Request timeout",
                        "minimum": 2,
                        "maximum": 120,
                        "type": "integer",
                        "description": "Maximum seconds for each GLEIF API request.",
                        "default": 30
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
