{
  "openapi": "3.0.1",
  "info": {
    "title": "ClinicalTrials.gov Scraper - Trials, Sites & Sponsor Leads",
    "description": "Scrape ClinicalTrials.gov by condition, drug, sponsor, phase, status or location. Rich trial records, research-site & investigator contact leads, and sponsor pipeline analytics. Keyless, no browser, monitor mode. Independent tool, not affiliated with any government agency.",
    "version": "0.1",
    "x-build-id": "DKcD1l728rJTfu7fX"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapesage~clinical-trials-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapesage-clinical-trials-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/scrapesage~clinical-trials-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapesage-clinical-trials-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/scrapesage~clinical-trials-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapesage-clinical-trials-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": {
          "outputType": {
            "title": "Output type",
            "enum": [
              "trials",
              "siteLeads",
              "sponsors"
            ],
            "type": "string",
            "description": "What to output. `Trials` = one rich record per study (the default). `Site & investigator leads` = one contactable lead per research site/contact (name, phone, email, facility, geo + trial context + lead score). `Sponsor pipeline` = one analytics record per lead sponsor (trial counts by phase/status, top conditions/interventions, recent trials).",
            "default": "trials"
          },
          "condition": {
            "title": "Condition / disease",
            "type": "string",
            "description": "Condition or disease, e.g. `breast cancer`, `type 2 diabetes`, `alzheimer`. Maps to the ClinicalTrials.gov Condition field."
          },
          "intervention": {
            "title": "Intervention (drug / device / treatment)",
            "type": "string",
            "description": "Drug, biologic, device or procedure name, e.g. `pembrolizumab`, `semaglutide`, `CAR-T`."
          },
          "otherTerms": {
            "title": "Other search terms",
            "type": "string",
            "description": "Free-text keywords searched across the whole record (titles, summary, etc.), e.g. `biomarker`, `pediatric`."
          },
          "sponsor": {
            "title": "Sponsor / collaborator",
            "type": "string",
            "description": "Sponsor or collaborator organization, e.g. `Pfizer`, `Mayo Clinic`, `National Cancer Institute`."
          },
          "titleSearch": {
            "title": "Title contains",
            "type": "string",
            "description": "Search only the study title / acronym."
          },
          "nctIds": {
            "title": "Specific NCT IDs",
            "type": "array",
            "description": "Scrape these exact studies by their NCT number (e.g. `NCT04368728`). Full detail including the results section is fetched for each.",
            "items": {
              "type": "string"
            }
          },
          "searchUrls": {
            "title": "ClinicalTrials.gov URLs",
            "type": "array",
            "description": "Paste clinicaltrials.gov search URLs (e.g. `https://clinicaltrials.gov/search?cond=melanoma&aggFilters=status:rec,phase:2`) or study URLs (`/study/NCT…`). Filters in the URL are converted automatically.",
            "items": {
              "type": "string"
            }
          },
          "status": {
            "title": "Recruitment status",
            "type": "array",
            "description": "Limit to these statuses. Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "RECRUITING",
                "NOT_YET_RECRUITING",
                "ENROLLING_BY_INVITATION",
                "ACTIVE_NOT_RECRUITING",
                "COMPLETED",
                "SUSPENDED",
                "TERMINATED",
                "WITHDRAWN",
                "UNKNOWN",
                "AVAILABLE"
              ],
              "enumTitles": [
                "Recruiting",
                "Not yet recruiting",
                "Enrolling by invitation",
                "Active, not recruiting",
                "Completed",
                "Suspended",
                "Terminated",
                "Withdrawn",
                "Unknown",
                "Available (expanded access)"
              ]
            }
          },
          "phases": {
            "title": "Phase",
            "type": "array",
            "description": "Trial phase(s). 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"
              ]
            }
          },
          "studyType": {
            "title": "Study type",
            "enum": [
              "",
              "INTERVENTIONAL",
              "OBSERVATIONAL",
              "EXPANDED_ACCESS"
            ],
            "type": "string",
            "description": "Interventional, observational or expanded access.",
            "default": ""
          },
          "funderTypes": {
            "title": "Lead sponsor type",
            "type": "array",
            "description": "Limit by who is leading the trial (e.g. Industry for pharma pipeline intelligence).",
            "items": {
              "type": "string",
              "enum": [
                "NIH",
                "FED",
                "OTHER_GOV",
                "INDIV",
                "INDUSTRY",
                "NETWORK",
                "AMBIG",
                "OTHER",
                "UNKNOWN"
              ],
              "enumTitles": [
                "NIH",
                "U.S. Fed",
                "Other gov",
                "Individual",
                "Industry",
                "Network",
                "Ambiguous",
                "Other",
                "Unknown"
              ]
            }
          },
          "resultsAvailability": {
            "title": "Results availability",
            "enum": [
              "",
              "with",
              "without"
            ],
            "type": "string",
            "description": "Whether posted results must be present.",
            "default": ""
          },
          "sex": {
            "title": "Eligible sex",
            "enum": [
              "",
              "FEMALE",
              "MALE"
            ],
            "type": "string",
            "description": "Limit to trials enrolling a specific sex.",
            "default": ""
          },
          "ages": {
            "title": "Age groups",
            "type": "array",
            "description": "Eligible age groups.",
            "items": {
              "type": "string",
              "enum": [
                "CHILD",
                "ADULT",
                "OLDER_ADULT"
              ],
              "enumTitles": [
                "Child (0–17)",
                "Adult (18–64)",
                "Older adult (65+)"
              ]
            }
          },
          "healthyVolunteersOnly": {
            "title": "Accepts healthy volunteers only",
            "type": "boolean",
            "description": "Only trials that accept healthy volunteers.",
            "default": false
          },
          "locationCountry": {
            "title": "Country",
            "type": "string",
            "description": "Limit to trials with a site in this country, e.g. `United States`, `Canada`, `Germany`."
          },
          "locationState": {
            "title": "State / region",
            "type": "string",
            "description": "Limit to trials with a site in this state/region, e.g. `California`, `Ontario`."
          },
          "locationCity": {
            "title": "City",
            "type": "string",
            "description": "Limit to trials with a site in this city."
          },
          "locationTerm": {
            "title": "Location free-text",
            "type": "string",
            "description": "Free-text location search (facility name, city, etc.)."
          },
          "geoLatitude": {
            "title": "Geo latitude",
            "type": "string",
            "description": "Latitude for radius search (used with longitude + radius)."
          },
          "geoLongitude": {
            "title": "Geo longitude",
            "type": "string",
            "description": "Longitude for radius search."
          },
          "geoRadius": {
            "title": "Geo radius",
            "type": "string",
            "description": "Radius for the geo search, e.g. `50mi` or `100km`.",
            "default": "50mi"
          },
          "studyStartDateFrom": {
            "title": "Study start date from",
            "type": "string",
            "description": "Earliest study start date, `YYYY-MM-DD` (or `YYYY-MM`)."
          },
          "studyStartDateTo": {
            "title": "Study start date to",
            "type": "string",
            "description": "Latest study start date, `YYYY-MM-DD` (or `YYYY-MM`)."
          },
          "lastUpdateDateFrom": {
            "title": "Last updated from",
            "type": "string",
            "description": "Only trials whose record was last updated on/after this date, `YYYY-MM-DD`. Great for incremental monitoring."
          },
          "lastUpdateDateTo": {
            "title": "Last updated to",
            "type": "string",
            "description": "Only trials whose record was last updated on/before this date, `YYYY-MM-DD`."
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "relevance",
              "lastUpdate",
              "firstPosted",
              "enrollment",
              "startDate"
            ],
            "type": "string",
            "description": "Order of results. Use 'Most recently updated' with monitor mode for incremental runs.",
            "default": "relevance"
          },
          "includeResults": {
            "title": "Include posted results",
            "type": "boolean",
            "description": "For trials that have posted results, attach a `resultsSummary` (outcome measures, participant flow, adverse-event totals). Adds one extra request per such trial.",
            "default": false
          },
          "includeDetailedDescription": {
            "title": "Include detailed description",
            "type": "boolean",
            "description": "Include the long detailed-description text on each trial record.",
            "default": true
          },
          "includeEligibilityText": {
            "title": "Include full eligibility criteria text",
            "type": "boolean",
            "description": "Include the full inclusion/exclusion criteria text on each trial record.",
            "default": true
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum output records (trials, site leads, or sponsors depending on output type)."
          },
          "maxTrialsToScan": {
            "title": "Max trials to scan (sponsor mode)",
            "minimum": 1,
            "type": "integer",
            "description": "For the Sponsor pipeline output: how many matching trials to scan before aggregating sponsors.",
            "default": 1000
          },
          "deduplicateResults": {
            "title": "Deduplicate results",
            "type": "boolean",
            "description": "Skip duplicate records within a run.",
            "default": true
          },
          "monitorMode": {
            "title": "Monitor mode (only new/updated)",
            "type": "boolean",
            "description": "Remember records across runs and output only new or changed ones each time (a trial re-appears when its last-update date changes). Pairs perfectly with Apify Schedules for new-trial alerts. Uses its own named store — does not interfere with scheduling.",
            "default": false
          },
          "monitorKey": {
            "title": "Monitor key",
            "type": "string",
            "description": "Name this monitor watchlist. Use different keys for different saved searches so their histories stay separate.",
            "default": "default"
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 12,
            "type": "integer",
            "description": "Parallel requests to the API. 5 is a good default.",
            "default": 5
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify Proxy settings. Datacenter proxy is plenty — the ClinicalTrials.gov API is clean and keyless.",
            "default": {
              "useApifyProxy": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}