Since ConceptWiki has ceased to be supported, we have been working on an alternate using Elastic Search and since this is a new call, want to provide early information for API users to allow you to update workflows etc.


We will provide more details with the production release information and welcome comments and suggestions below or to support email.


Alpha test version: http://alpha.openphacts.org:3002/search?query=aspirin


If you using these calls now, you will need to recode your calls to support this, you can test against alpha at the moment for this specific call


More Details


The Search API accepts the parameters "query", "branch", "type" & "limit".


  • "query" can be multiple words. Internally the API "AND"s them together eg. "potassium bromide" would search for terms containing both "potassium" and "bromide". 
    • Items which match all of the words in order are given a higher ranking.
    • Items which match some of the words are given a lower ranking.


The response format contains a list of results within the "primaryTopic" node of the top level result. In XML each result is with an "item" node. In JSON each result is in an object. Each of the result items contains a "url" and a "prefLabel" for the item. 


ie "result" > "primaryTopic" > "result" > "item"


"item" > "url"

              "prefLabel"


  • "branch" restricts the search to the data sources you provide. You can choose from "go", "wikipathways", "chembl", "chebi", "drugbank", "uniprot" & "ocrs". There is also an experimental branch=disgenet, type=disease


You can currently only provide one branch. If no branch is provided then all of them will be searched and default limit is 25.


eg http://alpha.openphacts.org:3002/search?query=folate&branch=chebi


  • "type" is the class of entity to restrict the search to. Choose from "compound", "target", "enzyme", "gene" or the many wikipathways entities eg "human" or "cow". You can only provide one type.


eg http://alpha.openphacts.org:3002/search?query=folate&type=target


  • "limit" restricts the response to a maximum of "limit" items.

 


eg http://alpha.openphacts.org:3002/search?query=folate&type=target&limit=1



We will provide more details with the production release information and welcome comments and suggestions below or to support email.