API reference
LEI lookup
POST /lei checks an LEI's ISO 17442 check digits and reads its GLEIF record: legal name, status, legal form, addresses and parents, or searches by name.
https://api.qelka.com/v1/leiLook up a Legal Entity Identifier (LEI), the 20-character code of a legal entity in financial transactions, or find one from a company's legal name: you get the entity's legal name, status, legal form, addresses and parent companies from GLEIF, the Global Legal Entity Identifier Foundation. Each lookup costs 1 credit, found or not; errors and test keys are never billed.
Request
Send either lei or name, never both.
leistringnamestringfreshbooleanDefault falsetrue skips the 7-day result cache and asks GLEIF again.A body with both lei and name, or with neither, is a 400 invalid_request. The call waits for the GLEIF API, so every snippet sets a 30-second client timeout.
curl https://api.qelka.com/v1/lei \
--max-time 30 \
-H "Authorization: Bearer $QELKA_API_KEY" \
-H "Content-Type: application/json" \
-d '{"lei": "5493001KJTIIGC8Y1R12"}'
const response = await fetch('https://api.qelka.com/v1/lei', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.QELKA_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({ lei: '5493001KJTIIGC8Y1R12' }),
signal: AbortSignal.timeout(30_000),
})
const result = await response.json()
console.log(result)
import os
import requests
api_key = os.environ["QELKA_API_KEY"]
response = requests.post(
"https://api.qelka.com/v1/lei",
headers={"Authorization": f"Bearer {api_key}"},
json={"lei": "5493001KJTIIGC8Y1R12"},
timeout=30,
)
result = response.json()
print(result)
<?php
$ch = curl_init('https://api.qelka.com/v1/lei');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('QELKA_API_KEY'),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode(['lei' => '5493001KJTIIGC8Y1R12']),
CURLOPT_TIMEOUT => 30,
]);
$result = json_decode(curl_exec($ch), true);
print_r($result);
package main
import (
"bytes"
"encoding/json"
"fmt"
"net/http"
"os"
"time"
)
func main() {
payload, _ := json.Marshal(map[string]any{"lei": "5493001KJTIIGC8Y1R12"})
request, _ := http.NewRequest(http.MethodPost, "https://api.qelka.com/v1/lei", bytes.NewReader(payload))
request.Header.Set("Authorization", "Bearer "+os.Getenv("QELKA_API_KEY"))
request.Header.Set("Content-Type", "application/json")
client := &http.Client{Timeout: 30 * time.Second}
response, err := client.Do(request)
if err != nil {
panic(err)
}
defer response.Body.Close()
var result map[string]any
if err := json.NewDecoder(response.Body).Decode(&result); err != nil {
panic(err)
}
fmt.Println(result)
}
require 'json'
require 'net/http'
uri = URI('https://api.qelka.com/v1/lei')
request = Net::HTTP::Post.new(uri)
request['Authorization'] = "Bearer #{ENV.fetch('QELKA_API_KEY')}"
request['Content-Type'] = 'application/json'
request.body = JSON.generate({ lei: '5493001KJTIIGC8Y1R12' })
response = Net::HTTP.start(uri.host, uri.port, use_ssl: true, read_timeout: 30) do |http|
http.request(request)
end
result = JSON.parse(response.body)
puts result
Response
Every lookup gets a 200, found or not. Read status first: found, not_found or invalid.
idstringlkp_ followed by 26 characters.objectstringlei.inputstringlei or name you sent, without surrounding spaces.querystringlei or name: how the lookup was made.validboolean or nulltrue when the LEI has correct ISO 17442 check digits, false when it does not. For a name search, true when a record is found, else null.statusstringfound, not_found or invalid.reasonstring or nullinvalid_format, invalid_checksum, not_in_gleif or no_match. null when one is found.leistring or nulllegal_namestring or nullentity_statusstring or nullactive or inactive, as the entity reports it.registration_statusstring or nullissued, lapsed, retired, merged, annulled, duplicate, pending_transfer or pending_archival.jurisdictionstring or nullFR) or an ISO 3166-2 subdivision (US-DE).categorystring or nullgeneral, branch, fund, sole_proprietor, resident_government_entity or international_organization.legal_formobject or nulllegal_form.codestring or nullT91T. null, 8888 or 9999 when the form has no ELF code.legal_form.namestring or nullregistered_asstring or nulllegal_addressobject or nulllegal_address.linesarray of stringslegal_address.citystring or nulllegal_address.regionstring or nullUS-DE.legal_address.postal_codestring or nulllegal_address.countrystring or nullheadquarters_addressobject or nulllegal_address.registrationobject or nullregistration.initial_datestring or nullregistration.last_updatestring or nullregistration.next_renewalstring or nullregistration.managing_loustring or nulldirect_parentobject or nullnull when none is reported.direct_parent.leistringdirect_parent.legal_namestring or nullultimate_parentobject or nulldirect_parent. null when none is reported.matchesarray of objects or nullnull for a lookup by LEI.matches.leistringmatches.legal_namestring or nullcredits_usedinteger0 with a test key.cachedbooleantrue when the answer came from the 7-day cache.{
"id": "lkp_01M85RP99BC7ZZVRF0NJSTPHSS",
"object": "lei",
"input": "5493001KJTIIGC8Y1R12",
"query": "lei",
"valid": true,
"status": "found",
"reason": null,
"lei": "5493001KJTIIGC8Y1R12",
"legal_name": "Bloomberg Finance L.P.",
"entity_status": "active",
"registration_status": "issued",
"jurisdiction": "US-DE",
"category": "general",
"legal_form": { "code": "T91T", "name": "Limited Partnership" },
"registered_as": "4348344",
"legal_address": {
"lines": ["C/O Corporation Service Company", "251 Little Falls Drive"],
"city": "Wilmington",
"region": "US-DE",
"postal_code": "19808",
"country": "US"
},
"headquarters_address": {
"lines": ["731 Lexington Avenue"],
"city": "New York",
"region": "US-NY",
"postal_code": "10022",
"country": "US"
},
"registration": {
"initial_date": "2012-12-06T20:55:22Z",
"last_update": "2026-01-05T14:20:40Z",
"next_renewal": "2027-01-25T16:50:02Z",
"managing_lou": "5493001KJTIIGC8Y1R12"
},
"direct_parent": { "lei": "549300B56MD0ZC402L06", "legal_name": "Bloomberg L.P." },
"ultimate_parent": { "lei": "549300RMUDWPHCUQNE66", "legal_name": "Bloomberg Inc." },
"matches": null,
"credits_used": 1,
"cached": false
}
Act on the status
status |
reason |
What it means | What to do |
|---|---|---|---|
found |
null |
GLEIF has a record for the LEI, or for the best match of the name. | Check registration_status and entity_status. After a name search, confirm that legal_name and jurisdiction are the entity you meant: the other candidates are in matches. |
invalid |
invalid_format |
The LEI is not 18 letters or digits followed by 2 digits. GLEIF is not called. | Ask for the LEI again. |
invalid |
invalid_checksum |
The check digits do not match the rest of the LEI. GLEIF is not called. | Ask the user to check each character: it is usually a typo. |
not_found |
not_in_gleif |
The LEI is well formed but GLEIF has no record of it, or the best match of a name search has no record. | Ask for the LEI again, or search by legal name. |
not_found |
no_match |
No legal name matches the search. matches is empty. |
Try the full legal name as registered, legal form included. |
Every status is billed 1 credit, because the lookup ran.
Test keys never call GLEIF: any LEI with correct check digits, and any name, returns the sample entity EXAMPLE HOLDINGS LTD, and LEIs with wrong check digits are still invalid.
registration_status: "issued" means the LEI is current. In GLEIF's terms, lapsed means the record was not renewed by its registration.next_renewal date: when you rely on the record, ask the entity to renew it.
How the check digits work
ISO 17442 makes the last two characters check digits computed with ISO 7064 MOD 97-10, the algorithm IBANs use: with letters turned into numbers (A = 10 to Z = 35), the whole LEI leaves a remainder of 1 when divided by 97. A single mistyped character always fails the check, so it is caught before any call to GLEIF.
Find the parent companies
Entities with an LEI report their direct and ultimate accounting consolidating parents to GLEIF, the companies that consolidate their accounts. The API follows the parent relationships GLEIF lists and returns null when none is reported.
Where the data comes from
Records come from the GLEIF API, queried at request time. GLEIF publishes the Global LEI Index free of charge under the CC0 license. Legal form names come from the GLEIF list of ISO 20275 Entity Legal Form codes. See the data sources page.
Search by legal name
Send name instead of lei. The best candidate's full record comes back, and every candidate is in matches, best first.
curl https://api.qelka.com/v1/lei \
--max-time 30 \
-H "Authorization: Bearer $QELKA_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name": "Bloomberg Finance"}'
const response = await fetch('https://api.qelka.com/v1/lei', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.QELKA_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({ name: 'Bloomberg Finance' }),
signal: AbortSignal.timeout(30_000),
})
const result = await response.json()
console.log(result)
import os
import requests
api_key = os.environ["QELKA_API_KEY"]
response = requests.post(
"https://api.qelka.com/v1/lei",
headers={"Authorization": f"Bearer {api_key}"},
json={"name": "Bloomberg Finance"},
timeout=30,
)
result = response.json()
print(result)
{
"id": "lkp_01M8714FRZBEVYY3WNYQ12ASF8",
"object": "lei",
"input": "Bloomberg Finance",
"query": "name",
"valid": true,
"status": "found",
"reason": null,
"lei": "5493001KJTIIGC8Y1R12",
"legal_name": "Bloomberg Finance L.P.",
"entity_status": "active",
"registration_status": "issued",
"jurisdiction": "US-DE",
"category": "general",
"legal_form": { "code": "T91T", "name": "Limited Partnership" },
"registered_as": "4348344",
"legal_address": {
"lines": ["C/O Corporation Service Company", "251 Little Falls Drive"],
"city": "Wilmington",
"region": "US-DE",
"postal_code": "19808",
"country": "US"
},
"headquarters_address": {
"lines": ["731 Lexington Avenue"],
"city": "New York",
"region": "US-NY",
"postal_code": "10022",
"country": "US"
},
"registration": {
"initial_date": "2012-12-06T20:55:22Z",
"last_update": "2026-01-05T14:20:40Z",
"next_renewal": "2027-01-25T16:50:02Z",
"managing_lou": "5493001KJTIIGC8Y1R12"
},
"direct_parent": { "lei": "549300B56MD0ZC402L06", "legal_name": "Bloomberg L.P." },
"ultimate_parent": { "lei": "549300RMUDWPHCUQNE66", "legal_name": "Bloomberg Inc." },
"matches": [
{ "lei": "5493001KJTIIGC8Y1R12", "legal_name": "Bloomberg Finance L.P." },
{ "lei": "549300S3UKXHMEQHC174", "legal_name": "BLOOMBERG FINANCIAL CORP." },
{ "lei": "254900JY1M565T6QM850", "legal_name": "Bloomberg Finance Singapore L.P." }
],
"credits_used": 1,
"cached": false
}
Catch a mistyped LEI
The last digit is wrong, so the check digits fail and GLEIF is not called. The answer is billed, because the check ran.
curl https://api.qelka.com/v1/lei \
--max-time 30 \
-H "Authorization: Bearer $QELKA_API_KEY" \
-H "Content-Type: application/json" \
-d '{"lei": "5493001KJTIIGC8Y1R13"}'
const response = await fetch('https://api.qelka.com/v1/lei', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.QELKA_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({ lei: '5493001KJTIIGC8Y1R13' }),
signal: AbortSignal.timeout(30_000),
})
const result = await response.json()
console.log(result)
import os
import requests
api_key = os.environ["QELKA_API_KEY"]
response = requests.post(
"https://api.qelka.com/v1/lei",
headers={"Authorization": f"Bearer {api_key}"},
json={"lei": "5493001KJTIIGC8Y1R13"},
timeout=30,
)
result = response.json()
print(result)
{
"id": "lkp_01M8714GP83NW30G6SM7GZ5196",
"object": "lei",
"input": "5493001KJTIIGC8Y1R13",
"query": "lei",
"valid": false,
"status": "invalid",
"reason": "invalid_checksum",
"lei": "5493001KJTIIGC8Y1R13",
"legal_name": null,
"entity_status": null,
"registration_status": null,
"jurisdiction": null,
"category": null,
"legal_form": null,
"registered_as": null,
"legal_address": null,
"headquarters_address": null,
"registration": null,
"direct_parent": null,
"ultimate_parent": null,
"matches": null,
"credits_used": 1,
"cached": false
}
Errors
| Status | Type | When |
|---|---|---|
| 400 | invalid_request | Both or neither of lei and name, lei empty or longer than 40 characters, name shorter than 2 or longer than 200 characters, a body that is not a JSON object, or a field the request table does not list |
| 401 | invalid_api_key | The key is missing, unknown or revoked |
| 402 | insufficient_credits | Your balance is less than 1 credit (live keys only) |
| 403 | forbidden | The key is restricted to other endpoints |
| 405 | invalid_request | The method is not POST |
| 429 | rate_limited | Too many requests: wait Retry-After seconds |
| 500 | internal_error | Unexpected error on our side: retry with backoff |
| 502 | upstream_unavailable | The GLEIF API could not be reached, answered with an error or did not answer in time: retry later |
No error is billed. An LEI that GLEIF does not know is not an error: it is a 200 with status: "not_found".
Related
- LEI lookup API
- Free tool: LEI lookup
- Batch: up to 100 lookups in one call, each item with
type: "lei" - Bulk: a whole file of LEIs with
type=lei - Caching, Errors, Test mode