Skip to main content
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

integer
required
The unique identifier of the concept to retrieve ancestors for
Example: 201826 (Type 2 diabetes mellitus)

Query Parameters

string
Filter ancestors to specific vocabularies (comma-separated)
Example: SNOMED,ICD10CM
string
Filter ancestors to specific domains (comma-separated)
Example: Condition,Observation
integer
default:"10"
Maximum number of hierarchy levels to traverse
Range: 1-20
This endpoint always traverses the Is a hierarchy. It reads OMOP’s precomputed concept_ancestor closure, which stores only transitive Is a ancestry - it has no relationship column to filter on. Every ancestor is therefore returned with relationship_id: "Is a".A relationship_types parameter is accepted for backwards compatibility but has no effect here: passing Part of, or even a nonexistent relationship, returns the same Is a ancestors. To traverse other relationship types, use GET /v1/concepts/{concept_id}/relationships or POST /v1/concepts/relationships/traverse, which query concept_relationship directly.
boolean
default:"false"
Include hierarchy_level field for each ancestor (distance from source concept)
boolean
default:"false"
Include path_length field for each ancestor
boolean
default:"false"
Include deprecated/invalid concepts in ancestry (by default they are excluded)
integer
default:"1"
Page number for pagination (1-based)
integer
default:"5000"
Maximum size of the ancestor set to retrieve before pagination is applied.
Range: 1-5000
Defaults 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.
integer
default:"100"
Number of ancestor concepts to return per page. Values above 200 are clamped to 200.
string
Specific vocabulary release version to query
Example: 2025.1

Response

integer
The concept ID for which ancestors were retrieved
string
Standard name of the source concept
string
Vocabulary containing the source concept
array
Array of ancestor concepts in hierarchical order
object
Summary statistics about the ancestor hierarchy
object
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

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