Guide · LEI / GLEIF

LEI lookup API (GLEIF) — resolve and search Legal Entity Identifiers

Look up a known 20-character LEI, or resolve a company name to candidate LEIs, from the GLEIF Global LEI Index — one REST endpoint, one Bearer key. Copy-paste Python and JavaScript below.

Updated 13 October 2026

What is an LEI?

A Legal Entity Identifier (LEI) is a 20-character alphanumeric code that uniquely and permanently identifies a legally distinct entity — a company, fund, or other organisation — that participates in financial transactions. It is the answer to a deceptively hard question: "which Acme Ltd, in which country, is on the other side of this trade?" Company names collide across jurisdictions; national tax numbers don't interoperate; the LEI is the single global key that does.

The standard is ISO 17442. LEIs are issued by accredited Local Operating Units (LOUs) and consolidated by the Global Legal Entity Identifier Foundation (GLEIF), a not-for-profit established by the Financial Stability Board after the 2008 crisis, when regulators found they could not reliably aggregate a single counterparty's exposure across markets. The full, free reference dataset is the GLEIF Global LEI Index.

Anatomy of a 20-character LEI

Per ISO 17442, the code is fixed-length and structured:

  • Characters 1–4 — the LOU prefix, identifying the issuer that assigned the LEI.
  • Characters 5–6 — reserved, always 00.
  • Characters 7–18 — the entity-specific portion, unique to the registrant.
  • Characters 19–20 — two check digits (ISO 7064, MOD 97-10) that let you validate the code offline before spending a network call.

Example: 5493001KJTIIGC8Y1R12 (BlackRock, Inc.). The prefix 5493 identifies the issuing LOU; the trailing 12 is the checksum.

Endpoint 1 — resolve a known LEI

GET /lei/{lei} takes a 20-character code and returns the entity's registered profile from the GLEIF register:

curl -s \
  -H "Authorization: Bearer $PROMETIAM_API_KEY" \
  https://api.prometiam.com/functions/v1/risk-api/lei/5493001KJTIIGC8Y1R12
{
  "data": {
    "lei": "5493001KJTIIGC8Y1R12",
    "legal_name": "BlackRock, Inc.",
    "jurisdiction": "US-DE",
    "legal_form": "XTIQ",
    "registration_status": "ISSUED",
    "entity_status": "ACTIVE",
    "headquarters": {
      "address": "50 Hudson Yards",
      "city": "New York",
      "region": "US-NY",
      "postal_code": "10001",
      "country": "US"
    },
    "next_renewal_date": "2026-11-20",
    "managing_lou": "EVK05KS7XY1DEII3R011"
  }
}

The registration_status and next_renewal_date tell you whether the LEI is current — an LEI that has lapsed past its annual renewal shows LAPSED, which is a meaningful KYB signal.

Endpoint 2 — search a name to candidate LEIs

When you don't already hold the code, GET /lei/search?name= resolves a legal-entity name to ranked candidates. Because names are not globally unique, this returns a list — you pick the right one by jurisdiction and address.

curl -s \
  -H "Authorization: Bearer $PROMETIAM_API_KEY" \
  "https://api.prometiam.com/functions/v1/risk-api/lei/search?name=Telefonica"
{
  "data": [
    {
      "lei": "5493003MU7O5DKF4EU48",
      "legal_name": "TELEFONICA, S.A.",
      "jurisdiction": "ES",
      "registration_status": "ISSUED",
      "score": 0.98
    },
    {
      "lei": "959800...",
      "legal_name": "TELEFONICA DEUTSCHLAND HOLDING AG",
      "jurisdiction": "DE",
      "registration_status": "ISSUED",
      "score": 0.71
    }
  ]
}
Customer dashboard screenshot: an LEI search in the ConsoleCustomer dashboard screenshot: an LEI search in the Console
GET /lei/search in the dashboard's Console: type a name, read the candidate LEIs with their match score (1 credit). Open it in the dashboard

Full working script (Python)

Search by name, then confirm the exact entity by resolving each candidate LEI:

# lei_lookup.py — resolve a name to an LEI, then pull the full GLEIF profile
import os, requests

API = 'https://api.prometiam.com/functions/v1/risk-api'
HEAD = {'Authorization': f'Bearer {os.environ["PROMETIAM_API_KEY"]}'}

def search_lei(name: str) -> list:
    r = requests.get(f'{API}/lei/search', params={'name': name}, headers=HEAD)
    r.raise_for_status()
    return r.json().get('data', [])

def resolve_lei(lei: str) -> dict:
    r = requests.get(f'{API}/lei/{lei}', headers=HEAD)
    r.raise_for_status()
    return r.json().get('data')

