> ## 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 Vocabulary Concepts

> Get concepts within a specific OMOP vocabulary with pagination - browse SNOMED, ICD-10, LOINC, RxNorm, or any of 100+ vocabulary code lists.

Retrieve concepts that belong to a specific vocabulary with optional filtering and pagination.

## Path Parameters

<ParamField path="vocabularyId" type="string" required>
  The vocabulary identifier (e.g., "SNOMED", "ICD10CM", "LOINC", "RxNorm").
</ParamField>

## Query Parameters

<ParamField query="search" type="string" optional>
  Search term to filter concepts by name or code.
</ParamField>

<ParamField query="page" type="integer" optional default="1">
  Page number for pagination (1-based, max 1000). For large vocabularies, use the `search` parameter to filter results instead of deep pagination.
</ParamField>

<ParamField query="page_size" type="integer" optional default="20">
  Number of concepts per page (max 1000).
</ParamField>

<ParamField query="standard_concept" type="string" optional default="all">
  Filter by standard concept status. Options: `S` (standard), `C` (classification), `all`.
</ParamField>

<ParamField query="include_invalid" type="boolean" optional default="true">
  Include invalid or deprecated concepts.
</ParamField>

<ParamField query="include_relationships" type="boolean" optional default="false">
  Include concept relationships in response.
</ParamField>

<ParamField query="include_synonyms" type="boolean" optional default="false">
  Include concept synonyms in response.
</ParamField>

<ParamField query="sort_by" type="string" optional default="name">
  Sort field. Options: `name`, `concept_id`, `concept_code`.
</ParamField>

<ParamField query="sort_order" type="string" optional default="asc">
  Sort order. Options: `asc`, `desc`.
</ParamField>

<ParamField query="vocab_release" type="string" optional>
  Specific vocabulary release version to query

  <br />

  **Example:** `2025.1`
</ParamField>

## Response

<ResponseField name="success" type="boolean">
  Indicates if the request was successful.
</ResponseField>

<ResponseField name="data" type="object">
  Response data container.

  <Expandable title="Data Object">
    <ResponseField name="concepts" type="array">
      Array of concept objects.

      <Expandable title="Concept Object">
        <ResponseField name="concept_id" type="integer">
          Unique concept identifier.
        </ResponseField>

        <ResponseField name="concept_name" type="string">
          Standard name of the concept.
        </ResponseField>

        <ResponseField name="concept_code" type="string">
          Original code from the vocabulary.
        </ResponseField>

        <ResponseField name="vocabulary_id" type="string">
          Vocabulary containing this concept.
        </ResponseField>

        <ResponseField name="domain_id" type="string">
          Domain of the concept.
        </ResponseField>

        <ResponseField name="concept_class_id" type="string">
          Concept class identifier.
        </ResponseField>

        <ResponseField name="standard_concept" type="string|null">
          Standard concept designation ('S', 'C', or null).
        </ResponseField>

        <ResponseField name="invalid_reason" type="string|null">
          Reason for invalidation if applicable.
        </ResponseField>

        <ResponseField name="valid_start_date" type="string">
          Date when concept became valid.
        </ResponseField>

        <ResponseField name="valid_end_date" type="string">
          Date when concept becomes invalid.
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="meta" type="object">
  Response metadata.

  <Expandable title="Metadata Object">
    <ResponseField name="request_id" type="string">
      Unique identifier for this request.
    </ResponseField>

    <ResponseField name="vocab_release" type="string">
      Vocabulary release version used.
    </ResponseField>

    <ResponseField name="timestamp" type="string">
      Response timestamp (ISO format).
    </ResponseField>

    <ResponseField name="pagination" type="object">
      <ResponseField name="page" type="integer">Current page number.</ResponseField>
      <ResponseField name="page_size" type="integer">Items per page.</ResponseField>
      <ResponseField name="total_items" type="integer">Total concepts available.</ResponseField>
      <ResponseField name="total_pages" type="integer">Total number of pages.</ResponseField>
      <ResponseField name="has_next" type="boolean">Whether next page exists.</ResponseField>
      <ResponseField name="has_previous" type="boolean">Whether previous page exists.</ResponseField>
    </ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X GET "https://api.omophub.com/v1/vocabularies/SNOMED/concepts?page_size=10" \
    -H "Authorization: Bearer YOUR_API_KEY"
  ```

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

  response = requests.get(
      "https://api.omophub.com/v1/vocabularies/SNOMED/concepts",
      params={"page_size": 10, "standard_concept": "S"},
      headers={"Authorization": "Bearer YOUR_API_KEY"}
  )
  data = response.json()
  for concept in data["data"]["concepts"]:
      print(f"{concept['concept_name']}: {concept['concept_id']}")
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    'https://api.omophub.com/v1/vocabularies/SNOMED/concepts?page_size=10&standard_concept=S',
    {
      headers: {
        'Authorization': 'Bearer YOUR_API_KEY'
      }
    }
  );
  const data = await response.json();
  console.log(`Found ${data.meta.pagination.total_items} concepts`);
  ```

  ```bash cURL (with search) theme={null}
  curl -X GET "https://api.omophub.com/v1/vocabularies/SNOMED/concepts?search=diabetes&standard_concept=S&page_size=20" \
    -H "Authorization: Bearer YOUR_API_KEY"
  ```
</RequestExample>

<ResponseExample>
  ```json theme={null}
  {
    "success": true,
    "data": {
      "concepts": [
        {
          "concept_id": 201826,
          "concept_name": "Type 2 diabetes mellitus",
          "concept_code": "44054006",
          "vocabulary_id": "SNOMED",
          "domain_id": "Condition",
          "concept_class_id": "Clinical Finding",
          "standard_concept": "S",
          "invalid_reason": null,
          "valid_start_date": "2002-01-31",
          "valid_end_date": "2099-12-31"
        },
        {
          "concept_id": 201254,
          "concept_name": "Hypertensive disorder",
          "concept_code": "38341003",
          "vocabulary_id": "SNOMED",
          "domain_id": "Condition",
          "concept_class_id": "Clinical Finding",
          "standard_concept": "S",
          "invalid_reason": null,
          "valid_start_date": "2002-01-31",
          "valid_end_date": "2099-12-31"
        }
      ]
    },
    "meta": {
      "request_id": "req_abc123",
      "vocab_release": "2025.1",
      "timestamp": "2025-01-05T10:00:00Z",
      "pagination": {
        "page": 1,
        "page_size": 10,
        "total_items": 125847,
        "total_pages": 12585,
        "has_next": true,
        "has_previous": false
      }
    }
  }
  ```
</ResponseExample>

## Usage Examples

### Basic List

Get concepts from a vocabulary:

```bash theme={null}
GET /v1/vocabularies/SNOMED/concepts?page_size=50
```

### Search Within Vocabulary

Search for concepts by name:

```bash theme={null}
GET /v1/vocabularies/SNOMED/concepts?search=diabetes&standard_concept=S
```

### With Sorting

Sort by concept name descending:

```bash theme={null}
GET /v1/vocabularies/RxNorm/concepts?sort_by=name&sort_order=desc
```

### Include Additional Data

Include relationships and synonyms:

```bash theme={null}
GET /v1/vocabularies/SNOMED/concepts?include_relationships=true&include_synonyms=true
```

## Related Endpoints

* [List Vocabularies](/api-reference/vocabularies/list-vocabularies) - Get all vocabularies
* [Get Vocabulary](/api-reference/vocabularies/get-vocabulary) - Get vocabulary details
* [Get Concept](/api-reference/concepts/get-concept) - Get individual concept details
