{
  "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": "P72Fkl7kKz9ngFXBD"
  },
  "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 / disease",
            "type": "string",
            "description": "Condition or disease to search on ClinicalTrials.gov, for example melanoma or type 2 diabetes. If you set no search field and no NCT IDs, the actor runs a demo search for melanoma."
          },
          "intervention": {
            "title": "Intervention / treatment",
            "type": "string",
            "description": "Drug, device or treatment to search for, for example pembrolizumab. Combine with a condition to narrow results."
          },
          "otherTerm": {
            "title": "Other search term",
            "type": "string",
            "description": "Free-text term matched across the study record."
          },
          "location": {
            "title": "Location",
            "type": "string",
            "description": "City, state or country the trial runs in (e.g. Boston, Spain)."
          },
          "sponsor": {
            "title": "Sponsor",
            "type": "string",
            "description": "Lead sponsor or collaborator name (e.g. Pfizer, National Cancer Institute)."
          },
          "nctIds": {
            "title": "Specific NCT IDs",
            "type": "array",
            "description": "Fetch exact studies by NCT number (e.g. NCT01844505). Runs in addition to the search.",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Max Items",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Maximum number of studies to return, which is also your cost cap for the study-record event. Free users are limited to 10 studies (preview). Paid users can set up to 1,000,000.",
            "default": 10
          },
          "overallStatus": {
            "title": "Recruitment status",
            "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 statuses (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",
            "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": "Phases (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": ""
          },
          "sex": {
            "title": "Sex eligible",
            "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",
            "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
          },
          "funderTypes": {
            "title": "Funder types",
            "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": []
          },
          "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": ""
          },
          "withDocuments": {
            "title": "Has 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": []
          },
          "startDateFrom": {
            "title": "Study start from (YYYY-MM-DD)",
            "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 start until (YYYY-MM-DD)",
            "type": "string",
            "description": "Only trials that start on or before this date.",
            "default": ""
          },
          "primaryCompletionFrom": {
            "title": "Primary completion from (YYYY-MM-DD)",
            "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 until (YYYY-MM-DD)",
            "type": "string",
            "description": "Only trials whose primary completion date is on or before this date.",
            "default": ""
          },
          "completionDateFrom": {
            "title": "Study completion from (YYYY-MM-DD)",
            "type": "string",
            "description": "Only trials whose study completion date is on or after this date.",
            "default": ""
          },
          "completionDateTo": {
            "title": "Study completion until (YYYY-MM-DD)",
            "type": "string",
            "description": "Only trials whose study completion date is on or before this date.",
            "default": ""
          },
          "firstPostedFrom": {
            "title": "First posted from (YYYY-MM-DD)",
            "type": "string",
            "description": "Only trials first posted on ClinicalTrials.gov on or after this date: new registrations.",
            "default": ""
          },
          "firstPostedTo": {
            "title": "First posted until (YYYY-MM-DD)",
            "type": "string",
            "description": "Only trials first posted on or before this date.",
            "default": ""
          },
          "lastUpdatedFrom": {
            "title": "Last updated from (YYYY-MM-DD)",
            "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 until (YYYY-MM-DD)",
            "type": "string",
            "description": "Only trials whose record last changed on or before this date.",
            "default": ""
          },
          "nearLatitude": {
            "title": "Near a point: latitude",
            "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": "Near a point: longitude",
            "type": "number",
            "description": "Longitude of the point (-180 to 180), for example -74.0060 for New York."
          },
          "nearRadiusMiles": {
            "title": "Near a point: radius (miles)",
            "minimum": 1,
            "type": "number",
            "description": "Radius in miles around the point. All three fields are needed."
          },
          "sortBy": {
            "title": "Sort 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": ""
          },
          "includeLocations": {
            "title": "Trial sites (locations)",
            "type": "boolean",
            "description": "Attach every site (facility, city, country, site status) to the study row. Billed per study when sites exist.",
            "default": true
          },
          "includeOutcomes": {
            "title": "Outcome measures",
            "type": "boolean",
            "description": "Primary and secondary outcome measures with timeframes.",
            "default": true
          },
          "includeReferences": {
            "title": "Publications / references",
            "type": "boolean",
            "description": "Linked publications with PMIDs.",
            "default": false
          },
          "includeResults": {
            "title": "Posted results + adverse events",
            "type": "boolean",
            "description": "For studies with posted results: participant flow, and serious/other adverse event totals per group. Billed per study that actually has results.",
            "default": false
          },
          "includeContacts": {
            "title": "Contacts",
            "type": "boolean",
            "description": "Attach the central contact (name, phone, email), the overall officials and the contacts listed at each site. One extra event per study that has contacts, once that event is priced in the Store. Off by default.",
            "default": false
          },
          "onlyNew": {
            "title": "Only new or updated studies (monitor mode)",
            "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 (optional)",
            "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": "Reset seen studies before this run",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}