def find(name: str, jurisdiction: str | None = None) -> dict | None:
    for cand in search_lei(name):
        if jurisdiction and cand.get('jurisdiction', '').split('-')[0] != jurisdiction:
            continue
        return resolve_lei(cand['lei'])   # full profile for the best match
    return None

if __name__ == '__main__':
    import sys, json
    company = sys.argv[1]
    country = sys.argv[2] if len(sys.argv) > 2 else None
    print(json.dumps(find(company, country), indent=2, ensure_ascii=False))

Run with python lei_lookup.py "Telefonica" ES after exporting PROMETIAM_API_KEY=rk_live_….

Same thing in JavaScript

// lei-lookup.mjs — Node 18+ (global fetch)
const API = 'https://api.prometiam.com/functions/v1/risk-api'
const HEAD = { Authorization: `Bearer ${process.env.PROMETIAM_API_KEY}` }

async function resolveLei(lei) {
  const r = await fetch(`${API}/lei/${lei}`, { headers: HEAD })
  if (!r.ok) throw new Error(`LEI ${lei}: ${r.status}`)
  return (await r.json()).data
}

async function searchLei(name) {
  const url = new URL(`${API}/lei/search`)
  url.searchParams.set('name', name)
  const r = await fetch(url, { headers: HEAD })
  return (await r.json()).data ?? []
}

const [top] = await searchLei('BlackRock')
console.log(top ? await resolveLei(top.lei) : 'no match')

When KYB and regulatory reporting need an LEI

The LEI is mandatory — not optional — under several regimes. If you build onboarding or trade-reporting flows, you will meet these:

  • EMIR — both counterparties to a derivatives trade must be identified by LEI in reports to trade repositories.
  • MiFID II / MiFIR — the "no LEI, no trade" rule: an investment firm cannot execute a reportable transaction for a client that lacks an LEI.
  • SFTR — securities-financing transaction reporting identifies parties by LEI.
  • Dodd-Frank (US CFTC) — swap reporting uses the LEI as the counterparty identifier.
  • KYB / correspondent banking — even where not legally required, recording the LEI gives you a durable, cross-border key that survives renames and outlives national registry IDs, and lets you join a counterparty to sanctions and ownership data.

A common pattern: resolve the counterparty in the national registry first (for Spain, see verify by NIF), then attach the LEI from GLEIF as the interoperable identifier your downstream reporting systems expect.

Common pitfalls

  • Names are not unique. /lei/search returns multiple candidates by design. Always disambiguate on jurisdiction and headquarters address before you trust a result.
  • Lapsed LEIs. An LEI must be renewed annually. registration_status: "LAPSED" means the reference data is no longer being maintained — treat it as stale, not invalid.
  • Validate the checksum offline. The last two characters are ISO 7064 MOD 97-10 check digits. Reject malformed 20-char strings locally before spending an API call.
  • LEI ≠ national ID. An LEI does not replace a Spanish NIF, French SIREN, or UK company number — it complements them. Use the national ID inside a country, the LEI across borders.
  • Rate limits. Free trial is 500 credits over 14 days, Starter 1,000 credits/month. Cache resolved LEI profiles for 24 hours since GLEIF reference data changes slowly.

FAQ

What is an LEI?
A 20-character ISO 17442 code that uniquely identifies a legal entity in financial transactions, issued by an accredited LOU and published in the GLEIF Global LEI Index.

How do I resolve an LEI to a company name?
Call GET /lei/{lei} with the 20-character code; you get back the legal name, jurisdiction, status, and address.

Can I find an LEI from just a name?
Yes — GET /lei/search?name= returns ranked candidates. Disambiguate on jurisdiction and address.

How current is the LEI data?
Prometiam refreshes against the public GLEIF Global LEI Index.

Is the LEI free?
The GLEIF reference data is public and free to query. Obtaining a new LEI for your own entity is a paid service from an LOU, but looking one up is not.

Related

Frequently asked questions

What is an LEI (Legal Entity Identifier)?
An LEI is a 20-character alphanumeric code defined by ISO 17442 that uniquely and permanently identifies a legally distinct entity participating in financial transactions. It is issued by an accredited Local Operating Unit and published in the GLEIF Global LEI Index.
How do I resolve an LEI to a company name?
Call GET /lei/{lei} with the 20-character code. Prometiam returns the registered legal name, jurisdiction, registration status, and headquarters address from the GLEIF register.
Can I find an LEI from a company name?
Yes. GET /lei/search?name= returns candidate LEIs ranked by name match. Because names are not globally unique, review the jurisdiction and address of each candidate before selecting one.
Who needs an LEI?
Any legal entity that trades in regulated financial markets. Regulations such as EMIR, MiFID II/MiFIR, Dodd-Frank, and SFTR require an LEI for transaction and trade reporting. Many KYB workflows also record the LEI as a durable cross-border identifier.