> ## Documentation Index
> Fetch the complete documentation index at: https://docs.omophub.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Related Concepts

> Find OMOP concepts related through relationship analysis - ingredients, routes, brand names, and hierarchical links - for concept set expansion.

## Overview

This endpoint finds concepts that are related to a given concept through various relationship types. Results are scored and ordered by relationship strength.

## Path Parameters

**conceptId** `integer` *required*

The unique OMOP concept ID to find related concepts for

## Query Parameters

**page\_size** `integer` (default: 20)

Maximum number of related concepts to return (1-100)

**min\_score** `number` (default: 0.1)

Minimum relationship score (0.0-1.0) to include in results

**relationship\_types** `string`

Comma-separated list of relationship types to filter by (e.g., "Is a,Maps to")

**vocab\_release** `string`

Specific vocabulary release version (e.g., "2025.1")

## Response

**success** `boolean` *required*

Indicates if the request was successful

**data** `array` *required*

Array of related concepts ordered by relationship score

**data**

**concept\_id** `integer`

Related concept ID

**concept\_name** `string`

Related concept name

**concept\_code** `string`

Related concept code

**vocabulary\_id** `string`

Related concept vocabulary ID

**vocabulary\_name** `string`

Related concept vocabulary name

**domain\_id** `string`

Related concept domain

**concept\_class\_id** `string`

Related concept class

**standard\_concept** `string`

Standard concept flag ("S" for standard, "C" for classification, null for non-standard)

**relationship\_id** `string`

Relationship type ID (e.g., "Is a", "Maps to")

**relationship\_name** `string`

Human-readable relationship name

**relationship\_score** `number`

Relationship strength score (0.0-1.0)

**relationship\_distance** `integer`

Number of relationship steps from source concept

**meta** `object` *required*

Response metadata

**meta**

**request\_id** `string`

Unique request identifier

**timestamp** `string`

ISO 8601 timestamp

**vocab\_release** `string`

Vocabulary release version used

```bash cURL theme={null}
curl -X GET "https://api.omophub.com/v1/concepts/201826/related?min_score=0.4&page_size=20" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

```python Python theme={null}
import requests

concept_id = 201826  # Type 2 diabetes
url = f"https://api.omophub.com/v1/concepts/{concept_id}/related"
params = {
    "min_score": 0.4,
    "page_size": 30,
    "relationship_types": "Is a,Maps to"
}

headers = {
    "Authorization": "Bearer YOUR_API_KEY"
}

response = requests.get(url, params=params, headers=headers)
data = response.json()

print(f"Found {len(data['data'])} related concepts")

for related in data['data'][:5]:
    print(f"  - {related['concept_name']} ({related['vocabulary_id']})")
    print(f"    Relationship: {related['relationship_name']}")
    print(f"    Score: {related['relationship_score']:.2f}")
```

```ts TypeScript theme={null}
import { OMOPHub } from '@omophub/omophub-node';

const client = new OMOPHub();
const conceptId = 201826; // Type 2 diabetes
const { data } = await client.concepts.related(conceptId, {
  minScore: 0.3,
  pageSize: 20,
});

console.log(`Found ${data?.length ?? 0} related concepts`);

data?.slice(0, 5).forEach((concept, index) => {
  console.log(
    `${index + 1}. ${concept.concept_name} (${concept.vocabulary_id})`
  );
  console.log(`   Relationship: ${concept.relationship_name}`);
  console.log(`   Score: ${concept.relationship_score.toFixed(2)}`);
});
```

```json theme={null}
{
  "success": true,
  "data": [
    {
      "concept_id": 73211009,
      "concept_name": "Diabetes mellitus",
      "concept_code": "73211009",
      "vocabulary_id": "SNOMED",
      "vocabulary_name": "SNOMED CT",
      "domain_id": "Condition",
      "concept_class_id": "Clinical Finding",
      "standard_concept": "S",
      "relationship_id": "Is a",
      "relationship_name": "Is a",
      "relationship_score": 0.95,
      "relationship_distance": 1
    },
    {
      "concept_id": 443735,
      "concept_name": "Type 2 diabetes mellitus without complications",
      "concept_code": "443735",
      "vocabulary_id": "SNOMED",
      "vocabulary_name": "SNOMED CT",
      "domain_id": "Condition",
      "concept_class_id": "Clinical Finding",
      "standard_concept": "S",
      "relationship_id": "Subsumes",
      "relationship_name": "Subsumes",
      "relationship_score": 0.87,
      "relationship_distance": 1
    },
    {
      "concept_id": 435216,
      "concept_name": "Type 2 diabetes mellitus",
      "concept_code": "E11",
      "vocabulary_id": "ICD10CM",
      "vocabulary_name": "ICD10CM",
      "domain_id": "Condition",
      "concept_class_id": "ICD10 code",
      "standard_concept": null,
      "relationship_id": "Maps to",
      "relationship_name": "Maps to",
      "relationship_score": 0.92,
      "relationship_distance": 1
    }
  ],
  "meta": {
    "request_id": "req_related_123",
    "timestamp": "2024-12-22T10:00:00Z",
    "vocab_release": "2025.1"
  }
}
```

## Usage Examples

### Basic Related Concepts

Find general related concepts:

```bash theme={null}
curl -X GET "https://api.omophub.com/v1/concepts/201826/related" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

### High-Score Relationships

Get only strongly related concepts:

```bash theme={null}
curl -X GET "https://api.omophub.com/v1/concepts/201826/related?min_score=0.7&page_size=10" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

### Filtered by Relationship Type

Find specific relationship types:

```bash theme={null}
curl -X GET "https://api.omophub.com/v1/concepts/201826/related?relationship_types=Is%20a,Maps%20to" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

## Important Notes

* **Score interpretation** - Scores above 0.7 indicate strong relationships, 0.4-0.7 moderate, below 0.4 weak
* **Distance interpretation** - Distance of 1 means direct relationship, higher values indicate indirect connections
* **Performance** - Results are cached for improved response times on repeated queries

## Related Endpoints

* [Get Concept Relationships](https://docs.omophub.com/api-reference/relationships/get-concept-relationships.md) - Get all direct relationships
* [Traverse Relationships](https://docs.omophub.com/api-reference/concepts/traverse-relationships.md) - Complex relationship traversals


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.