United States National Library of Medicine Studies API

Clinical trial study search and retrieval

OpenAPI Specification

united-states-national-library-of-medicine-studies-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: NCBI URL BLAST Studies API
  description: 'The NCBI BLAST URL API allows developers to submit BLAST (Basic Local Alignment Search Tool) sequence searches for processing at NCBI using HTTPS. The API operates in three phases: (1) PUT request to submit a search and receive a request ID (RID), (2) polling GET requests to check search status, (3) GET request to retrieve results in the desired format. Supports nucleotide (blastn, blastx) and protein (blastp, tblastn, tblastx) searches.'
  version: 1.0.0
  contact:
    name: NCBI BLAST
    url: https://blast.ncbi.nlm.nih.gov/doc/blast-help/developerinfo.html
  license:
    name: Public Domain
    url: https://www.usa.gov/government-works
servers:
- url: https://blast.ncbi.nlm.nih.gov/blast
  description: NCBI BLAST Server
tags:
- name: Studies
  description: Clinical trial study search and retrieval
paths:
  /studies:
    get:
      operationId: searchStudies
      summary: Search Clinical Trial Studies
      description: Search and filter clinical trials registered on ClinicalTrials.gov. Supports full-text search, filtering by status, phase, condition, intervention type, sponsor, location, and more. Returns paginated results.
      tags:
      - Studies
      parameters:
      - name: query.term
        in: query
        description: Full-text search query term
        required: false
        schema:
          type: string
        example: diabetes type 2
      - name: query.cond
        in: query
        description: Condition or disease filter
        required: false
        schema:
          type: string
        example: Type 2 Diabetes
      - name: query.intr
        in: query
        description: Intervention or treatment filter
        required: false
        schema:
          type: string
        example: metformin
      - name: query.spons
        in: query
        description: Sponsor or collaborator filter
        required: false
        schema:
          type: string
      - name: query.lead
        in: query
        description: Lead sponsor filter
        required: false
        schema:
          type: string
      - name: filter.overallStatus
        in: query
        description: Trial overall status filter
        required: false
        schema:
          type: array
          items:
            type: string
            enum:
            - RECRUITING
            - ACTIVE_NOT_RECRUITING
            - COMPLETED
            - ENROLLING_BY_INVITATION
            - NOT_YET_RECRUITING
            - SUSPENDED
            - TERMINATED
            - WITHDRAWN
            - AVAILABLE
            - NO_LONGER_AVAILABLE
            - TEMPORARILY_NOT_AVAILABLE
            - APPROVED_FOR_MARKETING
            - WITHHELD
            - UNKNOWN
        style: form
        explode: true
      - name: filter.phase
        in: query
        description: Clinical trial phase filter
        required: false
        schema:
          type: array
          items:
            type: string
            enum:
            - EARLY_PHASE1
            - PHASE1
            - PHASE2
            - PHASE3
            - PHASE4
            - NA
        style: form
        explode: true
      - name: filter.studyType
        in: query
        description: Study type filter
        required: false
        schema:
          type: string
          enum:
          - INTERVENTIONAL
          - OBSERVATIONAL
          - EXPANDED_ACCESS
      - name: filter.advanced
        in: query
        description: Advanced filter using Essie expression syntax
        required: false
        schema:
          type: string
      - name: pageSize
        in: query
        description: Number of results per page (max 1000)
        required: false
        schema:
          type: integer
          default: 10
          maximum: 1000
      - name: pageToken
        in: query
        description: Token for fetching the next page of results
        required: false
        schema:
          type: string
      - name: fields
        in: query
        description: Comma-separated list of fields to return
        required: false
        schema:
          type: string
      - name: sort
        in: query
        description: Sort order (e.g. @relevance, LastUpdatePostDate:desc)
        required: false
        schema:
          type: string
      - name: format
        in: query
        description: Response format
        required: false
        schema:
          type: string
          enum:
          - json
          - csv
          default: json
      responses:
        '200':
          description: Paginated clinical trial search results
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StudySearchResponse'
        '400':
          description: Invalid query parameters
  /studies/{nctId}:
    get:
      operationId: getStudy
      summary: Get Study by NCT ID
      description: Retrieve complete study information for a specific clinical trial by its NCT (ClinicalTrials.gov) identifier.
      tags:
      - Studies
      parameters:
      - name: nctId
        in: path
        description: ClinicalTrials.gov NCT identifier (e.g. NCT04000009)
        required: true
        schema:
          type: string
          pattern: ^NCT[0-9]{8}$
        example: NCT04000009
      - name: fields
        in: query
        description: Comma-separated list of fields to return
        required: false
        schema:
          type: string
      - name: format
        in: query
        required: false
        schema:
          type: string
          default: json
      responses:
        '200':
          description: Complete clinical trial study record
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Study'
        '404':
          description: Study not found
components:
  schemas:
    StudySearchResponse:
      type: object
      description: Paginated search results
      properties:
        studies:
          type: array
          items:
            $ref: '#/components/schemas/Study'
        nextPageToken:
          type: string
          description: Token for requesting the next page
        totalCount:
          type: integer
          description: Total number of matching studies
    ProtocolSection:
      type: object
      description: Protocol information for a clinical trial
      properties:
        identificationModule:
          type: object
          properties:
            nctId:
              type: string
              description: ClinicalTrials.gov identifier
            orgStudyIdInfo:
              type: object
            briefTitle:
              type: string
            officialTitle:
              type: string
        statusModule:
          type: object
          properties:
            overallStatus:
              type: string
            startDateStruct:
              type: object
            primaryCompletionDateStruct:
              type: object
            completionDateStruct:
              type: object
        sponsorCollaboratorsModule:
          type: object
          properties:
            leadSponsor:
              type: object
              properties:
                name:
                  type: string
                class:
                  type: string
        descriptionModule:
          type: object
          properties:
            briefSummary:
              type: string
            detailedDescription:
              type: string
        conditionsModule:
          type: object
          properties:
            conditions:
              type: array
              items:
                type: string
            keywords:
              type: array
              items:
                type: string
        designModule:
          type: object
          properties:
            studyType:
              type: string
            phases:
              type: array
              items:
                type: string
            designInfo:
              type: object
        eligibilityModule:
          type: object
          properties:
            eligibilityCriteria:
              type: string
            healthyVolunteers:
              type: string
            sex:
              type: string
            minimumAge:
              type: string
            maximumAge:
              type: string
        contactsLocationsModule:
          type: object
          properties:
            locations:
              type: array
              items:
                type: object
                properties:
                  facility:
                    type: string
                  city:
                    type: string
                  state:
                    type: string
                  country:
                    type: string
                  status:
                    type: string
        armsInterventionsModule:
          type: object
          properties:
            interventions:
              type: array
              items:
                type: object
                properties:
                  type:
                    type: string
                  name:
                    type: string
                  description:
                    type: string
    Study:
      type: object
      description: A clinical trial study record from ClinicalTrials.gov
      properties:
        protocolSection:
          $ref: '#/components/schemas/ProtocolSection'
        resultsSection:
          type: object
          description: Clinical trial results (if available)
        derivedSection:
          type: object
          description: Derived and computed fields