BYTETOOLS

Open Targets Platform API

Free Open Targets GraphQL API with no key: gene-disease associations, evidence scores, known drugs and tractability data for drug target identification. Tested example included.

No API key requiredCORS enabledHTTPSFree tier

Endpoint tested and returned HTTP 200 on 2026-08-21

What is the Open Targets Platform API?

The Open Targets Platform API is a free, key-free GraphQL API for drug target identification. It integrates genetics, genomics, transcriptomics, drug and literature evidence into scored target-disease associations, and exposes known drugs, safety data and target tractability.

Open Targets is a partnership between EMBL-EBI, the Wellcome Sanger Institute and several pharmaceutical companies, built to answer one question systematically: how much evidence links a given gene to a given disease, and where does that evidence come from? It aggregates genetic associations, somatic mutations, known drugs, differential expression, animal models and text-mined literature into a single scored association.

The API is GraphQL rather than REST, which is the right choice for this data: a target-disease question can pull from a dozen underlying evidence sources, and REST would either over-fetch enormous objects or require many round trips. With GraphQL you name precisely the fields you want in one POST, as the minimal example below shows. There is a browsable GraphQL playground at the API endpoint, which is by far the fastest way to build a query.

Quick facts

Base URL
https://api.platform.opentargets.org/api/v4/graphql
Authentication
No API key or account. Open Targets is publicly funded and the platform data is openly licensed.
Rate limit
No hard published limit. Very large queries should use the downloadable data dumps or the BigQuery instance instead.
Pricing
Free. Data released under CC0 where the underlying sources permit.
CORS
Enabled — callable directly from browser JavaScript
Official docs
Read the docs

How to use the Open Targets Platform API

Every request below was executed against the live API on 2026-08-21, and the response shown is the real body it returned — not an illustration.

1. Look up a target by Ensembl gene ID with GraphQL

POST https://api.platform.opentargets.org/api/v4/graphql

curl
curl -X POST 'https://api.platform.opentargets.org/api/v4/graphql' \
  -H 'Content-Type: application/json' \
  -d '{"query":"{target(ensemblId:\"ENSG00000157764\"){id approvedSymbol}}"}'
JavaScript (fetch)
const res = await fetch("https://api.platform.opentargets.org/api/v4/graphql", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
  },
  body: JSON.stringify({"query":"{target(ensemblId:\"ENSG00000157764\"){id approvedSymbol}}"}),
});
if (!res.ok) throw new Error(`Request failed: ${res.status}`);
const data = await res.json();
console.log(data);
Python (requests)
import requests

headers = {
    "Content-Type": "application/json",
}

payload = {"query":"{target(ensemblId:\"ENSG00000157764\"){id approvedSymbol}}"}

res = requests.post("https://api.platform.opentargets.org/api/v4/graphql", headers=headers, json=payload, timeout=20)
res.raise_for_status()
print(res.json())
Response — HTTP 200
{
  "data": {
    "target": {
      "id": "ENSG00000157764",
      "approvedSymbol": "BRAF"
    }
  }
}

Parameters

ParameterTypeRequiredDescription
querystringRequiredThe GraphQL query document, sent in the JSON body. Name only the fields you want back. {target(ensemblId:"ENSG00000157764"){id approvedSymbol}}
variablesobjectOptionalValues for any variables declared in the query, which is the clean way to parameterise it. {"ensemblId":"ENSG00000157764"}
ensemblIdargumentOptionalTargets are addressed by Ensembl gene identifier, not by gene symbol. ENSG00000157764
efoIdargumentOptionalDiseases are addressed by EFO identifier from the Experimental Factor Ontology. EFO_0000305

Response fields

dataobject
The GraphQL result, shaped exactly like the query you sent. Nothing you did not ask for is returned.
data.target.idstring
Ensembl gene identifier for the target.
data.target.approvedSymbolstring
HGNC approved gene symbol, such as BRAF.
associatedDiseasesobject
Scored disease associations with an overall score and a per-datatype breakdown, available when requested.
knownDrugsobject
Drugs known to modulate the target, with clinical phase and mechanism of action.
tractabilityarray
Assessments of how amenable the target is to small molecule or antibody modulation.
errorsarray
GraphQL returns HTTP 200 even for query errors — this array carries them, so always check it.

What you can build with the Open Targets Platform API

  • Rank candidate drug targets for a disease by weight of evidence
  • Check what is already known about a gene before committing to a programme
  • Find diseases genetically associated with a target of interest
  • Assess whether a target is tractable to small molecules or antibodies

Common errors and how to fix them

HTTP 200 with an errors array

The query was malformed or referenced an unknown field.

Fix: GraphQL reports errors in the body, not the status code. Always inspect `errors` before reading `data`.

Null target

The Ensembl identifier does not exist in the platform.

Fix: Targets are keyed by Ensembl gene id, not symbol. Resolve a symbol first through the search query.

Timeout on large queries

Too many nested associations requested at once.

Fix: Add `page` arguments to nested collections, or use the data downloads for whole-dataset analysis.

Open Targets Platform API — frequently asked questions

Is the Open Targets API free?

Yes, free with no API key or registration. Open Targets is a public-private research partnership and its platform data is openly licensed, largely under CC0.

Why does Open Targets use GraphQL instead of REST?

Because a single target-disease question can draw on a dozen evidence sources. REST would force either enormous over-fetching or many round trips; GraphQL lets you name exactly the fields you need in one request.

How do I look up a gene by symbol rather than Ensembl ID?

Use the `search` query with the symbol as free text, which returns matching targets with their Ensembl identifiers. Those identifiers are then what the `target` query expects.

What does the association score mean?

It is a weighted aggregate from 0 to 1 across evidence types — genetic associations, known drugs, expression data, animal models, literature. A high score means multiple independent lines of evidence agree, which is more meaningful than any single source.

Tools that pair with this API

Open Targets Platform is an independent third-party service and is not affiliated with ByteTools or ByteVancer. Details on this page were verified on 2026-08-21; always check the official documentation before relying on this API in production, as terms and limits can change.