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

> Retrieve all OMOP concepts within a specific domain - Condition, Drug, Measurement, Procedure - with pagination for building domain-scoped concept sets.

This endpoint provides access to all medical concepts within a particular domain, such as all conditions, drugs, or procedures.

## Path Parameters

<ParamField path="domain_id" type="string" required>
  The domain identifier to retrieve concepts from.

  <br />

  **Example:** `Condition`, `Drug`, `Procedure`
</ParamField>

## Query Parameters

<ParamField query="vocabulary_ids" type="string" optional>
  Filter concepts to specific vocabularies within the domain (comma-separated).

  <br />

  **Example:** `SNOMED,ICD10CM`
</ParamField>

<ParamField query="standard_only" type="boolean" optional default="false">
  Return only standard concepts (standard\_concept = 'S').
</ParamField>

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

<ParamField query="page" type="integer" optional default="1">
  Page number for pagination (1-based).
</ParamField>

<ParamField query="page_size" type="integer" optional default="20">
  Number of concepts to return per page (max 1000).
</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 within the domain.

      <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="vocabulary_name" type="string">
          Human-readable vocabulary name.
        </ResponseField>

        <ResponseField name="domain_id" type="string">
          Domain identifier.
        </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="valid_start_date" type="string">
          Date when concept became valid (ISO format).
        </ResponseField>

        <ResponseField name="valid_end_date" type="string">
          Date when concept becomes invalid (ISO format).
        </ResponseField>

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

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

  <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 matching filters.</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/domains/Condition/concepts?vocabulary_ids=SNOMED&standard_only=true&page_size=50" \
    -H "Authorization: Bearer YOUR_API_KEY"
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    'https://api.omophub.com/v1/domains/Condition/concepts?vocabulary_ids=SNOMED&standard_only=true&page_size=50',
    {
      headers: {
        'Authorization': 'Bearer YOUR_API_KEY'
      }
    }
  );

  const data = await response.json();
  console.log(`Found ${data.meta.pagination.total_items} concepts`);

  data.data.concepts.forEach(concept => {
    console.log(`${concept.concept_name} (${concept.concept_id})`);
  });
  ```

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

  response = requests.get(
      "https://api.omophub.com/v1/domains/Drug/concepts",
      params={
          "vocabulary_ids": "RxNorm",
          "standard_only": True,
          "page_size": 100
      },
      headers={"Authorization": "Bearer YOUR_API_KEY"}
  )

  data = response.json()
  for concept in data["data"]["concepts"]:
      print(f"{concept['concept_name']} ({concept['concept_id']})")
  ```
</RequestExample>

<ResponseExample>
  ```json theme={null}
  {
    "success": true,
    "data": {
      "concepts": [
        {
          "concept_id": 201826,
          "concept_name": "Type 2 diabetes mellitus",
          "concept_code": "44054006",
          "vocabulary_id": "SNOMED",
          "vocabulary_name": "Systematized Nomenclature of Medicine Clinical Terms",
          "domain_id": "Condition",
          "concept_class_id": "Clinical Finding",
          "standard_concept": "S",
          "valid_start_date": "1970-01-01",
          "valid_end_date": "2099-12-31",
          "invalid_reason": null
        },
        {
          "concept_id": 46635009,
          "concept_name": "Type 1 diabetes mellitus",
          "concept_code": "46635009",
          "vocabulary_id": "SNOMED",
          "vocabulary_name": "Systematized Nomenclature of Medicine Clinical Terms",
          "domain_id": "Condition",
          "concept_class_id": "Clinical Finding",
          "standard_concept": "S",
          "valid_start_date": "1970-01-01",
          "valid_end_date": "2099-12-31",
          "invalid_reason": null
        }
      ]
    },
    "meta": {
      "request_id": "req_abc123",
      "vocab_release": "2025.1",
      "timestamp": "2025-01-05T10:00:00Z",
      "pagination": {
        "page": 1,
        "page_size": 50,
        "total_items": 847,
        "total_pages": 17,
        "has_next": true,
        "has_previous": false
      }
    }
  }
  ```
</ResponseExample>

## Usage Examples

### All Concepts in a Domain

Get all concepts within the Condition domain:

```bash theme={null}
GET /v1/domains/Condition/concepts?page_size=100
```

### Standard Concepts Only

Get only standard concepts from a specific vocabulary:

```bash theme={null}
GET /v1/domains/Drug/concepts?standard_only=true&vocabulary_ids=RxNorm
```

### Filter by Multiple Vocabularies

Get concepts from multiple vocabularies:

```bash theme={null}
GET /v1/domains/Procedure/concepts?vocabulary_ids=SNOMED,HCPCS
```

### Include Invalid Concepts

Include deprecated concepts in results:

```bash theme={null}
GET /v1/domains/Condition/concepts?include_invalid=true
```

## Related Endpoints

* [Get Domains](/api-reference/domains/get-domains) - Available domain list
* [Get Concept Details](/api-reference/concepts/get-concept-details) - Individual concept information
* [Search Concepts](/api-reference/search/basic-search) - Cross-domain concept search

## Notes

* Domain queries can return large result sets - use pagination appropriately
* Standard concepts (S) are preferred for most clinical applications
* Default page size is 20, maximum is 1000
* Results are not sorted by default
