# Search Open Targets

Search and read Open Targets records through the Assyro API: drug targets (genes), diseases, drugs with their mechanisms of action and clinical indications…

Source: https://www.assyro.com/docs/sources/open-targets

`GET https://api.assyro.com/v1/sources/open-targets/search`

> **Note:** Preview: `api.assyro.com` is not serving production data yet. This page follows the API's published description and may change before launch.

Search and read Open Targets records from your own code: drug targets (genes), diseases, drugs with their mechanisms of action and clinical indications, and how strongly the evidence (genetics, somatic mutations, known drugs, pathways, literature, expression, animal models) links a target to a disease, from the Open Targets Platform release. Published by Open Targets (EMBL-EBI, Wellcome Sanger Institute and partners) ([platform.opentargets.org](https://platform.opentargets.org/)); answered from Assyro's copy, refreshed weekly Wednesday 10:40 UTC.

Licence: public domain (see the [terms](https://platform-docs.opentargets.org/licence)). Each record links to its page at the source.

Example: "Which targets are most strongly associated with Alzheimer disease?"

## Search

`GET https://api.assyro.com/v1/sources/open-targets/search` with any of these query parameters. Repeat a parameter for a list (`?phase=PHASE2&phase=PHASE3`). An unknown parameter is refused by name.

### Search parameters

| Field | Type | Required | Description |
|---|---|---|---|
| `query` | string | no | Words of a gene, disease or drug name, e.g. "PCSK9", "Alzheimer disease", "evolocumab". |
| `kind` | string | no | Keep only targets, diseases, drugs or target-disease associations. One of: `target`, `disease`, `drug`, `association`. |
| `target` | string | no | A target: an Ensembl gene id ("ENSG00000169174") or approved symbol ("PCSK9"). |
| `disease` | string | no | A disease id as Open Targets writes it, e.g. "EFO_0000305" or "MONDO_0004975" (search kind "disease" to find it). |
| `drug` | string | no | A ChEMBL id, e.g. "CHEMBL1201583" (search kind "drug" to find it). |
| `minScore` | number | no | Keep associations scored at least this (0 to 1). |
| `limit` | integer | no | Records to return, default 10. |
| `offset` | integer | no | Skip this many results (for paging), default 0. |

Each result is a record; read one in full with [Get a record](https://www.assyro.com/docs/sources/open-targets/records).

## What a record holds

- `id`, `title`, `url`: the source's identifier, its title and its page at the source, to verify it.
- `authority`, `publishedDate`, `version`: who published it, when, and the edition read.
- `snippet` and `fields`: the matching text and the source's own fields.
- `asOf`: the day Assyro's copy of the source was read.

## Example request

curl:

```bash
curl "https://api.assyro.com/v1/sources/open-targets/search?kind=association&disease=MONDO_0004975"
```

Python:

```python
import requests

response = requests.get(
    "https://api.assyro.com/v1/sources/open-targets/search",
    params={
        "kind": "association",
        "disease": "MONDO_0004975"
    },
)
response.raise_for_status()
print(response.json())
```

JavaScript:

```javascript
const response = await fetch("https://api.assyro.com/v1/sources/open-targets/search?kind=association&disease=MONDO_0004975");
const result = await response.json();
```
