Find companies that just got a Legal Entity Identifier (LEI) with the GLEIF API and Python
From 17 to 19 October 2026, 156 companies and other legal entities in Germany and the UK received their first Legal Entity Identifier, and 70 of them were German GmbHs. GLEIF publishes every one of those records through a free API, and this guide reads them with plain Python. A Legal Entity Identifier (LEI) is a 20-character code that identifies a legal entity in financial transactions.…
On 20 October 2026, a Python script demonstrated how to utilize the GLEIF API to retrieve newly issued Legal Entity Identifiers (LEI) for companies in Germany and the United Kingdom. The script queried the API for records issued on the previous day, October 19, 2026, and successfully identified 343 LEIs.
The API response was structured according to the JSON:API format, featuring records within the "data" array, each containing the LEI as the identifier, attributes under the "attributes" key, and pagination information under "meta.pagination". The script focused on extracting specific fields from the entity attributes, such as the legal name, country, category, and LEI.
The script employed several filters to narrow down the results. Firstly, it excluded records where the legal entity was categorized as a sole proprietor, as these typically represent individuals trading under their own name. Secondly, it specifically targeted entities with the "GENERAL" category, which encompassed most traditional legal entities like companies and partnerships, while excluding specialized forms like funds and branches.
The script utilized the ISO 3166 two-letter country codes to filter records based on the entity's legal address country. It then printed the collected information, which included the LEI, legal name, country, and category for each entity that matched the specified criteria.
Rewritten by urgent.news; may contain errors — check the original.
Source: dev.to