Dapp Search Web Service
The Dapp search web service provides a programmatic interface for searching Dapps and their properties. This is the same web service used by the Dapper website on the find a Dapp page. The output of the web services contains Dapps and their properties that match the supplied query.
Accessing the Web Service
The base URL for the web service is:
http://www.dapper.net/websiteServices/dapp-search.php
The web service works using HTTP GET and HTTP POST.
Required Arguments
You must supply an argument called query with a non-empty value. The
value of this argument will be used to search the Dapps. For example:
http://www.dapper.net/websiteServices/dapp-search.php?query=health
The query can be constructed using common operators (+, -, *, ~, and
parentheses). By default the OR operand is used, so Dapps matching any of the
words in the query will be returned.
Optional Arguments
-
exact: Set to 1 if you want your search to only match Dapps where
the value is exactly equal to the query. For instance, if the query is
equal to "headline" and exact=0 (default), it will return Dapps that have
fields called "news headline". If exact=1, then only Dapps that have
properties that are exactly "headline".
Example:
http://www.dapper.net/websiteServices/dapp-search.php?query=health&exact=1
-
field: When this argument is omitted, the web service searches all
the properties of a Dapp. If you'd only like to search a specific
property, use this argument to do so. For instance, if you only want to
return Dapps that have tags named "news" but not necessarily Dapps that
have the word "news" in their titles, set the argument
field=dappTags. The available values are: dappFields,
dappGroups, dappTags, dappDescription, dappDomains, dappTitle, and
dappUrls. To use this argument, you must also supply
exact=1.
Example:
http://www.dapper.net/websiteServices/dapp-search.php?query=health&exact=1&field=dappTags
-
outputFormat: The value for this argument can be either json
or xml. If this argument is not supplied, json is used by default.
The value of this argument determines whether to return the results in
JSON or in XML. See below for more information on the formats.
Example:
http://www.dapper.net/websiteServices/dapp-search.php?query=health&outputFormat=xml
Output Format: JSON
By default, results are returned in JSON. The object returned always has an integer property named numResults. If this property is greater than 0, another property named results exists. This property's value is an object where the keys are Dapp identifiers and the values are the properties of the Dapp. Each property is an array (even if there is only one value). See the example below for an example:
{"numResults":4,
"results":
{"HITNewsUpdates":
{"preMapEncoding":["UTF-8"],
"dappUrls":["http://www.healthcareitnews.com/moreNews.cms"],
"dappTitle":["HIT News Updates"],
"dappTags":["HIT","health","IT"],
"dappFields":["hit"],
"dappDomains":["healthcareitnews.com"],
"codeVersion":["202"]
},
"Labs":
{"dappFields":["Amount","Reference range","Reflex test","Panel test","Lab name","Specimen","Lab description"],
"urlVariables":["labId"],
"variableUrl":["http://home.caregroup.org/departments/pathology/lab_manual/search_index.asp?Test%20ID={labId}"],
"preMapEncoding":["UTF-8"],
"dappUrls":["http://home.caregroup.org/departments/pathology/lab_manual/search_index.asp?Test%20ID=2031","http://home.caregroup.org/departments/pathology/lab_manual/search_index.asp?Test%20ID=2032"],
"dappDomains":["home.caregroup.org"],
"dappTitle":["Labs"],
"dappDescription":["List of medical labs"],
"dappTags":["Health","labs"],
"codeVersion":["202"]},
"TopHealthArticles":
{"dappFields":["title"],
"dappDomains":["articlecity.com"],
"dappDescription":["Health articles from articlecity.com"],
"codeVersion":["200"],
"dappUrls":["http://www.articlecity.com/articles/health/"],
"dappTitle":["Top Health Articles"],
"dappTags":["health articles","health"]},
"WebMDQuiz":
{"codeVersion":["200"],
"dappUrls":["http://www.webmd.com"],
"dappTitle":["WebMD Quiz"],
"dappTags":["quiz","health","webmd"],
"dappFields":["Quiz"],
"dappDomains":["webmd.com"]}
}
}
Output Format: XML
The XML format mirrors the JSON format. The top-level element is called searchResults. There is always an element called numResults. When this element has a value greater than 0, there also exists an element called results. This element has one child element for every Dapp that matched the query. Each Dapp element has its properties as child elements. Sample XML is shown below (if you cannot see it, click here).
What is Searched?
Unless you specify the field argument (as described above), every property of a Dapp is searched: title, domain name, field names, group names, description, tags, etc.
Future Changes
In the future expect limits and range requests to be supported.
