Search for an entity by legal name using GET https://api.gleif.org/api/v1/lei-records?filter[entity.legalName]=YourEntityName; the GLEIF API is public and requires no authentication or API key
From the response, extract the LEI (a 20-character alphanumeric identifier) and the entity's registration status to confirm the LEI is active
Retrieve the direct parent by following the relationships.directParent link included in the LEI record response, or by calling GET https://api.gleif.org/api/v1/lei-records/{lei}/direct-parent-relationship
Retrieve the ultimate parent by calling GET https://api.gleif.org/api/v1/lei-records/{lei}/ultimate-parent-relationship; the response includes the Relationship Record (RR-CDF) identifying the IS_DIRECTLY_CONSOLIDATED_BY chain
To list all direct children of a parent entity, call GET https://api.gleif.org/api/v1/lei-records?filter[directParent.lei]={parentLei} and paginate using the page[number] and page[size] parameters
Handle JSON:API response format; the GLEIF API uses JSON:API envelope, so entity data lives under data.attributes and relationships under data.relationships — normalize the structure before storage
Known gotchas
Not all entities report their parent relationships; a null directParent link does not always mean the entity is a top-level company — it may simply not have disclosed its ownership structure to its LOU
LEI records can have a status of LAPSED if the entity has not renewed; lapsed LEIs may have stale address and relationship data — always check the registration.status field
The GLEIF concatenated bulk file is updated daily and is more efficient for large-scale ingestion than per-entity API calls; use the API for lookup and the bulk file for full-corpus processing
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp