{
  "openapi": "3.0.1",
  "info": {
    "title": "ClinicalTrials.gov Scraper: Clinical Trials Search & Export",
    "description": "Search and export clinical trials from ClinicalTrials.gov by condition, drug, sponsor, location, phase, status, age, sex and funder: NCT id, titles, status, phases, sponsor, enrollment, dates, sites, eligibility and outcomes. Official API, no proxy. $0.80 per 1,000 studies.",
    "version": "0.2",
    "x-build-id": "KRrVPTIKOdPlktOFq"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/tidyharvest~clinicaltrials-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-tidyharvest-clinicaltrials-scraper",
        "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/tidyharvest~clinicaltrials-scraper/runs": {
      "post": {
        "operationId": "runs-sync-tidyharvest-clinicaltrials-scraper",
        "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/tidyharvest~clinicaltrials-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-tidyharvest-clinicaltrials-scraper",
        "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": {
          "condition": {
            "title": "Condition or disease",
            "type": "string",
            "description": "Search by condition, e.g. `type 2 diabetes`, `breast cancer`, `long covid`. Leave everything empty to get the most recently updated recruiting studies."
          },
          "query": {
            "title": "Other terms (free text)",
            "type": "string",
            "description": "Free-text search across the whole study record, e.g. `GLP-1`, `CRISPR`, `semaglutide AND obesity`. Supports the ClinicalTrials.gov search syntax (AND, OR, NOT, quotes)."
          },
          "intervention": {
            "title": "Intervention / treatment",
            "type": "string",
            "description": "Drug, device, procedure or behavioral intervention name, e.g. `pembrolizumab`, `tirzepatide`."
          },
          "location": {
            "title": "Location",
            "type": "string",
            "description": "City, state, country or facility name, e.g. `Boston`, `California`, `Germany`, `Mayo Clinic`."
          },
          "sponsor": {
            "title": "Sponsor / collaborator",
            "type": "string",
            "description": "Lead sponsor or collaborator name, e.g. `Pfizer`, `National Cancer Institute`."
          },
          "leadSponsor": {
            "title": "Lead sponsor only",
            "type": "string",
            "description": "Only studies whose lead sponsor matches (collaborators don't count), e.g. `Pfizer`."
          },
          "titleOrAcronym": {
            "title": "Title or acronym",
            "type": "string",
            "description": "Search only study titles and acronyms, e.g. `KEYNOTE` or `SURMOUNT`."
          },
          "outcomeMeasure": {
            "title": "Outcome measure",
            "type": "string",
            "description": "Search primary and secondary outcome measures, e.g. `overall survival` or `HbA1c`."
          },
          "statuses": {
            "title": "Recruitment status",
            "type": "array",
            "description": "Keep only studies with one of these overall statuses. Empty = any status.",
            "items": {
              "type": "string",
              "enum": [
                "RECRUITING",
                "NOT_YET_RECRUITING",
                "ACTIVE_NOT_RECRUITING",
                "ENROLLING_BY_INVITATION",
                "COMPLETED",
                "SUSPENDED",
                "TERMINATED",
                "WITHDRAWN",
                "UNKNOWN",
                "AVAILABLE",
                "NO_LONGER_AVAILABLE",
                "TEMPORARILY_NOT_AVAILABLE",
                "APPROVED_FOR_MARKETING",
                "WITHHELD"
              ],
              "enumTitles": [
                "Recruiting",
                "Not yet recruiting",
                "Active, not recruiting",
                "Enrolling by invitation",
                "Completed",
                "Suspended",
                "Terminated",
                "Withdrawn",
                "Unknown",
                "Expanded access: available",
                "Expanded access: no longer available",
                "Expanded access: temporarily not available",
                "Approved for marketing",
                "Withheld"
              ]
            }
          },
          "phases": {
            "title": "Phase",
            "type": "array",
            "description": "Keep only studies in one of these phases. Empty = any phase.",
            "items": {
              "type": "string",
              "enum": [
                "EARLY_PHASE1",
                "PHASE1",
                "PHASE2",
                "PHASE3",
                "PHASE4",
                "NA"
              ],
              "enumTitles": [
                "Early phase 1",
                "Phase 1",
                "Phase 2",
                "Phase 3",
                "Phase 4",
                "Not applicable"
              ]
            }
          },
          "studyType": {
            "title": "Study type",
            "enum": [
              "ANY",
              "INTERVENTIONAL",
              "OBSERVATIONAL",
              "EXPANDED_ACCESS"
            ],
            "type": "string",
            "description": "Interventional (clinical trials), observational, or expanded access.",
            "default": "ANY"
          },
          "sex": {
            "title": "Sex",
            "enum": [
              "ALL",
              "FEMALE",
              "MALE"
            ],
            "type": "string",
            "description": "Studies open to this sex (studies open to all are included).",
            "default": "ALL"
          },
          "ageGroups": {
            "title": "Age groups",
            "type": "array",
            "description": "Studies enrolling any of these age groups: child (under 18), adult (18-64), older adult (65+). Empty = any age.",
            "items": {
              "type": "string",
              "enum": [
                "CHILD",
                "ADULT",
                "OLDER_ADULT"
              ],
              "enumTitles": [
                "Child (birth-17)",
                "Adult (18-64)",
                "Older adult (65+)"
              ]
            }
          },
          "acceptsHealthyVolunteers": {
            "title": "Accepts healthy volunteers",
            "type": "boolean",
            "description": "Keep only studies that accept healthy volunteers.",
            "default": false
          },
          "funderTypes": {
            "title": "Funder type",
            "type": "array",
            "description": "Lead sponsor class: industry, NIH, other US federal agency, or other (universities, hospitals, foundations...). Empty = any.",
            "items": {
              "type": "string",
              "enum": [
                "INDUSTRY",
                "NIH",
                "FED",
                "OTHER_GOV",
                "INDIV",
                "NETWORK",
                "OTHER"
              ],
              "enumTitles": [
                "Industry",
                "NIH",
                "Other US federal",
                "Other government",
                "Individual",
                "Network",
                "Other (university, hospital, foundation...)"
              ]
            }
          },
          "startDateFrom": {
            "title": "Started on or after",
            "type": "string",
            "description": "Only studies whose start date is on or after this date (YYYY-MM-DD)."
          },
          "startDateTo": {
            "title": "Start date until",
            "type": "string",
            "description": "Only studies whose start date is on or before this date (YYYY-MM-DD)."
          },
          "primaryCompletionDateFrom": {
            "title": "Primary completion from",
            "type": "string",
            "description": "Only studies whose (anticipated) primary completion date is on or after this date. Useful to find readouts coming up."
          },
          "primaryCompletionDateTo": {
            "title": "Primary completion until",
            "type": "string",
            "description": "Only studies whose (anticipated) primary completion date is on or before this date."
          },
          "firstPostedFrom": {
            "title": "First posted from",
            "type": "string",
            "description": "Only studies first posted on ClinicalTrials.gov on or after this date: new registrations."
          },
          "firstPostedTo": {
            "title": "First posted until",
            "type": "string",
            "description": "Only studies first posted on or before this date."
          },
          "updatedSince": {
            "title": "Updated on or after",
            "type": "string",
            "description": "Only studies whose record was last updated on or after this date. Ideal for scheduled monitoring runs."
          },
          "onlyWithResults": {
            "title": "Only studies with posted results",
            "type": "boolean",
            "description": "Keep only studies that have results posted on ClinicalTrials.gov.",
            "default": false
          },
          "nctIds": {
            "title": "NCT ids",
            "type": "array",
            "description": "Look up specific studies by NCT number (e.g. `NCT07010263`) or paste study URLs. Combined with any other filters you set. Ids not found are listed in the run's SUMMARY record.",
            "items": {
              "type": "string"
            }
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "relevance",
              "lastUpdate",
              "startDate",
              "firstPosted",
              "enrollment"
            ],
            "type": "string",
            "description": "Order of results. Relevance applies when you give a search term; without one, the most recently updated studies come first.",
            "default": "relevance"
          },
          "includeEligibilityText": {
            "title": "Include full eligibility criteria text",
            "type": "boolean",
            "description": "Adds `eligibilityCriteria` with the full inclusion/exclusion text (long).",
            "default": false
          },
          "includeRaw": {
            "title": "Include full raw record",
            "type": "boolean",
            "description": "Adds `protocolSection`, the complete study record as published by the API (arms, all outcomes, design details, location coordinates). Contact email addresses are removed.",
            "default": false
          },
          "maxItems": {
            "title": "Max studies",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Hard cap on studies returned (and on your cost).",
            "default": 50
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}