# How to find known drugs for a given disease

**URL:** <https://community.opentargets.org/t/how-to-find-known-drugs-for-a-given-disease/121>\
**Category:** Data Access\
**Tags:** ot-platform\
**Created:** [1 June 2021 11:30 UTC](https://community.opentargets.org/t/how-to-find-known-drugs-for-a-given-disease/121 "2021-06-01T11:30:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![hcornu](https://dub1.discourse-cdn.com/flex017/user_avatar/community.opentargets.org/hcornu/32/716_2.png) [@hcornu](https://community.opentargets.org/u/hcornu)\
**Post date:** [1 June 2021 11:30 UTC](https://community.opentargets.org/t/how-to-find-known-drugs-for-a-given-disease/121/1 "2021-06-01T11:30:36Z")

</div>

## Objective

We are currently working through a bug ([#1565](https://github.com/opentargets/platform/issues/1565)) that prevents users from downloading certain data tables from the user interface, such as known drugs for a given disease. We aim to have it resolved for our next release, at the end of June.

In the meantime, how else can you access this data?

## Data downloads

One way to access the data is to use our data downloads, specifically the **KnownDrugsAggregated dataset** , available in [JSON](http://ftp.ebi.ac.uk/pub/databases/opentargets/platform/latest/output/etl/json/knownDrugsAggregated/) or [Parquet](http://ftp.ebi.ac.uk/pub/databases/opentargets/platform/latest/output/etl/parquet/knownDrugsAggregated/) format from the FTP. For more information, and for sample Python and R scripts, check out our [dataset documentation](https://platform-docs.opentargets.org/data-access/datasets).

## BigQuery

You can also use our BigQuery instance — [open-targets-prod](https://console.cloud.google.com/bigquery?project=open-targets-prod) — to retrieve the data using an SQL query.

Here is an example query for a single disease, EFO\_1001947, which you can run directly [here](https://console.cloud.google.com/bigquery?sq=352646847630:79b5a1e4c38744f1a47695d316eaf628&project=open-targets-prod&ws=!1m4!1m3!8m2!1s352646847630!2s79b5a1e4c38744f1a47695d316eaf628):

```auto
SELECT
targetId,
approvedSymbol,
approvedName,
diseaseId,
label,
drugId,
prefName,
drugType,
mechanismOfAction,
phase,
status,
urlList.element.niceName,
urlList.element.url,
FROM `open-targets-prod.platform.knownDrugsAggregated`,
    UNNEST (urls.list) as urlList
WHERE diseaseId='EFO_1001947'
ORDER BY phase desc

```

You’ll notice that the number returned by BigQuery (175) is different from the number returned on the [childhood T acute lymphoblastic leukemia profile page](https://platform.opentargets.org/disease/EFO_1001947) (138). This is because in BigQuery, the script has been set to return separate rows for each source entry in the `urls.list` array, whereas in the web interface, we aggregate the data in the Source column (e.g. 2 references).

## Further reading

@irene recently resolved a similar question, this time extracting the list of known drugs for multiple targets:

[Get marketed drugs for a set of targets with BigQuery](https://community.opentargets.org/t/get-marketed-drugs-for-a-set-of-targets-with-bigquery/101)  
[Get marketed drugs for a a set of targets with the data downloads](https://community.opentargets.org/t/get-marketed-drugs-for-a-set-of-targets-with-the-data-downloads/102)
