Get Concept Ancestors
Retrieve all ancestor OMOP concepts for a given concept - hierarchical context, classification paths, and parent terms for concept set expansion.
This endpoint returns the complete ancestor hierarchy for a specific concept, including parent concepts, grandparents, and all higher-level classifications up to the root of the vocabulary hierarchy.
Path Parameters
The unique identifier of the concept to retrieve ancestors for
Example:
Example:
201826 (Type 2 diabetes mellitus)Query Parameters
Filter ancestors to specific vocabularies (comma-separated)
Example:
Example:
SNOMED,ICD10CMFilter ancestors to specific domains (comma-separated)
Example:
Example:
Condition,ObservationMaximum number of hierarchy levels to traverse
Range:
Range:
1-20Include
hierarchy_level field for each ancestor (distance from source concept)Include
path_length field for each ancestorInclude deprecated/invalid concepts in ancestry (by default they are excluded)
Page number for pagination (1-based)
Maximum size of the ancestor set to retrieve before pagination is applied.
Range:
Defaults to the maximum, so paging through the response returns every ancestor that matches this request - those within
Range:
1-5000Defaults to the maximum, so paging through the response returns every ancestor that matches this request - those within
max_levels and any vocabulary_ids
/ domain_ids filters you supplied. (relationship_types is not applied - see
above.) It is not necessarily the concept’s entire ancestry: max_levels defaults
to 10, so more distant ancestors are excluded, and truncated does not flag
that (it reports the row cap only). Pass max_levels=20 if you need the full
ancestry.Number of ancestor concepts to return per page. Values above
200 are
clamped to 200.Specific vocabulary release version to query
Example:
Example:
2025.1Response
The concept ID for which ancestors were retrieved
Standard name of the source concept
Vocabulary containing the source concept
Array of ancestor concepts in hierarchical order
Summary statistics about the ancestor hierarchy
Response metadata and pagination information
Usage Examples
Basic Ancestor Retrieval
Get all ancestors for a specific concept:TypeScript
Limited Hierarchy Depth
Retrieve ancestors up to a specific number of levels:TypeScript
Classification Path Analysis
Get complete classification paths from concept to root:TypeScript
Cross-Vocabulary Hierarchy
Analyze ancestors within specific vocabulary:TypeScript
Multiple Relationship Types
Follow different types of hierarchical relationships:TypeScript
Related Endpoints
- Get Concept Descendants - Retrieve child concepts
- Get Concept Hierarchy - Complete hierarchy view
- Get Concept Relationships - All concept relationships
- Get Concept Details - Complete concept information
Notes
- Hierarchy traversal follows “Is a” relationships by default, but can be customized
- Some concepts may have multiple classification paths to different root concepts
- Cross-vocabulary concepts may have ancestors in different vocabularies
- Standard concepts are prioritized in hierarchy traversal unless explicitly disabled
- Deprecated concepts are excluded from ancestry unless specifically requested
- Maximum hierarchy depth is typically 6-8 levels for most medical vocabularies