# searchLegalEntities

**Identifier:** `gleif_searchLegalEntities`

**Provider:** [GLEIF](https://kirha.com/providers/gleif.md)

Find the Legal Entity Identifier (LEI) of a company, fund, bank or public body by legal name, optionally within a country. Returns the LEI, legal name, status and national registration number. Use it to identify a legal entity unambiguously across countries.

## Run it with the CLI

```bash
kirha tools run gleif_searchLegalEntities \
  --input '{
    "name": "<name>"
  }'
```

`--input` takes a JSON object that matches the input schema. Pass `--input -` to read it from stdin.

## Call it over HTTP

```bash
curl https://api.kirha.com/tools/v1/execute \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: **********' \
  --data '{
  "tool_name": "gleif_searchLegalEntities",
  "input": {
    "name": "<name>"
  }
}'
```

Replace the stars with an API key from https://app.kirha.com/api-keys.

## Input schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "properties": {
    "activeOnly": {
      "description": "Only entities that are still active",
      "type": "boolean"
    },
    "country": {
      "description": "ISO 3166-1 alpha-2 of the legal address, e.g., FR, DE",
      "pattern": "^[A-Za-z]{2}$",
      "type": "string"
    },
    "limit": {
      "default": 10,
      "maximum": 50,
      "minimum": 1,
      "type": "integer"
    },
    "name": {
      "description": "Legal name or part of it",
      "minLength": 2,
      "type": "string"
    }
  },
  "required": [
    "name"
  ],
  "type": "object"
}
```

## Output schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "context": {
      "type": "string"
    },
    "entities": {
      "items": {
        "additionalProperties": false,
        "properties": {
          "city": {
            "type": "string"
          },
          "country": {
            "type": "string"
          },
          "entityStatus": {
            "type": "string"
          },
          "legalName": {
            "type": "string"
          },
          "lei": {
            "type": "string"
          },
          "leiStatus": {
            "type": "string"
          },
          "registrationNumber": {
            "type": "string"
          }
        },
        "required": [
          "lei"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "leis": {
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "total": {
      "type": "number"
    }
  },
  "required": [
    "context",
    "total",
    "entities",
    "leis"
  ],
  "type": "object"
}
```

-----

[All GLEIF tools](https://kirha.com/providers/gleif.md) · [< Back to tools list](https://kirha.com/tools.md)