# searchEntities

**Identifier:** `opentargets_searchEntities`

**Provider:** [OpenTargets](https://kirha.com/providers/opentargets.md)

Resolve a gene/protein, disease or drug name (brand names and synonyms included) to Open Targets IDs: Ensembl gene IDs for targets, EFO/MONDO IDs for diseases, ChEMBL IDs for drugs. Use this first; the IDs feed every other Open Targets tool, drug ChEMBL IDs also work in chembl-mcp (getMechanisms, getDrugIndications, getBioactivities, getMolecules). Target IDs here are Ensembl, not ChEMBL target IDs: use the symbol with chembl-mcp searchTargets for those.

## Run it with the CLI

```bash
kirha tools run opentargets_searchEntities \
  --input '{
    "query": "EGFR"
  }'
```

`--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": "opentargets_searchEntities",
  "input": {
    "query": "EGFR"
  }
}'
```

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": {
    "entityTypes": {
      "default": [
        "target",
        "disease",
        "drug"
      ],
      "items": {
        "enum": [
          "target",
          "disease",
          "drug"
        ],
        "type": "string"
      },
      "minItems": 1,
      "type": "array"
    },
    "limit": {
      "default": 5,
      "maximum": 25,
      "minimum": 1,
      "type": "integer"
    },
    "query": {
      "description": "e.g. EGFR, non-small cell lung carcinoma, Keytruda",
      "minLength": 1,
      "type": "string"
    }
  },
  "required": [
    "query"
  ],
  "type": "object"
}
```

## Output schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "context": {
      "type": "string"
    },
    "diseaseIds": {
      "description": "EFO/MONDO/Orphanet disease IDs",
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "drugIds": {
      "description": "ChEMBL IDs, shared with chembl-mcp",
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "hits": {
      "items": {
        "additionalProperties": false,
        "properties": {
          "categories": {
            "description": "Therapeutic areas for diseases, modality for drugs",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "description": {
            "type": "string"
          },
          "entityType": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "entityType",
          "name"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "targetIds": {
      "description": "Ensembl gene IDs",
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "total": {
      "type": "number"
    }
  },
  "required": [
    "context",
    "total",
    "hits",
    "targetIds",
    "diseaseIds",
    "drugIds"
  ],
  "type": "object"
}
```

## Related tools

Other OpenTargets tools that this tool refers to, or that refer to it.

- [`getTargetAssociatedDiseases`](https://kirha.com/providers/opentargets/getTargetAssociatedDiseases.md)
- [`getTargetProfile`](https://kirha.com/providers/opentargets/getTargetProfile.md)
- [`getDiseaseAssociatedTargets`](https://kirha.com/providers/opentargets/getDiseaseAssociatedTargets.md)
- [`getDrugProfile`](https://kirha.com/providers/opentargets/getDrugProfile.md)
- [`getKnownDrugs`](https://kirha.com/providers/opentargets/getKnownDrugs.md)

-----

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