National Institutes of Health (NIH) Studies API

Related to clinical trial studies

OpenAPI Specification

nih-studies-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: ClinicalTrials.gov REST BioSample Studies API
  description: This API is made available to provide users meta data, statistics, and the most recent version of the clinical trials available on ClinicalTrials.gov.
  version: 2.0.5
servers:
- url: https://clinicaltrials.gov/api/v2
  description: This server
tags:
- name: Studies
  description: Related to clinical trial studies
paths:
  /studies:
    get:
      summary: Studies
      description: "Returns data of studies matching query and filter parameters. The studies are returned page by page.\nIf response contains `nextPageToken`, use its value in `pageToken` to get next page.\nThe last page will not contain `nextPageToken`. A page may have empty `studies` array.\nRequest for each subsequent page **must** have the same parameters as for the first page, except\n`countTotal`, `pageSize`, and `pageToken` parameters.\n\nIf neither queries nor filters are set, all studies will be returned.\nIf any query parameter contains only NCT IDs (comma- and/or space-separated), filters are ignored.\n\n`query.*` parameters are in [Essie expression syntax](/find-studies/constructing-complex-search-queries).\nThose parameters affect ranking of studies, if sorted by relevance. See `sort` parameter for details.\n\n`filter.*` and `postFilter.*` parameters have same effect as there is no aggregation calculation. \nBoth are available just to simplify applying parameters from search request.\nBoth do not affect ranking of studies.\n\nNote: When trying JSON format in your browser, do not set too large `pageSize` parameter, if `fields` is\nunlimited. That may return too much data for the browser to parse and render."
      tags:
      - Studies
      operationId: listStudies
      parameters:
      - name: format
        in: query
        description: 'Must be one of the following:

          * `csv`- return CSV table with one page of study data; first page will contain header with column names; available fields are listed on [CSV Download](/data-api/about-api/csv-download) page

          * `json`- return JSON with one page of study data; every study object is placed in a separate line; `markup` type fields format depends on `markupFormat` parameter'
        required: false
        schema:
          type: string
          enum:
          - csv
          - json
          default: json
      - name: markupFormat
        in: query
        description: 'Format of `markup` type fields:

          * `markdown`- [markdown](https://spec.commonmark.org/0.28/) format

          * `legacy`- compatible with classic PRS


          Applicable only to `json` format.'
        required: false
        schema:
          type: string
          enum:
          - markdown
          - legacy
          default: markdown
      - name: query.cond
        in: query
        description: '"Conditions or disease" query in [Essie expression syntax](/find-studies/constructing-complex-search-queries). See "ConditionSearch Area" on [Search Areas](/data-api/about-api/search-areas#ConditionSearch) for more details.'
        required: false
        schema:
          type: string
        examples:
          example1:
            value: lung cancer
          example2:
            value: (head OR neck) AND pain
      - name: query.term
        in: query
        description: '"Other terms" query in [Essie expression syntax](/find-studies/constructing-complex-search-queries). See "BasicSearch Area" on [Search Areas](/data-api/about-api/search-areas#BasicSearch) for more details.'
        required: false
        schema:
          type: string
        examples:
          example1:
            value: AREA[LastUpdatePostDate]RANGE[2023-01-15,MAX]
      - name: query.locn
        in: query
        description: '"Location terms" query in [Essie expression syntax](/find-studies/constructing-complex-search-queries). See "LocationSearch Area" on [Search Areas](/data-api/about-api/search-areas#LocationSearch) for more details.'
        required: false
        schema:
          type: string
      - name: query.titles
        in: query
        description: '"Title / acronym" query in [Essie expression syntax](/find-studies/constructing-complex-search-queries). See "TitleSearch Area" on [Search Areas](/data-api/about-api/search-areas#TitleSearch) for more details.'
        required: false
        schema:
          type: string
      - name: query.intr
        in: query
        description: '"Intervention / treatment" query in [Essie expression syntax](/find-studies/constructing-complex-search-queries). See "InterventionSearch Area" on [Search Areas](/data-api/about-api/search-areas#InterventionSearch) for more details.'
        required: false
        schema:
          type: string
      - name: query.outc
        in: query
        description: '"Outcome measure" query in [Essie expression syntax](/find-studies/constructing-complex-search-queries). See "OutcomeSearch Area" on [Search Areas](/data-api/about-api/search-areas#OutcomeSearch) for more details.'
        required: false
        schema:
          type: string
      - name: query.spons
        in: query
        description: '"Sponsor / collaborator" query in [Essie expression syntax](/find-studies/constructing-complex-search-queries). See "SponsorSearch Area" on [Search Areas](/data-api/about-api/search-areas#SponsorSearch) for more details.'
        required: false
        schema:
          type: string
      - name: query.lead
        in: query
        description: Searches in "LeadSponsorName" field. See [Study Data Structure](/data-api/about-api/study-data-structure#LeadSponsorName) for more details. The query is in [Essie expression syntax](/find-studies/constructing-complex-search-queries).
        required: false
        schema:
          type: string
      - name: query.id
        in: query
        description: '"Study IDs" query in [Essie expression syntax](/find-studies/constructing-complex-search-queries). See "IdSearch Area" on [Search Areas](/data-api/about-api/search-areas#IdSearch) for more details.'
        required: false
        schema:
          type: string
      - name: query.patient
        in: query
        description: See "PatientSearch Area" on [Search Areas](/data-api/about-api/search-areas#PatientSearch) for more details.
        required: false
        schema:
          type: string
      - name: filter.overallStatus
        in: query
        style: pipeDelimited
        explode: false
        description: Filter by comma- or pipe-separated list of statuses
        required: false
        schema:
          type: array
          items:
            $ref: '#/components/schemas/Status'
        examples:
          example1:
            value:
            - NOT_YET_RECRUITING
            - RECRUITING
          example2:
            value:
            - COMPLETED
      - name: filter.geo
        in: query
        description: 'Filter by geo-function. Currently only distance function is supported.

          Format: `distance(latitude,longitude,distance)`'
        required: false
        schema:
          type: string
          pattern: ^distance\(-?\d+(\.\d+)?,-?\d+(\.\d+)?,\d+(\.\d+)?(km|mi)?\)$
        examples:
          example1:
            value: distance(39.0035707,-77.1013313,50mi)
      - name: filter.ids
        in: query
        style: pipeDelimited
        explode: false
        description: 'Filter by comma- or pipe-separated list of NCT IDs (a.k.a. ClinicalTrials.gov identifiers).

          The provided IDs will be searched in [NCTId](data-api/about-api/study-data-structure#NCTId) and

          [NCTIdAlias](data-api/about-api/study-data-structure#NCTIdAlias) fields.'
        required: false
        schema:
          type: array
          items:
            type: string
            pattern: ^[Nn][Cc][Tt]0*[1-9]\d{0,7}$
        examples:
          example1:
            value:
            - NCT04852770
            - NCT01728545
            - NCT02109302
      - name: filter.advanced
        in: query
        description: Filter by query in [Essie expression syntax](/find-studies/constructing-complex-search-queries)
        required: false
        schema:
          type: string
        examples:
          example1:
            value: AREA[StartDate]2022
          example2:
            value: AREA[MinimumAge]RANGE[MIN, 16 years] AND AREA[MaximumAge]RANGE[16 years, MAX]
      - name: filter.synonyms
        in: query
        style: pipeDelimited
        explode: false
        description: Filter by comma- or pipe-separated list of `area`:`synonym_id` pairs
        required: false
        schema:
          type: array
          items:
            type: string
        examples:
          example1:
            value:
            - ConditionSearch:1651367
            - BasicSearch:2013558
      - name: postFilter.overallStatus
        in: query
        style: pipeDelimited
        explode: false
        description: Filter by comma- or pipe-separated list of statuses
        required: false
        schema:
          type: array
          items:
            $ref: '#/components/schemas/Status'
        examples:
          example1:
            value:
            - NOT_YET_RECRUITING
            - RECRUITING
          example2:
            value:
            - COMPLETED
      - name: postFilter.geo
        in: query
        description: 'Filter by geo-function. Currently only distance function is supported.

          Format: `distance(latitude,longitude,distance)`'
        required: false
        schema:
          type: string
          pattern: ^distance\(-?\d+(\.\d+)?,-?\d+(\.\d+)?,\d+(\.\d+)?(km|mi)?\)$
        examples:
          example1:
            value: distance(39.0035707,-77.1013313,50mi)
      - name: postFilter.ids
        in: query
        style: pipeDelimited
        explode: false
        description: 'Filter by comma- or pipe-separated list of NCT IDs (a.k.a. ClinicalTrials.gov identifiers).

          The provided IDs will be searched in [NCTId](data-api/about-api/study-data-structure#NCTId) and

          [NCTIdAlias](data-api/about-api/study-data-structure#NCTIdAlias) fields.'
        required: false
        schema:
          type: array
          items:
            type: string
            pattern: ^[Nn][Cc][Tt]0*[1-9]\d{0,7}$
        examples:
          example1:
            value:
            - NCT04852770
            - NCT01728545
            - NCT02109302
      - name: postFilter.advanced
        in: query
        description: Filter by query in [Essie expression syntax](/find-studies/constructing-complex-search-queries)
        required: false
        schema:
          type: string
        examples:
          example1:
            value: AREA[StartDate]2022
          example2:
            value: AREA[MinimumAge]RANGE[MIN, 16 years] AND AREA[MaximumAge]RANGE[16 years, MAX]
      - name: postFilter.synonyms
        in: query
        style: pipeDelimited
        explode: false
        description: Filter by comma- or pipe-separated list of `area`:`synonym_id` pairs
        required: false
        schema:
          type: array
          items:
            type: string
        examples:
          example1:
            value:
            - ConditionSearch:1651367
            - BasicSearch:2013558
      - name: aggFilters
        in: query
        description: 'Apply aggregation filters, aggregation counts will not be provided.

          The value is comma- or pipe-separated list of pairs `filter_id`:`space-separated list of option keys` for the checked options.'
        required: false
        schema:
          type: string
        examples:
          example1:
            value: results:with,status:com
          example2:
            value: status:not rec,sex:f,healthy:y
      - name: geoDecay
        in: query
        description: 'Set proximity factor by distance from `filter.geo` location to the closest [LocationGeoPoint](/data-api/about-api/study-data-structure#LocationGeoPoint) of a study.

          Ignored, if `filter.geo` parameter is not set or response contains more than 10,000 studies.'
        required: false
        schema:
          type: string
          pattern: ^func:(gauss|exp|linear),scale:(\d+(\.\d+)?(km|mi)),offset:(\d+(\.\d+)?(km|mi)),decay:(\d+(\.\d+)?)$
          default: func:exp,scale:300mi,offset:0mi,decay:0.5
        examples:
          example1:
            value: func:linear,scale:100km,offset:10km,decay:0.1
          example2:
            value: func:gauss,scale:500mi,offset:0mi,decay:0.3
      - name: fields
        in: query
        style: pipeDelimited
        explode: false
        description: 'If specified, must be non-empty comma- or pipe-separated list of fields to return. If unspecified, all fields will be returned.

          Order of the fields does not matter.


          For `csv` format, specify list of columns. The column names are available on [CSV Download](/data-api/about-api/csv-download).


          For `json` format, every list item is either area name, piece name, field name, or special name.

          If a piece or a field is a branch node, all descendant fields will be included.

          All area names are available on [Search Areas](/data-api/about-api/search-areas),

          the piece and field names — on [Data Structure](/data-api/about-api/study-data-structure) and also can be retrieved at `/studies/metadata` endpoint.

          There is a special name, `@query`, which expands to all fields queried by search.'
        required: false
        schema:
          type: array
          minItems: 1
          items:
            type: string
            pattern: ^([a-zA-Z][a-zA-Z0-9\-. ]*)|(@query)$
        examples:
          example1:
            value:
            - NCTId
            - BriefTitle
            - OverallStatus
            - HasResults
          example2:
            value: ProtocolSection
      - name: sort
        in: query
        style: pipeDelimited
        explode: false
        description: 'Comma- or pipe-separated list of sorting options of the studies. The returning studies are not sorted by default for a performance reason.

          Every list item contains a field/piece name and an optional sort direction (`asc` for ascending or `desc` for descending)

          after colon character.


          All piece and field names can be found on [Data Structure](/data-api/about-api/study-data-structure) and also can be retrieved

          at `/studies/metadata` endpoint. Currently, only date and numeric fields are allowed for sorting.

          There is a special "field" `@relevance` to sort by relevance to a search query.


          Studies missing sort field are always last. Default sort direction:

          * Date field - `desc`

          * Numeric field - `asc`

          * `@relevance` - `desc`'
        required: false
        schema:
          type: array
          maxItems: 2
          default: []
          items:
            type: string
            pattern: ^(([a-zA-Z][a-zA-Z0-9\-. ]*)|(@relevance))(:(asc|desc))?$
        examples:
          example1:
            value:
            - '@relevance'
          example2:
            value:
            - LastUpdatePostDate
          example3:
            value:
            - EnrollmentCount:desc
            - NumArmGroups
      - name: countTotal
        in: query
        description: 'Count total number of studies in all pages and return `totalCount` field with first page, if `true`.

          For CSV, the result can be found in `x-total-count` response header.

          The parameter is ignored for the subsequent pages.'
        required: false
        schema:
          type: boolean
          default: false
      - name: pageSize
        in: query
        description: 'Page size is maximum number of studies to return in response. It does not have to be the same for every page.

          If not specified or set to 0, the default value will be used. It will be coerced down to  1,000, if greater than that.'
        required: false
        schema:
          type: integer
          format: int32
          minimum: 0
          default: 10
        examples:
          example1:
            value: 2
          example2:
            value: 100
      - name: pageToken
        in: query
        description: 'Token to get next page. Set it to a `nextPageToken` value returned with the previous page in JSON format.

          For CSV, it can be found in `x-next-page-token` response header.

          Do not specify it for first page.'
        required: false
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PagedStudies'
              example:
                totalCount: 438897
                studies:
                - protocolSection:
                    identificationModule:
                      nctId: NCT03540771
                      briefTitle: Introducing Palliative Care (PC) Within the Treatment of End Stage Liver Disease (ESLD)
                    statusModule:
                      overallStatus: RECRUITING
                  hasResults: false
                - protocolSection:
                    identificationModule:
                      nctId: NCT03630471
                      briefTitle: Effectiveness of a Problem-solving Intervention for Common Adolescent Mental Health Problems in India
                    statusModule:
                      overallStatus: COMPLETED
                  hasResults: false
                - protocolSection:
                    identificationModule:
                      nctId: NCT00587795
                      briefTitle: Orthopedic Study of the Aircast StabilAir Wrist Fracture Brace
                    statusModule:
                      overallStatus: TERMINATED
                  hasResults: true
                nextPageToken: abracadabra
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/errorMessage'
  /studies/{nctId}:
    get:
      summary: Single Study
      description: Returns data of a single study.
      tags:
      - Studies
      operationId: fetchStudy
      parameters:
      - name: nctId
        in: path
        description: 'NCT Number of a study. If found in [NCTIdAlias](data-api/about-api/study-data-structure#NCTIdAlias) field,

          301 HTTP redirect to the actual study will be returned.'
        required: true
        schema:
          type: string
          pattern: ^[Nn][Cc][Tt]0*[1-9]\d{0,7}$
        examples:
          example1:
            value: NCT00841061
          example2:
            value: NCT04000165
      - name: format
        in: query
        description: 'Must be one of the following:

          * `csv`- return CSV table; available fields are listed on [CSV Download](/data-api/about-api/csv-download)

          * `json`- return JSON object; format of `markup` fields depends on `markupFormat` parameter

          * `json.zip`- put JSON object into a .json file and download it as zip archive; field values of type `markup` are in [markdown](https://spec.commonmark.org/0.28/) format

          * `fhir.json` - return FHIR JSON; fields are not customizable; see [Access Data in FHIR](/data-api/fhir)

          * `ris`- return RIS record; available tags are listed on [RIS Download](/data-api/about-api/ris-download)'
        required: false
        schema:
          type: string
          enum:
          - csv
          - json
          - json.zip
          - fhir.json
          - ris
          default: json
      - name: markupFormat
        in: query
        description: 'Format of `markup` type fields:

          * `markdown`- [markdown](https://spec.commonmark.org/0.28/) format

          * `legacy`- compatible with classic PRS


          Applicable only to `json` format.'
        required: false
        schema:
          type: string
          enum:
          - markdown
          - legacy
          default: markdown
      - name: fields
        in: query
        style: pipeDelimited
        explode: false
        description: 'If specified, must be non-empty comma- or pipe-separated list of fields to return. If unspecified, all fields will be returned.

          Order of the fields does not matter.


          For `csv` format, specify list of columns. The column names are available on [CSV Download](/data-api/about-api/csv-download).


          For `json` and `json.zip` formats, every list item is either area name, piece name, or field name.

          If a piece or a field is a branch node, all descendant fields will be included.

          All area names are available on [Search Areas](/data-api/about-api/search-areas),

          the piece and field names - on [Data Structure](/data-api/about-api/study-data-structure) and also can be retrieved at `/studies/metadata` endpoint.


          For `fhir.json` format, all available fields are returned and this parameter must be unspecified.


          For `ris` format, specify list of tags. The tag names are available on [RIS Download](/data-api/about-api/ris-download).'
        required: false
        schema:
          type: array
          minItems: 1
          items:
            type: string
            pattern: ^[a-zA-Z][a-zA-Z0-9\-. ]*$
        examples:
          example1:
            value:
            - NCTId
            - BriefTitle
            - Reference
          example2:
            value:
            - ConditionsModule
            - EligibilityModule
      responses:
        '200':
          description: OK
          content:
            text/csv:
              schema:
                $ref: '#/components/schemas/StudiesCsv'
            application/json:
              schema:
                $ref: '#/components/schemas/Study'
            application/zip:
              schema:
                $ref: '#/components/schemas/StudiesZip'
            application/fhir+json:
              schema:
                $ref: '#/components/schemas/StudyFhir'
        '301':
          description: Moved Permanently
          content: {}
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/errorMessage'
        '404':
          description: Not Found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/errorMessage'
  /studies/metadata:
    get:
      summary: Data Model Fields
      description: Returns study data model fields.
      tags:
      - Studies
      operationId: studiesMetadata
      parameters:
      - name: includeIndexedOnly
        in: query
        description: Include indexed-only fields, if `true`
        required: false
        schema:
          type: boolean
          default: false
      - name: includeHistoricOnly
        in: query
        description: Include fields available only in historic data, if `true`
        required: false
        schema:
          type: boolean
          default: false
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FieldNodeList'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/errorMessage'
  /studies/search-areas:
    get:
      summary: Search Areas
      description: Search Docs and their Search Areas.
      tags:
      - Studies
      operationId: searchAreas
      parameters: []
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchDocumentList'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/errorMessage'
  /studies/enums:
    get:
      summary: Enums
      description: "Returns enumeration types and their values.\n\nEvery item of the returning array represents enum type and contains the following properties:\n* `type` - enum type name\n* `pieces` - array of names of all data pieces having the enum type\n* `values` - all available values of the enum; every item contains the following properties:\n  * `value` - data value\n  * `legacyValue` - data value in legacy API\n  * `exceptions` - map from data piece name to legacy value when different from `legacyValue`\n    (some data pieces had special enum values in legacy API)"
      tags:
      - Studies
      operationId: enums
      parameters: []
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnumInfoList'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/errorMessage'
components:
  schemas:
    OrgStudyIdType:
      type: string
      enum:
      - NIH
      - FDA
      - VA
      - CDC
      - AHRQ
      - SAMHSA
    IpdSharingInfoType:
      type: string
      enum:
      - STUDY_PROTOCOL
      - SAP
      - ICF
      - CSR
      - ANALYTIC_CODE
    ArmsInterventionsModule:
      type: object
      properties:
        armGroups:
          type: array
          items:
            $ref: '#/components/schemas/ArmGroup'
        interventions:
          type: array
          items:
            $ref: '#/components/schemas/Intervention'
    EventStats:
      type: object
      properties:
        groupId:
          type: string
        numEvents:
          type: integer
        numAffected:
          type: integer
        numAtRisk:
          type: integer
    EnumInfo:
      type: object
      properties:
        pieces:
          type: array
          items:
            type: string
        type:
          type: string
        values:
          type: array
          items:
            $ref: '#/components/schemas/EnumItem'
      additionalProperties: false
      required:
      - pieces
      - type
      - values
    GeoPoint:
      type: object
      properties:
        lat:
          type: number
        lon:
          type: number
      required:
      - lat
      - lon
    SponsorCollaboratorsModule:
      type: object
      properties:
        responsibleParty:
          $ref: '#/components/schemas/ResponsibleParty'
        leadSponsor:
          $ref: '#/components/schemas/Sponsor'
        collaborators:
          type: array
          items:
            $ref: '#/components/schemas/Sponsor'
    DesignInfo:
      type: object
      properties:
        allocation:
          $ref: '#/components/schemas/DesignAllocation'
        interventionModel:
          $ref: '#/components/schemas/InterventionalAssignment'
        interventionModelDescription:
          type: string
        primaryPurpose:
          $ref: '#/components/schemas/PrimaryPurpose'
        observationalModel:
          $ref: '#/components/schemas/ObservationalModel'
        timePerspective:
          $ref: '#/components/schemas/DesignTimePerspective'
        maskingInfo:
          $ref: '#/components/schemas/MaskingBlock'
    CertainAgreement:
      type: object
      properties:
        piSponsorEmployee:
          type: boolean
        restrictionType:
          $ref: '#/components/schemas/AgreementRestrictionType'
        restrictiveAgreement:
          type: boolean
        otherDetails:
          type: string
    StudyList:
      title: Array of studies
      description: '`study` field values of type `markup` are in markdown format.

        '
      type: array
      items:
        $ref: '#/components/schemas/Study'
    Retraction:
      type: object
      properties:
        pmid:
          type: string
        source:
          type: string
    BrowseLeafRelevance:
      type: string
      enum:
      - LOW
      - HIGH
    InterventionalAssignment:
      type: string
      enum:
      - SINGLE_GROUP
      - PARALLEL
      - CROSSOVER
      - FACTORIAL
      - SEQUENTIAL
    MiscInfoModule:
      type: object
      properties:
        versionHolder:
          type: string
          format: date
        removedCountries:
          type: array
          items:
            type: string
        submissionTracking:
          $ref: '#/components/schemas/SubmissionTracking'
    BioSpecRetention:
      type: string
      enum:
      - NONE_RETAINED
      - SAMPLES_WITH_DNA
      - SAMPLES_WITHOUT_DNA
    OutcomesModule:
      type: object
      properties:
        primaryOutcomes:
          type: array
          items:
            $ref: '#/components/schemas/Outcome'
        secondaryOutcomes:
          type: array
          items:
            $ref: '#/components/schemas/Outcome'
        otherOutcomes:
          type: array
          items:
            $ref: '#/components/schemas/Outcome'
    Intervention:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/InterventionType'
        name:
          type: string
        description:
          type: string
        armGroupLabels:
          type: array
          items:
            type: string
        otherNames:
          type: array
          items:
            type: string
    ExpandedAccessStatus:
      type: string
      enum:
      - AVAILABLE
      - NO_LONGER_AVAILABLE
      - TEMPORARILY_NOT_AVAILABLE
      - APPROVED_FOR_MARKETING
    ArmGroup:
      type: object
      properties:
        label:
          type: string
        type:
          $ref: '#/components/schemas/ArmGroupType'
        description:
          type: string
        interventionNames:
          type: array
          items:
            type: string
    DesignModule:
      type: object
      properties:
        studyType:
          $ref: '#/components/schemas/StudyType'
        nPtrsToThisExpAccNctId:
          type: integer
        expandedAccessTypes:
          $ref: '#/components/schemas/ExpandedAccessTypes'
        patientRegistry:
          type: boolean
        targetDuration:
          type: string
          pattern: ^\d+ (Year|Years|Month|Months|Week|Weeks|Day|Days|Hour|Hours|Minute|Minutes)$
        phases:
          type: array
          items:
            $ref: '#/components/schemas/Phase'
        designInfo:
          $ref: '#/components/schemas/DesignInfo'
        bioSpec:
          $ref: '#/components/schemas/BioSpec'
        enrollmentInfo:
          $ref: '#/components/schemas/EnrollmentInfo'
    Sponsor:
      type: object
      properties:
        name:
          type: string
        class:
          $ref: '#/components/schemas/AgencyClass'
    AgreementRestrictionType:
      type: string
      enum:
      - LTE60
      - GT60
      - OTHER
    UnpostedEventType:
      type: string
      enum:
      - RESET
      - RELEASE
      - UNRELEASE
    WhoMasked:
      type: string
      enum:
      - PARTICIPANT
      - CARE_PROVIDER
      - INVESTIGATOR
      - OUTCOMES_ASSESSOR
    BioSpec:
      type: object
      properties:
        retention:
          $ref: '#/components/schemas/BioSpecRetention'
        description:
          type: string
    OrgStudyIdInfo:
      type: object
      properties:
        id:
          type: string
        type:
          $ref: '#/components/schemas/OrgStudyIdType'
        link:
          type: string
    SeeAlsoLink:
      type: object
      properties:
        label:
          type: string
        url:
          type: string
    ResultsSection:
      type: object
      properties:
        participantFlowModule:
          $ref: '#/components/schemas/ParticipantFlowModule'
        baselineCharacteristicsModule:
          $ref: '#/components/schemas/BaselineCharacteristicsModule'
        outcomeMeasuresModule:
          $ref: '#/components/schemas/OutcomeMeasuresModule'
        adverseEventsModule:
          $ref: '#/components/schemas/AdverseEventsModule'
        moreInfoModule:
          $ref: '#/components/schemas/MoreInfoModule'
    SecondaryIdType:
      type: string
      enum:
      - NIH
      - FDA
      - VA
      - CDC
      - AHRQ
      - SAMHSA
      - OTHER_GRANT
      - EUDRACT_NUMBER
      - CTIS
      - REGISTRY
      - OTHER
    FlowMilestone:
      type: object
      properties:
        type:
          type: string
        comment:
          type: string
        achievements:
          type: array
          items:
            $ref: '#/components/schemas/Flo

# --- truncated at 32 KB (63 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/nih/refs/heads/main/openapi/nih-studies-api-openapi.yml