Skip to contents

Performs a typo-tolerant, approximate search against the GLEIF API. Unlike the filters in lei_records(), which match literal substrings, this matches on edit distance and returns candidate values together with their LEI. Useful for resolving messy or misspelled entity names to a LEI, which can then be passed to lei_record_by_id().

Usage

lei_fuzzy(q, field = c("fulltext", "entity.legalName", "owns", "ownedBy"))

Arguments

q

(character(1))
The search query.

field

(character(1))
The field to search. One of "fulltext", "entity.legalName", "owns", or "ownedBy". Default is "fulltext".

Value

A data.frame() with columns:

  • value: The matched value

  • lei: The Legal Entity Identifier of the matched record, or NA if none is linked

When nothing matches, NULL.

See also

lei_autocomplete() for prefix-based completion, lei_record_by_id() for full records.

Examples

# \donttest{
lei_fuzzy("Deutsch Bank", field = "entity.legalName")
#> NULL
# }