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

# Search-as-you-type program suggestions

> Type-ahead suggestions for a program search box. Given a partial `q=` and optional active filters, runs the same search as `GET /v1/programs` and returns the top matching programs (company, drug, indication) — not facet values. Select one and filter by its `company_id`, or submit `q=` to `GET /v1/programs` for the full page.



## OpenAPI

````yaml /openapi.json get /v1/programs/autocomplete
openapi: 3.1.0
info:
  title: Pav Enterprise API
  description: >-
    Read-only `/v1` API over Pav's biopharma dataset: drug programs, companies,
    clinical trials, deals, patent families, FDA records, a change feed, and
    dataset stats.


    Authenticate every request with a Pav API key as a bearer token:
    `Authorization: Bearer <api_key>`. Mint a key in [Pav developer
    settings](https://app.pav.bio/settings/developer).


    All endpoints are `GET` and return JSON. List endpoints return a `{ data,
    pagination }` envelope. Pass `q=` to run relevance-ranked search that
    matches meaning as well as exact words; omit it for a filtered, paginated
    listing. Errors return `{ error: { code, message, request_id } }`.
  version: 1.2.0
servers:
  - url: https://api.pav.bio
    description: Production
  - url: /
    description: This server
security: []
tags:
  - name: programs
    description: >-
      Search and filter drug pipeline assets by company, indication, target,
      modality, phase, or free text. Includes get-by-id, similar-programs, and
      facet autocomplete.
  - name: companies
    description: >-
      Tracked biopharma companies and their pipeline ownership. List a company's
      programs and change history.
  - name: trials
    description: >-
      Search clinical trials — ClinicalTrials.gov records plus Pav
      program/company links. Relevance-ranked search when `q=` is set; filtered
      browse otherwise.
  - name: deals
    description: >-
      Biopharma deals (M&A, licensing, collaborations, options, joint ventures)
      from SEC filings and press releases, with lifecycle state, headline
      economics, and source documents.
  - name: patents
    description: >-
      US patent families from USPTO with owners linked to Pav companies, member
      applications, ownership history, and statutory term.
  - name: fda
    description: >-
      FDA records with applicants linked to Pav companies: Orange Book products,
      patents and exclusivities, Purple Book biologics, orphan designations,
      warning letters, and recalls.
  - name: changes
    description: >-
      Detected pipeline movement events per company — added and removed assets
      and phase changes — with before/after phase and detection time.
  - name: stats
    description: High-level dataset counts and facet coverage.
paths:
  /v1/programs/autocomplete:
    get:
      tags:
        - programs
      summary: Search-as-you-type program suggestions
      description: >-
        Type-ahead suggestions for a program search box. Given a partial `q=`
        and optional active filters, runs the same search as `GET /v1/programs`
        and returns the top matching programs (company, drug, indication) — not
        facet values. Select one and filter by its `company_id`, or submit `q=`
        to `GET /v1/programs` for the full page.
      operationId: autocomplete_programs
      parameters:
        - name: q
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Partial text to search programs by.
            examples:
              - oral GLP-1 obesity
            title: Q
          description: Partial text to search programs by.
        - name: phase
          in: query
          required: false
          schema:
            anyOf:
              - items:
                  type: string
                type: array
              - type: 'null'
            description: Restrict suggestions to programs in these phases. Repeatable.
            examples:
              - Phase 2
            title: Phase
          description: Restrict suggestions to programs in these phases. Repeatable.
        - name: modality
          in: query
          required: false
          schema:
            anyOf:
              - items:
                  type: string
                type: array
              - type: 'null'
            description: >-
              Restrict to these modalities (modality token or display label).
              Repeatable.
            examples:
              - small_molecule
            title: Modality
          description: >-
            Restrict to these modalities (modality token or display label).
            Repeatable.
        - name: company
          in: query
          required: false
          schema:
            anyOf:
              - items:
                  type: string
                type: array
              - type: 'null'
            description: Restrict to these company slugs. Repeatable.
            examples:
              - pfizer
            title: Company
          description: Restrict to these company slugs. Repeatable.
        - name: drug
          in: query
          required: false
          schema:
            anyOf:
              - items:
                  type: string
                type: array
              - type: 'null'
            description: Restrict to these drug names. Repeatable.
            examples:
              - danuglipron
            title: Drug
          description: Restrict to these drug names. Repeatable.
        - name: indication
          in: query
          required: false
          schema:
            anyOf:
              - items:
                  type: string
                type: array
              - type: 'null'
            description: Restrict to these indications. Repeatable.
            examples:
              - type 2 diabetes
            title: Indication
          description: Restrict to these indications. Repeatable.
        - name: target
          in: query
          required: false
          schema:
            anyOf:
              - items:
                  type: string
                type: array
              - type: 'null'
            description: >-
              Restrict to these molecular targets. Repeatable. Target coverage
              is partial; filtering excludes programs with no published target.
            examples:
              - GLP-1R
            title: Target
          description: >-
            Restrict to these molecular targets. Repeatable. Target coverage is
            partial; filtering excludes programs with no published target.
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 25
            minimum: 1
            description: Maximum suggestions to return.
            examples:
              - 8
            default: 8
            title: Limit
          description: Maximum suggestions to return.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ProgramSuggestion'
                title: Response Autocomplete Programs
        '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'
        '422':
          description: Invalid parameter (`validation_error`).
          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:
    ProgramSuggestion:
      properties:
        id:
          type: integer
          title: Id
          description: Durable Program id.
          examples:
            - 6606
        company:
          type: string
          title: Company
          description: Company name.
          examples:
            - Pacira BioSciences
        short_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Short Name
          description: Company slug.
          examples:
            - pacira_biosciences
        company_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Company Id
          description: Stable company id — send back as a `company_id` filter.
          examples:
            - 816
        drug:
          type: string
          title: Drug
          description: Program / asset name.
          examples:
            - PCRX-2002
        indication:
          anyOf:
            - type: string
            - type: 'null'
          title: Indication
          description: Indication.
          examples:
            - Post-Surgical Pain
        target:
          anyOf:
            - type: string
            - type: 'null'
          title: Target
          description: Molecular target.
          examples:
            - NaV1.8
        phase_norm:
          anyOf:
            - type: string
            - type: 'null'
          title: Phase Norm
          description: Normalized development phase.
          examples:
            - Phase 2
        modality_norm:
          anyOf:
            - type: string
            - type: 'null'
          title: Modality Norm
          description: Normalized modality.
          examples:
            - small_molecule
      type: object
      required:
        - id
        - company
        - drug
      title: ProgramSuggestion
      description: >-
        One search-as-you-type suggestion: a concrete program, not a facet
        value.
    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

````