Open Targets Platform REST API
The Open Targets Platform REST API The Open Targets Platform API ('Application Programming Interface') allows programmatic retrieval of the Open Targets…
Data & analytics#openapi#open-data
Fork copies the collection into your workspace, without the publisher's secrets, so you can add your own key and send requests. Star saves it to your starred APIs (Account › Marketplace) and helps others find it.
Overview
The Open Targets Platform REST API
The Open Targets Platform API ('Application Programming Interface') allows programmatic retrieval of the Open Targets Platform data via a set of REST services.
You can make calls to the latest version of our API using the base URL https://platform-api.opentargets.io/v3/platform. Please make sure you use https instead of the unencrypted http calls, which we do not accept.
We list below the methods available to query our data directly from the API, followed by an interactive interface that you can use to try out the parameters and execute the REST-API calls.
For every request you create, the interactive interface will display both a curl command and a request URL that you can use to ensure you get the expected response before using your application or workflow.
Check our documentation for some API tutorials and [get in touch](mailto:support@targetvalidation.org) if you have any questions.
Available Methods
The available methods can be grouped in three types:
- __public__ - Methods that serve the core set of our data. These are stable and we fully supported them.
- __private__ - Methods used by the web app to serve additional data not specific to our platform. These methods
may change without notice and should be used with caution.
- __utils__ - Methods to get statistics and technical data about our API.
Supported formats
The methods above are all available via a GET request, and will serve outputs as JSON.
Alternative output formats, such xml, csv and tab, are also available for some of the methods. However alternative output formats are not supported in interactive interface below where the response will be always in `JSON.
If you have complex queries with large number of parameters, you should use a POST request instead of GET.POST methods require a body encoded as json. When querying for a specific disease using the latest version of the API, your call would look like the example below:
curl -X POST -d '{"disease":["EFO_0000253"]}' --header 'Content-Type: application/json' https://platform-api.opentargets.io/v3/platform/public/evidence/filterHow to interpret a response
Each HTTPS response will serve data in headers and body. The headers will give you details about your query, such as how long it took to run.
In the body of the response, you will find the data you have requested for in JSON format. The jq program is a useful tool to parse the json response while on the command line.
curl https://platform-api.opentargets.io/v3/platform/public/association/filter\?target\=ENSG00000157764 | jqWe do not analyse the nature of any specific API queries except for the purposes of improving the performance of our API.
Read more in our privacy section.
How can we make the Open Targets Platform API more useful to you? Would you like additional methods to be implemented?
Please [get in touch](mailto:support@targetvalidation.org) and send your suggestions.
Endpoints 31
public
- GETGet association by id
/platform/public/association?id=stringOnce we integrate all evidence connecting a target to a specific disease, we compute an association score by the means of an harmonic sum. This *association… - GETFilter available associations
/platform/public/association/filter?target=string&disease=string&therapeutic_area=string&datasource=string&datatype=string&pathway=string&target_class=string&uniprotkw=string&direct=true&datastructure=string&fields=string&facets=false&scorevalue_min=0&scorevalue_max=0.0&scorevalue_types=string&size=0.0&from=0.0&format=string&sort=string&search=stringMore complex queries for associations scores and objects can be done using this method, which allows to sort in different order, restrict to a specific class… - POSTBatch query available associations
/platform/public/association/filterComplex queries and filters for association objects can also be submitted using a JSON object and the equivalent POST method. - GETGet evidence by ID
/platform/public/evidence?id=stringWe call evidence a unit of data that support a connection between a target and a disease. The Open Targets Platform integrates multiple types of evidence… - POSTGet evidence for a list of IDs
/platform/public/evidenceThis is the POST version of /public/evidence. It allows to query for a list of evidence strings encoded in a json object to be passed in the body. - GETFilter available evidence
/platform/public/evidence/filter?target=string&disease=string&data source=string&datatype=string&pathway=string&uniprotkw=string&datastructure=string&fields=string&scorevalue_min=0&scorevalue_max=0.0&sort=string&size=0.0&from=0.0&format=stringThe filter method allows to retrieve the specific data that supports a connection between targets and diseases. Filters can be used to restrict the results by… - POSTBatch filter available evidence
/platform/public/evidence/filterPOST version of /public/evidence/filter. Filters can be specified as part of a json object in the body, simplifying the submission of queries. - GETSearch for a disease or a target
/platform/public/search?q=string&size=string&from=string&filter=stringThis method allows you to look for gene or diseases of interest using a free text search, replicating the functionality of the search box on our homepage. It… - GETGet metrics about the current data release
/platform/public/utils/metricsReturns the metrics about associations and evidences, divided by datasource, genes and so on. - GETPing service
/platform/public/utils/pingCheck if the API is up - GETGet statistics about the current data release
/platform/public/utils/statsReturns the number of associations and evidences, divided by datasource. - GETGet the list of therapeutic areas about the current data release
/platform/public/utils/therapeuticareasReturns the list of therapeutic areas for the current data release - GETGet API version
/platform/public/utils/versionReturns current API version.
private
- GETBrowse API documentation
/platform/docsAccess api docs as served by Redoc - GETBrowse interactive API documentation
/platform/docs/swagger-uiInteractive API docs using swagger-ui - GETGet `autocomplete` objects.
/platform/private/autocomplete?q=string&size=stringSearch for the closest term to autocomplete in the search box. - POSTFind the best hit
/platform/private/besthitsearchFire the search method for multiple strings - POSTFind information about a list of diseases
/platform/private/diseaseGet disease objects. - GETFind information about a disease
/platform/private/disease/:diseaseGet disease objects. - GETGet drug by ID
/platform/private/drug/:DRUG_ID?drug_id=stringGet drug objects. - GETGet evidence code by ID
/platform/private/eco/:ECO_IDGet ECO objects. - POSTEnrichment analysis
/platform/private/enrichment/targetsReturns an enrichment analysis for a list of targets passed in the body - GETSearch most relevant results
/platform/private/quicksearch?q=string&size=stringGet search-result objects. Enables search bar functionality. - POSTFind related entities
/platform/private/relationGet relation objects. - GETFind related entities by disease
/platform/private/relation/disease/:diseaseGet relation objects starting from diseases. - GETFind related entities by target
/platform/private/relation/target/:targetGet relation objects starting from diseases. - POSTFind information about a list of targets
/platform/private/targetGet target objects. Used for the target profile page. - GETQuery expression levels
/platform/private/target/expression?gene=stringGet gene-expression objects. - POSTBatch query expression levels
/platform/private/target/expressionGet gene-expression objects. - GETFind information about a target
/platform/private/target/:targetGet target objects. - GETGet OpenAPI schema
/platform/swaggerGet swagger.yaml specs for the API
API details
- Authentication
- None declared in the description
- Operations
- 31 operations on 27 pathsGET 22POST 9
- Main resources
- private 18public 13utils 5filter 4retrieve 3search 1
- Description format
- OpenAPI 3.0.0, API version
19.02.1 - Links
- OpenAPI document
- Listed from
- APIs.guru OpenAPI Directory (CC0-1.0)
Source updated
How to test the Open Targets Platform REST API in Swastik Codes
- Open the APISelect “Fork & run in Swastik Codes” on this page. Sign in or create a free account if asked.
- Fork it into your workspaceChoose a workspace. You get your own copy of the Open Targets Platform REST API collection, without the publisher's secrets.
- Add your credentialsOpen the collection's variables or an environment and enter your API key or token, if the API needs one.
- Send a requestPick an endpoint, for example “Get association by id” (GET /platform/public/association?id=string), and press Send. Check the response, add tests and run the whole collection with the runner.
Frequently asked questions
What is the Open Targets Platform REST API?
The Open Targets Platform REST API The Open Targets Platform API ('Application Programming Interface') allows programmatic retrieval of the Open Targets… It is listed under Data & analytics and has 31 endpoints.
Who publishes the Open Targets Platform REST API?
It is listed from Opentargets's public API description (an OpenAPI document), not published by Opentargets on Swastik Codes. Anyone who controls opentargets.io can claim the profile by adding a DNS TXT record.
How do I authenticate with the Open Targets Platform REST API?
Its OpenAPI description does not declare an authentication scheme. Some endpoints may be open; check the provider's documentation before relying on that.
How many endpoints does the Open Targets Platform REST API have?
31 operations on 27 paths (22 GET, 9 POST). The largest groups are private, public, utils, filter.
Is forking the Open Targets Platform REST API free?
Yes. Forking copies the collection into your workspace for free. It has been starred 0 times and forked 0 times.