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-20Relationship types to follow for hierarchy traversal. Spaces must be percent-encoded when used in query strings (e.g., “Is%20a,Part%20of”).
Default:
Allowed values:
Example:
Default:
Is aAllowed values:
Is a, Part of, Has part, Subsumes, Has ingredient, RxNorm has dose formExample:
Is%20a,Part%20of (URL-encoded)Include
hierarchy_level field for each ancestor (distance from source concept)Include
path_length field for each ancestorInclude deprecated/invalid concepts in ancestry (default excludes them)
Page number for pagination (1-based)
Number of ancestor concepts to return per page (max 1000)
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