---
title: "GET /search"
method: GET
path: "/search"
tags: ["trials"]
---

# GET /search

`GET /search`

Returns trials based on a search query. By default, it'll search in all of a trial's attributes.
- `q` is a [ElasticSearch query string](https://www.elastic.co/guide/en/elasticsearch/reference/2.3/query-dsl-query-string-query.html#query-string-syntax) (e.g. `public_title:(depressive OR depression)`)
- `page` can take a value between `1` and `100`
- `per_page` can take a value between `10` and `100`

## Query parameters

- `q` string
- `page` integer
- `per_page` integer

## Response `200`

Success

- TrialSearchResults
  - `total_count` integer, required
  - `items` Trial[], required
    - `id` string, required — ID of the trial
    - `source_id` string — ID of the trial's source
    - `identifiers` object — Object that maps the trial's sources ids with its identifiers.
    - `url` string, required — Source URL (where the trial was collected from)
    - `public_title` string, required — Title of the trial
    - `brief_summary` string — Summary of the trial
    - `target_sample_size` integer — Target sample size for the trial
    - `gender` 'both' | 'male' | 'female' — Gender of the subjects of the trial
    - `age_range` object
      - `min_age` string — Minimum participant age (e.g. "12 Years", "1 Month", "15 Days"). If unknown, it's `undefined`. If no limit, it's "any". If not applicable, it's "N/A".
      - `max_age` string — Maximum participant age (e.g. "12 Years", "1 Month", "15 Days"). If unknown, it's `undefined`. If no limit, it's "any". If not applicable, it's "N/A".
    - `has_published_results` boolean — Trial has its results published (true/false)
    - `registration_date` string, date-time — Date the trial was registered
    - `completion_date` string, date-time — Date the trial was completed
    - `results_exemption_date` string, date-time — Date when a certification of exemption has been filed for the trial
    - `study_phase` string[] — Phases of the study (e.g. `["Phase 2"]` or `["Phase 1", "Phase 2"]`)
    - `status` 'ongoing' | 'withdrawn' | 'suspended' | 'terminated' | 'complete' | 'unknown' | 'other' — Completion status of the trial
    - `recruitment_status` 'recruiting' | 'not_recruiting' | 'unknown' | 'other' — Recruitment status of the trial
    - `locations` TrialLocation[], required — Locations related to the trial
      - `id` string, required — ID of the location
      - `name` string, required — Name of the location
      - `type` 'country' | 'city' | 'other' — Type of the location (country / city / other)
      - `role` 'recruitment_countries' | 'other'
    - `interventions` Intervention[], required — Interventions related to the trial
      - `id` string, required — ID of the intervention
      - `name` string, required — Name of the intervention
      - `url` string, required — OpenTrials API URL of the intervention
      - `type` 'drug' | 'procedure' | 'other' — Type of the intervention (drug / other)
    - `conditions` Condition[] — Conditions the trial refers to
      - `id` string, required — ID of the condition
      - `name` string, required — Name of the condition
      - `url` string, required — OpenTrials API URL of the condition
    - `persons` TrialPerson[], required — People related to the trial
      - `id` string, required — ID of the person
      - `name` string, required — Name of the person
      - `url` string, required — OpenTrials API URL of the person
      - `role` 'principal_investigator' | 'public_queries' | 'scientific_queries' | 'other'
    - `organisations` TrialOrganisation[], required — Organisations related to the trial
      - `id` string, required — ID of the organisation
      - `name` string, required — Name of the organisation
      - `url` string, required — OpenTrials API URL of the organisation
      - `role` 'primary_sponsor' | 'sponsor' | 'funder' | 'other'
    - `records` RecordSummary[], required — (published) records of the trial
      - `id` string, required
      - `url` string, required
      - `source_id` string, required
      - `is_primary` boolean
      - `last_verification_date` string, date-time
    - `publications` PublicationSummary[], required — Publications referring the trial
      - `id` string, required
      - `url` string, required
      - `title` string, required
      - `source_id` string, required
      - `source_url` string, required
    - `discrepancies` object — Discrepancies in trial's details between different sources
    - `documents` DocumentSummary[] — Documents related to the trial
      - `id` string, required
      - `name` string, required
      - `url` string, required — OpenTrials API URL of the document
      - `document_category` DocumentCategory, required
        - `id` integer, required
        - `group` string — Name of document category
        - `name` string, required — Name of document sub-category
      - `trials` TrialSummary[]
        - `id` string, required — ID of the trial
        - `url` string, required — OpenTrials API URL for this trial
        - `public_title` string, required — Title of the record
      - `file` FileSummary
        - `id` string — ID of the file
        - `sha1` string
        - `source_url` string — URL of origin for this file
        - `documentcloud_id` string
      - `fda_application` FDAApplication
        - `id` string, required — FDA application ID
        - `drug_name` string — Name of the drug
        - `active_ingredients` string — Active ingredients contained in the drug
        - `fda_approvals` FDAApproval[] — Associated FDA approvals
          - `id` string, required — FDA approval ID
          - `supplement_number` integer, required
          - `type` string, required — Type of FDA approval
          - `action_date` string, date-time, required
          - `notes` string — Additional information about the FDA approval
          - `fda_application` FDAApplication — recursive
        - `organisation` Organisation
          - `id` string, required — ID of the organisation
          - `name` string, required — Name of the organisation
          - `url` string, required — OpenTrials API URL of the organisation
        - `type` string — The FDA application type (e.g. "NDA", "ANDA", etc.)
        - `url` string, required — OpenTrials API URL for this FDA application
      - `source_id` string — ID of the document's source
      - `source_url` string — URL of origin for this document
    - `sources` object, required
    - `risks_of_bias` RiskOfBias[], required
      - `id` string, required
      - `source_id` string, required
      - `source_url` string, required
      - `study_id` string, required
      - `risk_of_bias_criteria` RiskOfBiasCriteria[]
        - `id` string, required
        - `name` string, required
        - `value` 'yes' | 'no' | 'unknown', required

## Other responses

- `default` — Error

---

[API](https://skmtc.net/opentrials/apis/opentrials-api.md) · [All operations](https://skmtc.net/opentrials/apis/opentrials-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/opentrials/opentrials-api/versions/d5e3f69976ed/schema)
