{
  "openapi": "3.0.1",
  "info": {
    "title": "ClinicalTrials.gov Search — Trials, Sponsors and Sites",
    "description": "Search the US registry of clinical studies by condition, drug, sponsor, phase, status and country, and get back flat rows: title, sponsor, phase, enrollment, eligibility, primary outcome and the recruiting sites. Public NIH data, no key.",
    "version": "0.1",
    "x-build-id": "5QB3wczaLhcUy2Jlp"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/dalbian~clinical-trials-search/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-dalbian-clinical-trials-search",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/dalbian~clinical-trials-search/runs": {
      "post": {
        "operationId": "runs-sync-dalbian-clinical-trials-search",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/dalbian~clinical-trials-search/run-sync": {
      "post": {
        "operationId": "run-sync-dalbian-clinical-trials-search",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "conditions": {
            "title": "Conditions or diseases",
            "type": "array",
            "description": "Diseases or conditions to search, one per line — for example glioblastoma, type 2 diabetes. Several lines widen the search: a trial matching any one of them is returned. The registry expands synonyms, so 'heart attack' also finds trials indexed under myocardial infarction.",
            "default": [
              "type 2 diabetes"
            ],
            "items": {
              "type": "string"
            }
          },
          "interventions": {
            "title": "Drugs or interventions",
            "type": "array",
            "description": "Drug names, devices, procedures or behavioural interventions, one per line — for example pembrolizumab, semaglutide. Brand and generic names both work; the registry indexes the other names a sponsor declared.",
            "items": {
              "type": "string"
            }
          },
          "sponsor": {
            "title": "Sponsor or collaborator",
            "type": "string",
            "description": "Organisation running or funding the trial — Pfizer, Mayo Clinic, National Cancer Institute. This matches collaborators as well as the lead sponsor, so a Pfizer search also returns academic trials Pfizer co-funded. The returned row carries both, so you can tell which is which. Matching is on whole words, not on prefixes: 'Moderna' finds 1 trial, 'ModernaTX' finds 142, because the registry spells the company ModernaTX, Inc. Extra words narrow rather than widen — 'Pfizer' returns 6 085 trials and 'Pfizer Inc' returns 705. Check the leadSponsor column of a small run before scaling up."
          },
          "query": {
            "title": "Free text",
            "type": "string",
            "description": "Searches the whole record — title, summary, eligibility, outcomes, keywords. Use it for anything the fields above do not cover, such as a biomarker (EGFR exon 20) or a trial design term (crossover)."
          },
          "statuses": {
            "title": "Recruitment status",
            "type": "array",
            "description": "Keep only trials in these states. Leave empty for all. TERMINATED and WITHDRAWN are the interesting ones for competitive work — they are the programmes that stopped, and the record says when. UNKNOWN means the sponsor has not updated the record past its expected completion date.",
            "items": {
              "type": "string",
              "enum": [
                "RECRUITING",
                "NOT_YET_RECRUITING",
                "ENROLLING_BY_INVITATION",
                "ACTIVE_NOT_RECRUITING",
                "COMPLETED",
                "SUSPENDED",
                "TERMINATED",
                "WITHDRAWN",
                "UNKNOWN",
                "AVAILABLE",
                "NO_LONGER_AVAILABLE",
                "TEMPORARILY_NOT_AVAILABLE",
                "APPROVED_FOR_MARKETING",
                "WITHHELD"
              ]
            },
            "default": []
          },
          "recruitingOnly": {
            "title": "Currently recruiting only",
            "type": "boolean",
            "description": "Shorthand for the two statuses a patient or a site-feasibility team cares about: RECRUITING and NOT_YET_RECRUITING. Overrides the status list above.",
            "default": false
          },
          "phases": {
            "title": "Phases",
            "type": "array",
            "description": "Keep only these phases. Leave empty for all. A trial can declare two phases at once (PHASE1 and PHASE2), and asking for PHASE2 returns it. NA is the value used by trials with no phase — device, behavioural and most observational work.",
            "items": {
              "type": "string",
              "enum": [
                "EARLY_PHASE1",
                "PHASE1",
                "PHASE2",
                "PHASE3",
                "PHASE4",
                "NA"
              ]
            },
            "default": []
          },
          "studyType": {
            "title": "Study type",
            "enum": [
              "any",
              "INTERVENTIONAL",
              "OBSERVATIONAL",
              "EXPANDED_ACCESS"
            ],
            "type": "string",
            "description": "Interventional trials test something on assigned arms. Observational studies watch a cohort. Expanded access is compassionate-use supply, not a trial.",
            "default": "any"
          },
          "locationCountry": {
            "title": "Country",
            "type": "string",
            "description": "Keep only trials with at least one site in this country. Use the registry's own spelling — United States, United Kingdom, Czechia, Turkey (Türkiye), South Korea."
          },
          "locationTerm": {
            "title": "City, state or region",
            "type": "string",
            "description": "A finer location search than the country filter — Boston, Bavaria, Île-de-France. This is a text match on the site addresses, not a radius, so it will not find a hospital in a neighbouring town."
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "relevance",
              "LastUpdatePostDate:desc",
              "StudyFirstPostDate:desc",
              "StartDate:desc",
              "EnrollmentCount:desc"
            ],
            "type": "string",
            "description": "Relevance is best for a narrow question. 'First posted' is how you watch a field for new entrants. 'Enrollment' surfaces the large registrational trials.",
            "default": "relevance"
          },
          "maxResults": {
            "title": "Maximum trials",
            "minimum": 1,
            "maximum": 8000,
            "type": "integer",
            "description": "Cap on trials returned. The registry holds well over half a million studies, so a broad search without a cap is a very long run.",
            "default": 100
          },
          "locationsPerTrial": {
            "title": "Sites listed per trial",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "A phase 3 trial can list several hundred sites. The row always carries the full locationCount and the list of countries; this controls how many individual sites are spelled out. Set to 0 for counts only.",
            "default": 5
          },
          "includeEligibility": {
            "title": "Include full eligibility criteria",
            "type": "boolean",
            "description": "The sponsor's full inclusion and exclusion text. It is long — often several thousand characters — but it is the field that decides whether a patient fits.",
            "default": true
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}