---
id: "lei"
kind: "datatype"
status: "stable"
is_pii: false
categories: ["companies"]
langs: ["common"]
quality: 80
url: "http://registry.apicrafter.io/datatype/lei"
---

# Legal Entity Identifier (`lei`)

The Legal Entity Identifier (LEI) is a unique global identifier for legal entities participating in financial transactions. Also known as an LEI code or LEI number, its purpose is to help identify legal entities on a globally accessible database. Legal entities are organisations such as companies or government entities that participate in financial transactions. An individual person may not obtain an LEI.

- Personal data (PII): no
- Categories: Companies/business/organizations (companies)
- Countries: global
- Languages: Common to most languages (common)
- Classification: identifier

## Detection

Regular expression (Python `re`):

```
[0-9A-Z]{18}[0-9]{2}
```

## Examples

- `INR2EJN1ERAN0W5ZP974` — Microsoft
- `2594007XIACKNMUAW223` — MakoLab

## Mappings

- autotype: `lei`
- bioregistry: `lei`
- fibo: <https://spec.edmcouncil.org/fibo/ontology/BE/LegalEntities/LEIEntities/LegalEntityIdentifier>
- orgid: `XI-LEI`
- schema_org: `leiCode`
- stdnum: `lei`
- wikidata: `P1278`

## Metacrafter rules

2 rules: 1 match the field name, 1 match values.

- `leifield` (field, `common/crossborder_finance.yaml`)
- `leivalue` (data, `common/crossborder_finance.yaml`)

## Supported by tools

- `autotype`
- `dataprep`
- `metacrafter`
- `pythonstdnum`

## Sources

- wikipedia: <https://en.wikipedia.org/wiki/Legal_Entity_Identifier>
- wikidata: <https://www.wikidata.org/wiki/Property:P1278>

## Quality

Score 80/100. Missing: anchored regexp, negative example, translation.

JSON: <http://registry.apicrafter.io/api/v1/datatypes/lei.json> · Edit: <https://github.com/apicrafter/metacrafter-registry/edit/main/data/datatypes/any/companies/lei.yaml>
