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

# Get dataset stats

> Counts of active programs and companies, by phase and by modality.



## OpenAPI

````yaml /openapi.json get /v1/stats
openapi: 3.1.0
info:
  title: Pav Enterprise API
  description: >-
    Read-only API over Pav's biopharma data: programs, drugs, companies, trials,
    deals, patents, FDA records and changes. Send `Authorization: Bearer
    <api_key>`. Lists return `{data, next_cursor, total}`; errors return
    `{error: {code, message, request_id}}`. Parameter rules:
    [Conventions](https://docs.pav.bio/conventions).
  version: 2.0.0
servers:
  - url: https://api.pav.bio
    description: Production
security: []
tags:
  - name: search
    description: Find the id of a company, drug, program, target or indication.
    x-group: Search
  - name: programs
    description: 'Drug programs: one drug in one indication at one company.'
    x-group: Programs
  - name: drugs
    description: >-
      One drug product across every company that develops it, under all its
      names, with its programs.
    x-group: Drugs
  - name: companies
    description: Biopharma companies, their owners and their trials.
    x-group: Companies
  - name: trials
    description: ClinicalTrials.gov trials linked to programs and companies.
    x-group: Trials
  - name: deals
    description: M&A, licensing and collaboration deals with terms and sources.
    x-group: Deals
  - name: patents
    description: US patent families with owners, members and term.
    x-group: Patents
  - name: fda
    description: FDA records, one endpoint per record type.
    x-group: FDA
  - name: changes
    description: Program and trial changes, newest first.
    x-group: Changes
  - name: stats
    description: Dataset counts.
    x-group: Stats
paths:
  /v1/stats:
    get:
      tags:
        - stats
      summary: Get dataset stats
      description: Counts of active programs and companies, by phase and by modality.
      operationId: get_stats
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Stats'
        '400':
          description: Invalid parameter (`validation_error`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '401':
          description: Missing or invalid API key (`unauthorized`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '404':
          description: Unknown id or route (`not_found`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '429':
          description: Rate limit exceeded (`rate_limited`); honor `Retry-After`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
      security:
        - EnterpriseApiKey: []
components:
  schemas:
    Stats:
      properties:
        assets:
          type: integer
          title: Assets
          description: Total number of pipeline programs tracked.
          examples:
            - 72690
        companies:
          type: integer
          title: Companies
          description: Total number of companies tracked.
          examples:
            - 8360
        distinct_phases:
          type: integer
          title: Distinct Phases
          description: Count of distinct normalized phases present.
          examples:
            - 7
        distinct_modalities:
          type: integer
          title: Distinct Modalities
          description: Count of distinct normalized modalities present.
          examples:
            - 24
        distinct_indications:
          type: integer
          title: Distinct Indications
          description: Count of distinct indications present.
          examples:
            - 4120
        by_phase:
          additionalProperties:
            type: integer
          type: object
          title: By Phase
          description: Program counts grouped by normalized phase.
          examples:
            - Approved: 1701
              Phase 1: 7315
              Phase 2: 6890
              Phase 3: 4954
        by_modality:
          additionalProperties:
            type: integer
          type: object
          title: By Modality
          description: Program counts grouped by normalized modality.
          examples:
            - antibody: 9821
              small_molecule: 21044
      type: object
      required:
        - assets
        - companies
        - distinct_phases
        - distinct_modalities
        - distinct_indications
        - by_phase
        - by_modality
      title: Stats
    ErrorEnvelope:
      properties:
        error:
          $ref: '#/components/schemas/ErrorBody'
          description: Error detail. Present only on 4xx/5xx responses.
      required:
        - error
      title: ErrorEnvelope
      type: object
    ErrorBody:
      properties:
        code:
          description: >-
            Stable, machine-readable error code (e.g. `unauthorized`,
            `not_found`, `validation_error`, `error`).
          examples:
            - not_found
          title: Code
          type: string
        message:
          description: Human-readable explanation of the error.
          examples:
            - program 999999 not found
          title: Message
          type: string
        request_id:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: >-
            Correlation id echoed in the `X-Request-ID` response header. Quote
            it when contacting Pav support about a failed request.
          examples:
            - 3f2b9c1d8a7e4f6b9c0d1e2f3a4b5c6d
          title: Request Id
      required:
        - code
        - message
      title: ErrorBody
      type: object
  securitySchemes:
    EnterpriseApiKey:
      type: http
      description: >-
        Use a personal or organization Pav API key from Pav developer settings.
        Send it as Authorization: Bearer <api_key>.
      scheme: bearer
      bearerFormat: Pav API key

````