{
  "openapi": "3.0.1",
  "info": {
    "title": "ClinicalTrials.gov Scraper",
    "description": "Scrape the US government clinical-trial registry (500K+ studies). Search by condition, intervention, location, sponsor, or NCT ID; filter by status, phase, study type, demographics, country, and dates. Public REST API, no auth, no proxy.",
    "version": "1.0",
    "x-build-id": "g9Q91z3IUOHDMLBGa"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/crawlerbros~clinicaltrialsgov-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-crawlerbros-clinicaltrialsgov-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/crawlerbros~clinicaltrialsgov-scraper/runs": {
      "post": {
        "operationId": "runs-sync-crawlerbros-clinicaltrialsgov-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/crawlerbros~clinicaltrialsgov-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-crawlerbros-clinicaltrialsgov-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",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "search",
              "byNctIds",
              "byCondition",
              "byIntervention",
              "byLocation",
              "bySponsor"
            ],
            "type": "string",
            "description": "Which lookup axis to use.",
            "default": "search"
          },
          "searchQuery": {
            "title": "Search query (mode=search)",
            "type": "string",
            "description": "Free-text query against the full study record. Used by mode=search; also serves as a fallback for the other browse modes if their specific query is empty.",
            "default": "cancer immunotherapy"
          },
          "conditionQuery": {
            "title": "Condition / disease (mode=byCondition)",
            "type": "string",
            "description": "Disease, condition, or medical term (e.g. `diabetes`, `breast cancer`, `Alzheimer disease`)."
          },
          "interventionQuery": {
            "title": "Intervention / drug (mode=byIntervention)",
            "type": "string",
            "description": "Drug name, device, biological, or therapy (e.g. `metformin`, `pembrolizumab`, `CAR-T`)."
          },
          "locationQuery": {
            "title": "Location (mode=byLocation)",
            "type": "string",
            "description": "Geographic location text (city, state, country) — e.g. `Boston`, `California`, `United States`."
          },
          "sponsorQuery": {
            "title": "Lead sponsor (mode=bySponsor)",
            "type": "string",
            "description": "Lead sponsor / organization name (e.g. `Pfizer`, `Mayo Clinic`, `NIH`). Use the exact registered lead-sponsor name as it appears on ClinicalTrials.gov — for example, `ModernaTX` (not `Moderna`), `Pfizer Inc.` (not `Pfizer`). Partial names may return 0 results — use the CT.gov website search to identify the exact registered name first."
          },
          "nctIds": {
            "title": "NCT IDs (mode=byNctIds)",
            "type": "array",
            "description": "List of NCT identifiers like `NCT04280705`. Full URLs (`https://clinicaltrials.gov/study/NCT...`) are also accepted.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "status": {
            "title": "Overall status",
            "enum": [
              "",
              "NOT_YET_RECRUITING",
              "RECRUITING",
              "ENROLLING_BY_INVITATION",
              "ACTIVE_NOT_RECRUITING",
              "SUSPENDED",
              "TERMINATED",
              "COMPLETED",
              "WITHDRAWN",
              "UNKNOWN",
              "AVAILABLE",
              "NO_LONGER_AVAILABLE",
              "TEMPORARILY_NOT_AVAILABLE",
              "APPROVED_FOR_MARKETING",
              "WITHHELD"
            ],
            "type": "string",
            "description": "Restrict to a single recruitment / overall status. Leave empty for no filter."
          },
          "studyType": {
            "title": "Study type",
            "enum": [
              "",
              "INTERVENTIONAL",
              "OBSERVATIONAL",
              "EXPANDED_ACCESS"
            ],
            "type": "string",
            "description": "Restrict to a study type. Leave empty for no filter."
          },
          "phases": {
            "title": "Phases",
            "uniqueItems": true,
            "type": "array",
            "description": "Restrict to one or more trial phases. Empty array = no filter.",
            "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"
              ]
            },
            "default": []
          },
          "sex": {
            "title": "Eligible sex",
            "enum": [
              "",
              "ALL",
              "MALE",
              "FEMALE"
            ],
            "type": "string",
            "description": "Restrict to studies enrolling a specific sex. `ALL` matches studies open to any sex."
          },
          "ageGroups": {
            "title": "Age groups",
            "uniqueItems": true,
            "type": "array",
            "description": "Restrict to studies enrolling one or more age groups. Empty = no filter.",
            "items": {
              "type": "string",
              "enum": [
                "CHILD",
                "ADULT",
                "OLDER_ADULT"
              ],
              "enumTitles": [
                "Child (birth-17)",
                "Adult (18-64)",
                "Older Adult (65+)"
              ]
            },
            "default": []
          },
          "country": {
            "title": "Country",
            "enum": [
              "",
              "United States",
              "Canada",
              "United Kingdom",
              "Germany",
              "France",
              "Italy",
              "Spain",
              "Netherlands",
              "Belgium",
              "Sweden",
              "Norway",
              "Denmark",
              "Finland",
              "Switzerland",
              "Austria",
              "Poland",
              "Czechia",
              "Hungary",
              "Romania",
              "Bulgaria",
              "Greece",
              "Portugal",
              "Ireland",
              "Iceland",
              "Russia",
              "Ukraine",
              "Turkey",
              "Israel",
              "Saudi Arabia",
              "United Arab Emirates",
              "Egypt",
              "South Africa",
              "China",
              "Japan",
              "Korea, Republic of",
              "Taiwan",
              "Hong Kong",
              "India",
              "Pakistan",
              "Bangladesh",
              "Thailand",
              "Vietnam",
              "Indonesia",
              "Malaysia",
              "Singapore",
              "Philippines",
              "Australia",
              "New Zealand",
              "Mexico",
              "Brazil",
              "Argentina",
              "Chile",
              "Colombia",
              "Peru"
            ],
            "type": "string",
            "description": "Restrict to studies with a trial location in a specific country (matches `protocolSection.contactsLocationsModule.locations[].country`)."
          },
          "startDateFrom": {
            "title": "Start date — from (YYYY or YYYY-MM-DD)",
            "type": "string",
            "description": "Drop studies that started before this date. ISO 8601 partial dates accepted (e.g. `2020`, `2020-01`, `2020-01-15`)."
          },
          "startDateTo": {
            "title": "Start date — to (YYYY or YYYY-MM-DD)",
            "type": "string",
            "description": "Drop studies that started after this date."
          },
          "completionDateFrom": {
            "title": "Completion date — from (YYYY or YYYY-MM-DD)",
            "type": "string",
            "description": "Drop studies whose completion date is before this date."
          },
          "completionDateTo": {
            "title": "Completion date — to (YYYY or YYYY-MM-DD)",
            "type": "string",
            "description": "Drop studies whose completion date is after this date."
          },
          "hasResults": {
            "title": "Only studies with posted results",
            "type": "boolean",
            "description": "When enabled, only emit studies that have results posted on ClinicalTrials.gov. When disabled (default), all studies are returned regardless of results status.",
            "default": false
          },
          "containsKeyword": {
            "title": "Contains keyword",
            "type": "string",
            "description": "Client-side filter: keep only records whose title, summary, eligibility, conditions, keywords, or interventions contain this substring (case-insensitive)."
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Hard cap on emitted records.",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}