{
  "openapi": "3.0.1",
  "info": {
    "title": "ClinicalTrials.gov Scraper: Clinical Trial Search & Alerts",
    "description": "Search ClinicalTrials.gov by condition, drug, sponsor, status, phase, study type, country and date. Each study has the NCT ID, summary, phases, enrollment, sponsor, collaborators, key dates and trial sites. Alert mode returns only new studies. No API key needed.",
    "version": "0.1",
    "x-build-id": "RHXx80Qm4Q5PQXZVg"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/frank0309~clinicaltrials-gov/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-frank0309-clinicaltrials-gov",
        "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/frank0309~clinicaltrials-gov/runs": {
      "post": {
        "operationId": "runs-sync-frank0309-clinicaltrials-gov",
        "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/frank0309~clinicaltrials-gov/run-sync": {
      "post": {
        "operationId": "run-sync-frank0309-clinicaltrials-gov",
        "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": "E.g. \"non-small cell lung cancer\", \"obesity\" or \"Alzheimer Disease\". ClinicalTrials.gov also matches synonyms."
          },
          "intervention": {
            "title": "Intervention or treatment",
            "type": "string",
            "description": "Drug, device, procedure or other intervention, e.g. \"semaglutide\", \"pembrolizumab\" or \"CAR-T\"."
          },
          "sponsor": {
            "title": "Sponsor or collaborator",
            "type": "string",
            "description": "Company or organisation running or funding the study, e.g. \"Pfizer\" or \"National Cancer Institute\". Matches lead sponsors and collaborators."
          },
          "keywords": {
            "title": "Other keywords",
            "type": "string",
            "description": "Free-text search across the whole study record, e.g. an NCT ID, an acronym or \"decentralized\". Supports ClinicalTrials.gov search syntax such as AND, OR and quoted phrases."
          },
          "statuses": {
            "title": "Recruitment status",
            "type": "array",
            "description": "Leave empty for all statuses.",
            "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"
              ],
              "enumTitles": [
                "Recruiting",
                "Not yet recruiting",
                "Enrolling by invitation",
                "Active, not recruiting",
                "Completed",
                "Suspended",
                "Terminated",
                "Withdrawn",
                "Unknown",
                "Expanded access: available",
                "Expanded access: no longer available",
                "Expanded access: temporarily not available",
                "Expanded access: approved for marketing",
                "Withheld"
              ]
            }
          },
          "phases": {
            "title": "Phases",
            "type": "array",
            "description": "Studies in any of these phases. Leave empty for all.",
            "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"
              ]
            }
          },
          "studyTypes": {
            "title": "Study types",
            "type": "array",
            "description": "Leave empty for all types.",
            "items": {
              "type": "string",
              "enum": [
                "INTERVENTIONAL",
                "OBSERVATIONAL",
                "EXPANDED_ACCESS"
              ],
              "enumTitles": [
                "Interventional (clinical trial)",
                "Observational",
                "Expanded access"
              ]
            }
          },
          "industrySponsoredOnly": {
            "title": "Industry-sponsored only",
            "type": "boolean",
            "description": "Only studies whose lead sponsor is a company (pharma, biotech, device maker), not a university, hospital or government body.",
            "default": false
          },
          "countries": {
            "title": "Countries",
            "type": "array",
            "description": "Studies with at least one site in any of these countries, written as on ClinicalTrials.gov, e.g. \"United States\", \"Germany\", \"Japan\", \"Korea, Republic of\".",
            "items": {
              "type": "string"
            }
          },
          "location": {
            "title": "City, state or site",
            "type": "string",
            "description": "Free-text location search, e.g. \"Boston\", \"Texas\" or \"Mayo Clinic\"."
          },
          "dateField": {
            "title": "Date filter applies to",
            "enum": [
              "lastUpdate",
              "start",
              "firstPosted",
              "primaryCompletion"
            ],
            "type": "string",
            "description": "Which study date the date range or \"last N days\" below filters on.",
            "default": "lastUpdate"
          },
          "dateFrom": {
            "title": "From date",
            "type": "string",
            "description": "Earliest date (YYYY-MM-DD) for the date chosen above. Leave empty for no lower bound."
          },
          "dateTo": {
            "title": "To date",
            "type": "string",
            "description": "Latest date (YYYY-MM-DD) for the date chosen above. Future dates work for start and completion dates. Leave empty for no upper bound."
          },
          "withinLastDays": {
            "title": "Within the last N days",
            "minimum": 1,
            "type": "integer",
            "description": "Moving window for scheduled runs: only studies whose chosen date falls in the last N days. Replaces \"From date\" when set."
          },
          "onlyNewSinceLastRun": {
            "title": "Only new studies (alert mode)",
            "type": "boolean",
            "description": "Return only studies that earlier runs with the same filters have not returned. Schedule the Actor daily or weekly to get a feed of newly registered trials. The first run returns everything that matches.",
            "default": false
          },
          "maxItems": {
            "title": "Maximum studies",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many studies. Results are sorted by most recently updated first.",
            "default": 100
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}