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

# Find programs similar to a program

> Return the pipeline programs most similar to the given program, ranked by similarity. Useful for finding competitive or analogous assets. Returns `404 not_found` if the source program id is unknown.



## OpenAPI

````yaml /openapi.json get /v1/programs/{program_id}/similar-programs
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/{program_id}/similar-programs:
    get:
      tags:
        - programs
      summary: Find programs similar to a program
      description: >-
        Return the pipeline programs most similar to the given program, ranked
        by similarity. Useful for finding competitive or analogous assets.
        Returns `404 not_found` if the source program id is unknown.
      operationId: get_similar_programs
      parameters:
        - name: program_id
          in: path
          required: true
          schema:
            type: integer
            description: Durable Pav program id to find neighbors for.
            examples:
              - 18342
            title: Program Id
          description: Durable Pav program id to find neighbors for.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimilarProgramsResponse'
        '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:
    SimilarProgramsResponse:
      properties:
        program_id:
          type: integer
          title: Program Id
          description: The program the similar set was computed for.
          examples:
            - 18342
        data:
          items:
            $ref: '#/components/schemas/Program'
          type: array
          title: Data
          description: Programs most similar to the source program, ranked by similarity.
      type: object
      required:
        - program_id
        - data
      title: SimilarProgramsResponse
    ErrorEnvelope:
      properties:
        error:
          $ref: '#/components/schemas/ErrorBody'
          description: Error detail. Present only on 4xx/5xx responses.
      required:
        - error
      title: ErrorEnvelope
      type: object
    Program:
      properties:
        id:
          type: integer
          title: Id
          description: >-
            Durable Pav program identifier. Stable over time and kept when a
            program is discontinued, so a stored id keeps working.
          examples:
            - 18342
        status:
          type: string
          title: Status
          description: >-
            Lifecycle state of the program: `active` while the company still
            publishes it, or `discontinued` once it drops off the pipeline. List
            and search endpoints return only `active` programs; a single-program
            lookup by id still returns a `discontinued` one.
          default: active
          examples:
            - active
        company_id:
          type: integer
          title: Company Id
          description: Pav company identifier that owns this program.
          examples:
            - 412
        short_name:
          type: string
          title: Short Name
          description: Company slug, a stable readable identifier.
          examples:
            - pfizer
        company:
          type: string
          title: Company
          description: Display name of the company that owns this program.
          examples:
            - Pfizer
        drug:
          type: string
          title: Drug
          description: Drug or asset name for the program.
          examples:
            - Danuglipron
        indication:
          anyOf:
            - type: string
            - type: 'null'
          title: Indication
          description: Indication the program targets, as published by the company.
          examples:
            - Type 2 Diabetes
        phase:
          anyOf:
            - type: string
            - type: 'null'
          title: Phase
          description: Development phase as published by the company (raw label).
          examples:
            - Phase 2
        phase_norm:
          anyOf:
            - type: string
            - type: 'null'
          title: Phase Norm
          description: Phase normalized to Pav's phase vocabulary (e.g. `Phase 2`).
          examples:
            - Phase 2
        modality:
          anyOf:
            - type: string
            - type: 'null'
          title: Modality
          description: Drug modality as published by the company (raw label).
          examples:
            - Small molecule
        modality_norm:
          anyOf:
            - type: string
            - type: 'null'
          title: Modality Norm
          description: >-
            Modality normalized to Pav's modality vocabulary. Null when the
            modality is not known.
          examples:
            - small_molecule
        target:
          anyOf:
            - type: string
            - type: 'null'
          title: Target
          description: >-
            Molecular target of the asset. Coverage is partial — many programs
            have no published target and this field is null for them.
          examples:
            - GLP-1R
        mechanism_of_action:
          anyOf:
            - type: string
            - type: 'null'
          title: Mechanism Of Action
          description: Mechanism of action for the asset.
          examples:
            - GLP-1 receptor agonist
        territory:
          anyOf:
            - type: string
            - type: 'null'
          title: Territory
          description: Territory/region the program applies to, when disclosed.
          examples:
            - United States
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: Free-text program description, when published.
          examples:
            - Oral GLP-1 receptor agonist for type 2 diabetes and obesity.
        notes:
          anyOf:
            - type: string
            - type: 'null'
          title: Notes
          description: Additional program notes from the source.
          examples:
            - Phase 2b dose-finding study ongoing.
        partners:
          items: {}
          type: array
          title: Partners
          description: Collaboration/partnership entries associated with the program.
        clinical_trials:
          items:
            $ref: '#/components/schemas/ClinicalTrial'
          type: array
          title: Clinical Trials
          description: Clinical trials linked to this program.
        indication_terms:
          items:
            $ref: '#/components/schemas/IndicationTerm'
          type: array
          title: Indication Terms
          description: Ontology (MONDO) terms mapped from the program's indication.
        target_terms:
          items:
            $ref: '#/components/schemas/TargetTerm'
          type: array
          title: Target Terms
          description: Ontology (NCIT/HGNC) terms mapped from the program's target.
        source_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Source Url
          description: URL of the company page the program was read from.
          examples:
            - https://www.pfizer.com/science/drug-product-pipeline
        source_checked_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Source Checked At
          description: When Pav last read the source page (UTC).
          examples:
            - '2026-06-19T04:12:00Z'
      type: object
      required:
        - id
        - company_id
        - short_name
        - company
        - drug
      title: Program
    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
    ClinicalTrial:
      properties:
        nct_id:
          type: string
          title: Nct Id
          description: ClinicalTrials.gov registry identifier (NCT number).
          examples:
            - NCT04368728
        nct_url:
          type: string
          title: Nct Url
          description: ClinicalTrials.gov URL for the trial record.
          examples:
            - https://clinicaltrials.gov/study/NCT04368728
        nct_phase:
          anyOf:
            - type: string
            - type: 'null'
          title: Nct Phase
          description: Trial phase as reported by ClinicalTrials.gov.
          examples:
            - Phase 3
        nct_sponsor:
          anyOf:
            - type: string
            - type: 'null'
          title: Nct Sponsor
          description: Lead sponsor of the trial as reported by ClinicalTrials.gov.
          examples:
            - Pfizer
        nct_conditions:
          anyOf:
            - type: string
            - type: 'null'
          title: Nct Conditions
          description: Pipe-delimited conditions/indications studied in the trial.
          examples:
            - COVID-19|SARS-CoV-2 Infection
        nct_status:
          anyOf:
            - type: string
            - type: 'null'
          title: Nct Status
          description: Overall recruitment/operational status of the trial.
          examples:
            - Completed
      type: object
      required:
        - nct_id
        - nct_url
      title: ClinicalTrial
    IndicationTerm:
      properties:
        ontology:
          type: string
          title: Ontology
          description: Ontology of the indication term (e.g. MONDO).
          examples:
            - MONDO
        term_id:
          type: string
          title: Term Id
          description: Ontology term identifier.
          examples:
            - MONDO:0005148
        term_label:
          type: string
          title: Term Label
          description: Human-readable ontology term label.
          examples:
            - type 2 diabetes mellitus
        source_text:
          anyOf:
            - type: string
            - type: 'null'
          title: Source Text
          description: Indication text the term was mapped from.
          examples:
            - Type 2 Diabetes
      type: object
      required:
        - ontology
        - term_id
        - term_label
      title: IndicationTerm
    TargetTerm:
      properties:
        ontology:
          type: string
          title: Ontology
          description: Ontology of the target term (NCIT or HGNC).
          examples:
            - NCIT
            - HGNC
        term_id:
          type: string
          title: Term Id
          description: Ontology term identifier.
          examples:
            - NCIT:C1110
            - hgnc:9602
        term_label:
          type: string
          title: Term Label
          description: Human-readable ontology term label.
          examples:
            - Ganglioside GD2
        source_text:
          anyOf:
            - type: string
            - type: 'null'
          title: Source Text
          description: Target text the term was mapped from.
          examples:
            - GD2
      type: object
      required:
        - ontology
        - term_id
        - term_label
      title: TargetTerm
  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

````