> ## 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 Statistics

> Retrieve comprehensive statistics for a specific OMOP vocabulary including concept counts, standard concept coverage, and domain distribution breakdown.

Retrieve detailed statistical information about a vocabulary, including the total number of concepts, breakdown by standard/classification status, and domain distribution.

## Path Parameters

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

## Query Parameters

<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">
  <Expandable title="Statistics Object">
    <ResponseField name="vocabulary_id" type="string">
      The vocabulary identifier.
    </ResponseField>

    <ResponseField name="vocabulary_name" type="string">
      Full vocabulary name.
    </ResponseField>

    <ResponseField name="total_concepts" type="integer">
      Total number of concepts in the vocabulary.
    </ResponseField>

    <ResponseField name="standard_concepts" type="integer">
      Number of standard concepts (standard\_concept = 'S').
    </ResponseField>

    <ResponseField name="classification_concepts" type="integer">
      Number of classification concepts (standard\_concept = 'C').
    </ResponseField>

    <ResponseField name="invalid_concepts" type="integer">
      Number of invalid/deprecated concepts.
    </ResponseField>

    <ResponseField name="active_concepts" type="integer">
      Number of currently active concepts.
    </ResponseField>

    <ResponseField name="valid_start_date" type="string">
      Earliest valid start date among concepts.
    </ResponseField>

    <ResponseField name="valid_end_date" type="string">
      Latest valid end date among concepts.
    </ResponseField>

    <ResponseField name="last_updated" type="string">
      Timestamp of when statistics were last updated.
    </ResponseField>

    <ResponseField name="domain_distribution" type="array">
      Array of domain statistics.

      <Expandable title="Domain Stats">
        <ResponseField name="domain_id" type="string">
          Domain identifier.
        </ResponseField>

        <ResponseField name="domain_name" type="string">
          Domain name.
        </ResponseField>

        <ResponseField name="concept_count" type="integer">
          Number of concepts in this domain.
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="meta" type="object">
  <Expandable title="Metadata">
    <ResponseField name="request_id" type="string">
      Unique identifier for the request.
    </ResponseField>

    <ResponseField name="timestamp" type="string">
      Request timestamp.
    </ResponseField>

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

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

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

  response = requests.get(
      "https://api.omophub.com/v1/vocabularies/SNOMED/stats",
      headers={"Authorization": "Bearer YOUR_API_KEY"}
  )
  data = response.json()
  print(f"Total concepts: {data['data']['total_concepts']}")
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://api.omophub.com/v1/vocabularies/SNOMED/stats', {
    headers: {
      'Authorization': 'Bearer YOUR_API_KEY'
    }
  });
  const data = await response.json();
  console.log(`Total concepts: ${data.data.total_concepts}`);
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "success": true,
    "data": {
      "vocabulary_id": "SNOMED",
      "vocabulary_name": "Systematized Nomenclature of Medicine Clinical Terms",
      "total_concepts": 354652,
      "standard_concepts": 298456,
      "classification_concepts": 56196,
      "invalid_concepts": 12543,
      "active_concepts": 342109,
      "valid_start_date": "2002-01-31",
      "valid_end_date": "2099-12-31",
      "last_updated": "2025-01-05T10:30:00Z",
      "domain_distribution": [
        {
          "domain_id": "Condition",
          "domain_name": "Condition",
          "concept_count": 112543
        },
        {
          "domain_id": "Procedure",
          "domain_name": "Procedure",
          "concept_count": 87321
        },
        {
          "domain_id": "Observation",
          "domain_name": "Observation",
          "concept_count": 65432
        }
      ]
    },
    "meta": {
      "request_id": "req_abc123def456",
      "timestamp": "2025-01-05T10:30:00Z",
      "vocab_release": "2025.1"
    }
  }
  ```

  ```json Error Response theme={null}
  {
    "success": false,
    "error": {
      "code": "VOCABULARY_NOT_FOUND",
      "message": "Vocabulary 'INVALID_VOCAB' not found"
    },
    "meta": {
      "request_id": "req_error123",
      "timestamp": "2025-01-05T10:30:00Z"
    }
  }
  ```
</ResponseExample>

## Usage Examples

### Get Statistics for SNOMED

```bash theme={null}
GET /v1/vocabularies/SNOMED/stats
```

### Get Statistics for ICD-10-CM

```bash theme={null}
GET /v1/vocabularies/ICD10CM/stats
```

### Get Statistics for a Specific Release

```bash theme={null}
GET /v1/vocabularies/SNOMED/stats?vocab_release=2025.1
```

## Related Endpoints

* [List Vocabularies](/api-reference/vocabularies/list-vocabularies) - Get all available vocabularies
* [Get Vocabulary Details](/api-reference/vocabularies/get-vocabulary) - Get detailed vocabulary information
* [Get Vocabulary Concepts](/api-reference/vocabularies/get-vocabulary-concepts) - Get concepts within a vocabulary
