GET /ontology/ancestors/{id}

ensembl.org:ensembl-rest-api

Summary: Get ontology ancestors
Operation ID: getOntologyAncestors
Auth: none

Get ancestor terms in an ontology hierarchy for a given ontology term ID. For GO terms, SO terms, or other ontologies, returns all parent terms up to the root. Shows the hierarchical path from your term to the top of the ontology. Useful for understanding where a term fits in the ontology and finding more general terms.

Original spec description

Retrieve ancestor terms from is_a and part_of relationships.

Usage Tips

- Works with GO IDs (GO:0008150), SO IDs, and other ontologies in Ensembl - The `is_root` field marks the top-level term - Ancestors include direct parents and all higher-level terms - The `is_leaf` field indicates if this is a terminal node - Use with descendants endpoint to traverse the full ontology tree

Parameters (1)

id (string, path, required)

Ontology term ID

Examples (1)

TitleTypeURLAction
Get ontology ancestors for plasma membrane GO term probe-gate https://rest.ensembl.org/ontology/ancestors/GO:0005886?content-type=application/json

No probe data for this endpoint yet.