Performs a comprehensive search across disease terms with support for filtering by names, definitions, synonyms, external cross-references (xrefs), ontology subsets, and imported ontology IDs. Returns paginated results with rich term details including parent/child relationships, definitions, and associated ontology imports. Use this for disease term lookup, browsing disease hierarchies, and finding terms by synonyms or external database IDs.
From spec: Search for disease terms using disease properties (ids, names, xrefs, etc), imports that are related to diseases (eg. symptoms, anatomy, etc), or a combination of the two.
Usage Tips
- Search by names array for disease name matching
- Use synonyms array to search alternative term names
- Filter by subsets to find terms in specific categories (DO_slim, DO_AGR_slim, etc.)
- Search by xrefs to find terms by external IDs (e.g., MESH, OMIM, ICD10)
- Results are paginated (default 20 per page); check page_count for total pages
Parameters (4)
lang(string, query, optional)
We support English and Spanish as 'en' and 'es', respectively.
page(integer, query, optional)
page number to request (min:1, optional)
Constraints: {'minimum': 1}
page_size(integer, query, optional)
number of results returned per page
Constraints: {'minimum': 1}
sort(string, query, optional)
sort field (default id)
Constraints: {'enum': ['id', 'name']}
Examples (1)
Search for cancer-related disease termsprobe-gate
Demonstrates searching for disease terms by name with 'cancer' as the query, returning paginated results with detailed term information.
curl 'https://api.disease-ontology.org/v1/terms/search' \
-X POST
import requests
resp = requests.post("https://api.disease-ontology.org/v1/terms/search")
data = resp.json()
import zingu_apis
api = zingu_apis.api("disease-ontology-do-kb")
result = api.get("terms/search")
for item in result:
print(item)