{
  "openapi": "3.0.1",
  "info": {
    "title": "Clinical Trials Scraper: Studies, Sites & Results",
    "description": "Scrape ClinicalTrials.gov studies by condition, drug, sponsor, location, status and phase. Get enrollment, every trial site, outcome measures, publications, posted results and adverse events per arm. Export CSV, Excel, JSON or XML. No login or API key. 600K+ studies.",
    "version": "0.1",
    "x-build-id": "AHCj4rdEIxOf42llz"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/recordsdata~clinical-trials-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-recordsdata-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/recordsdata~clinical-trials-scraper/runs": {
      "post": {
        "operationId": "runs-sync-recordsdata-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/recordsdata~clinical-trials-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-recordsdata-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": {
          "condition": {
            "title": "Condition or disease (e.g. melanoma)",
            "type": "string",
            "description": "Condition or disease, e.g. melanoma or type 2 diabetes. With no search box and no NCT IDs the actor runs a demo melanoma search."
          },
          "intervention": {
            "title": "Drug or treatment (e.g. pembrolizumab)",
            "type": "string",
            "description": "Drug, device or treatment to search for, for example pembrolizumab. Combine with a condition to narrow results."
          },
          "otherTerm": {
            "title": "Any other term",
            "type": "string",
            "description": "Free-text term matched across the study record."
          },
          "location": {
            "title": "Place (e.g. Boston, Spain)",
            "type": "string",
            "description": "City, state or country the trial runs in (e.g. Boston, Spain)."
          },
          "sponsor": {
            "title": "Sponsor (e.g. Pfizer)",
            "type": "string",
            "description": "Lead sponsor or collaborator name (e.g. Pfizer, National Cancer Institute)."
          },
          "nctIds": {
            "title": "Exact NCT IDs (e.g. NCT01844505)",
            "type": "array",
            "description": "Fetch exact studies by NCT number (e.g. NCT01844505). Runs in addition to the search.",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Max studies (cost cap)",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Max studies to return, e.g. 50. Also your cost cap. Free plan: 10. Paid: up to 1,000,000.",
            "default": 10
          },
          "sortBy": {
            "title": "Sort studies by",
            "enum": [
              "",
              "LastUpdatePostDate:desc",
              "StudyFirstPostDate:desc",
              "EnrollmentCount:desc"
            ],
            "type": "string",
            "description": "Order of the returned studies: relevance, recently updated, newest first or largest enrollment first.",
            "default": ""
          },
          "overallStatus": {
            "title": "Recruitment status (one)",
            "enum": [
              "",
              "RECRUITING",
              "NOT_YET_RECRUITING",
              "ACTIVE_NOT_RECRUITING",
              "ENROLLING_BY_INVITATION",
              "COMPLETED",
              "TERMINATED",
              "SUSPENDED",
              "WITHDRAWN",
              "AVAILABLE",
              "UNKNOWN"
            ],
            "type": "string",
            "description": "Return only trials with this recruitment status, for example RECRUITING or COMPLETED. Leave on Any status to include every status. To combine several statuses use Recruitment statuses (several) below.",
            "default": ""
          },
          "overallStatuses": {
            "title": "Recruitment status (several)",
            "type": "array",
            "description": "Return trials in any of these recruitment statuses, for example Recruiting plus Not yet recruiting. Combined with the single status above.",
            "items": {
              "type": "string",
              "enum": [
                "RECRUITING",
                "NOT_YET_RECRUITING",
                "ACTIVE_NOT_RECRUITING",
                "ENROLLING_BY_INVITATION",
                "COMPLETED",
                "TERMINATED",
                "SUSPENDED",
                "WITHDRAWN",
                "AVAILABLE",
                "UNKNOWN"
              ],
              "enumTitles": [
                "Recruiting",
                "Not yet recruiting",
                "Active, not recruiting",
                "Enrolling by invitation",
                "Completed",
                "Terminated",
                "Suspended",
                "Withdrawn",
                "Available (expanded access)",
                "Unknown status"
              ]
            },
            "default": []
          },
          "phase": {
            "title": "Phase (one)",
            "enum": [
              "",
              "0",
              "1",
              "2",
              "3",
              "4"
            ],
            "type": "string",
            "description": "Return only trials in this phase, from Early Phase 1 to Phase 4. Leave on Any phase to include all phases. To combine several phases use Phases (several) below.",
            "default": ""
          },
          "phases": {
            "title": "Phase (several)",
            "type": "array",
            "description": "Return trials in any of these phases, for example Phase 2 plus Phase 3. Combined with the single phase above. Phase 1 also covers Phase 1/2 trials and Phase 2 also covers Phase 2/3.",
            "items": {
              "type": "string",
              "enum": [
                "0",
                "1",
                "2",
                "3",
                "4"
              ],
              "enumTitles": [
                "Early Phase 1",
                "Phase 1",
                "Phase 2",
                "Phase 3",
                "Phase 4"
              ]
            },
            "default": []
          },
          "studyType": {
            "title": "Study type",
            "enum": [
              "",
              "int",
              "obs",
              "exp"
            ],
            "type": "string",
            "description": "Interventional (treatment trials), observational studies or expanded access programs. Any type by default.",
            "default": ""
          },
          "resultsAvailability": {
            "title": "Results posted?",
            "enum": [
              "",
              "with",
              "without"
            ],
            "type": "string",
            "description": "Only trials that have results posted on ClinicalTrials.gov, or only trials without results. Either by default.",
            "default": ""
          },
          "funderTypes": {
            "title": "Funder type",
            "type": "array",
            "description": "Only trials funded by these kinds of organization. Empty means every funder.",
            "items": {
              "type": "string",
              "enum": [
                "industry",
                "nih",
                "fed",
                "other"
              ],
              "enumTitles": [
                "Industry (pharma, biotech, device makers)",
                "NIH",
                "Other US federal agency",
                "Other (universities, hospitals, networks, individuals)"
              ]
            },
            "default": []
          },
          "withDocuments": {
            "title": "Published documents",
            "type": "array",
            "description": "Only trials that published these documents: study protocol, statistical analysis plan, informed consent form.",
            "items": {
              "type": "string",
              "enum": [
                "prot",
                "sap",
                "icf"
              ],
              "enumTitles": [
                "Study protocol",
                "Statistical analysis plan",
                "Informed consent form"
              ]
            },
            "default": []
          },
          "sex": {
            "title": "Sex accepted",
            "enum": [
              "",
              "f",
              "m"
            ],
            "type": "string",
            "description": "Only trials that accept women, or only trials that accept men. Trials open to all sexes are included in both. Any by default.",
            "default": ""
          },
          "ageGroups": {
            "title": "Age groups accepted",
            "type": "array",
            "description": "Only trials that accept these age groups: child (birth to 17), adult (18 to 64), older adult (65 and over). Empty means every age.",
            "items": {
              "type": "string",
              "enum": [
                "child",
                "adult",
                "older"
              ],
              "enumTitles": [
                "Child (birth to 17)",
                "Adult (18 to 64)",
                "Older adult (65+)"
              ]
            },
            "default": []
          },
          "healthyVolunteersOnly": {
            "title": "Accepts healthy volunteers",
            "type": "boolean",
            "description": "Only trials that accept healthy volunteers. Off by default.",
            "default": false
          },
          "startDateFrom": {
            "title": "Study starts on or after",
            "type": "string",
            "description": "Only trials that start on or after this date, for example 2025-01-01. Leave empty for no lower limit.",
            "default": ""
          },
          "startDateTo": {
            "title": "Study starts on or before",
            "type": "string",
            "description": "Only trials that start on or before this date.",
            "default": ""
          },
          "primaryCompletionFrom": {
            "title": "Primary completion on or after",
            "type": "string",
            "description": "Only trials whose primary completion date (last data collected for the main outcome) is on or after this date.",
            "default": ""
          },
          "primaryCompletionTo": {
            "title": "Primary completion on or before",
            "type": "string",
            "description": "Only trials whose primary completion date is on or before this date.",
            "default": ""
          },
          "completionDateFrom": {
            "title": "Study completion on or after",
            "type": "string",
            "description": "Only trials whose study completion date is on or after this date.",
            "default": ""
          },
          "completionDateTo": {
            "title": "Study completion on or before",
            "type": "string",
            "description": "Only trials whose study completion date is on or before this date.",
            "default": ""
          },
          "firstPostedFrom": {
            "title": "First posted on or after",
            "type": "string",
            "description": "Only trials first posted on ClinicalTrials.gov on or after this date: new registrations.",
            "default": ""
          },
          "firstPostedTo": {
            "title": "First posted on or before",
            "type": "string",
            "description": "Only trials first posted on or before this date.",
            "default": ""
          },
          "lastUpdatedFrom": {
            "title": "Last updated on or after",
            "type": "string",
            "description": "Only trials whose record changed on or after this date. A quick way to see what changed since your last check.",
            "default": ""
          },
          "lastUpdatedTo": {
            "title": "Last updated on or before",
            "type": "string",
            "description": "Only trials whose record last changed on or before this date.",
            "default": ""
          },
          "nearLatitude": {
            "title": "Latitude (e.g. 40.7128)",
            "type": "number",
            "description": "Latitude of a point (-90 to 90). Together with longitude and radius it keeps trials that have a site within the radius, for example 40.7128 for New York."
          },
          "nearLongitude": {
            "title": "Longitude (e.g. -74.0060)",
            "type": "number",
            "description": "Longitude of the point (-180 to 180), for example -74.0060 for New York."
          },
          "nearRadiusMiles": {
            "title": "Radius (miles)",
            "minimum": 1,
            "type": "number",
            "description": "Radius in miles around the point. All three fields are needed."
          },
          "includeLocations": {
            "title": "Add trial sites",
            "type": "boolean",
            "description": "Adds every site (facility, city, country, status). Billed per study that has sites.",
            "default": true
          },
          "includeOutcomes": {
            "title": "Add outcome measures",
            "type": "boolean",
            "description": "Primary and secondary outcome measures with timeframes.",
            "default": true
          },
          "includeReferences": {
            "title": "Add publications",
            "type": "boolean",
            "description": "Linked publications with PMIDs.",
            "default": false
          },
          "includeResults": {
            "title": "Add posted results and adverse events",
            "type": "boolean",
            "description": "Adds participant flow and adverse event totals. Billed per study that has posted results.",
            "default": false
          },
          "includeContacts": {
            "title": "Add contacts",
            "type": "boolean",
            "description": "Adds central contact, officials and site contacts. One extra event per study that has contacts.",
            "default": false
          },
          "onlyNew": {
            "title": "Only new or changed studies since last run",
            "type": "boolean",
            "description": "Only studies this same search did not return before, or that changed since (a study counts again when its last-update date moves). Skipped studies are not counted in Max Items and not charged. Sort by recently updated to make repeat runs stop early. Off by default.",
            "default": false
          },
          "stateKey": {
            "title": "Monitor name (e.g. melanoma-watch)",
            "type": "string",
            "description": "Optional label for the monitor state. Use a different label to run several independent monitors with identical filters. Leave empty to share state between runs of the same search.",
            "default": ""
          },
          "resetSeen": {
            "title": "Start the monitor over",
            "type": "boolean",
            "description": "Clear the stored list of already-seen studies for this search (and Monitor name) before the run starts, so everything counts as new again.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}