{
  "openapi": "3.0.1",
  "info": {
    "title": "Clinicaltrials Scraper",
    "description": "Collect structured trial records on ClinicalTrials.gov. It supports keyword searches, country/location filters, built-in status/phase options, document availability indicators, and precise record limits so analysts can create medical research datasets in seconds.",
    "version": "1.0",
    "x-build-id": "NY6lgLcyYnqXVwNFP"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/parseforge~clinicaltrials-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-parseforge-clinicaltrials-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/parseforge~clinicaltrials-scraper/runs": {
      "post": {
        "operationId": "runs-sync-parseforge-clinicaltrials-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/parseforge~clinicaltrials-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-parseforge-clinicaltrials-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": {
          "startUrl": {
            "title": "Start URL",
            "type": "string",
            "description": "Paste a ClinicalTrials.gov search URL or an `https://clinicaltrials.gov/api/int/studies?...` endpoint. When this is set, all other filters are ignored."
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Free users: Limited to 100. Paid users: Optional, max 1,000,000"
          },
          "condition": {
            "title": "Condition/disease",
            "type": "string",
            "description": "Specific condition or disease to search for (e.g. diabetes, hypertension, cancer). This will be combined with other search terms."
          },
          "otherTerms": {
            "title": "Other terms",
            "type": "string",
            "description": "Additional search terms (e.g. symptoms, treatments, keywords). This will be combined with condition and intervention."
          },
          "intervention": {
            "title": "Intervention/treatment",
            "type": "string",
            "description": "Intervention or treatment to search for (e.g. drug name, procedure, device). This will be combined with other search terms."
          },
          "location": {
            "title": "Location",
            "type": "string",
            "description": "Search by address, city, state, zip code, or country. For information on using this field, see the How to Search for Clinical Studies page."
          },
          "studyStatusFilter": {
            "title": "Study Status",
            "enum": [
              "all",
              "recruitingAndNotYetRecruiting"
            ],
            "type": "string",
            "description": "Filter studies by status. 'All studies' shows all studies. 'Recruiting and not yet recruiting studies' shows only studies that are currently recruiting or not yet recruiting.",
            "default": "all"
          },
          "sex": {
            "title": "Sex",
            "enum": [
              "all",
              "female",
              "male"
            ],
            "type": "string",
            "description": "Filter by eligible sex.",
            "default": "all"
          },
          "ageGroups": {
            "title": "Age groups",
            "uniqueItems": true,
            "type": "array",
            "description": "Filter by standard ClinicalTrials.gov age buckets. Only used when 'Select ranges' is selected.",
            "items": {
              "type": "string",
              "enum": [
                "child",
                "adult",
                "older"
              ],
              "enumTitles": [
                "Child (birth - 17)",
                "Adult (18 - 64)",
                "Older adult (65+)"
              ]
            }
          },
          "ageRangeFrom": {
            "title": "Age range - From",
            "minimum": 0,
            "type": "number",
            "description": "Minimum age value. Only used when 'Manually enter range' is selected."
          },
          "ageRangeFromUnit": {
            "title": "Age range - From unit",
            "enum": [
              "years",
              "months",
              "weeks",
              "days",
              "hours",
              "minutes"
            ],
            "type": "string",
            "description": "Unit of measurement for the minimum age value.",
            "default": "years"
          },
          "ageRangeTo": {
            "title": "Age range - To",
            "minimum": 0,
            "type": "number",
            "description": "Maximum age value. Only used when 'Manually enter range' is selected."
          },
          "ageRangeToUnit": {
            "title": "Age range - To unit",
            "enum": [
              "years",
              "months",
              "weeks",
              "days",
              "hours",
              "minutes"
            ],
            "type": "string",
            "description": "Unit of measurement for the maximum age value.",
            "default": "years"
          },
          "acceptsHealthyVolunteers": {
            "title": "Accepts healthy volunteers",
            "type": "boolean",
            "description": "When true, only trials that accept healthy volunteers are returned."
          },
          "phases": {
            "title": "Study Phase",
            "uniqueItems": true,
            "type": "array",
            "description": "Filter interventional trials by phase labels.",
            "items": {
              "type": "string",
              "enum": [
                "phase0",
                "phase1",
                "phase2",
                "phase3",
                "phase4",
                "notApplicable"
              ],
              "enumTitles": [
                "Early Phase 1",
                "Phase 1",
                "Phase 2",
                "Phase 3",
                "Phase 4",
                "Not applicable"
              ]
            }
          },
          "studyTypes": {
            "title": "Study Type",
            "uniqueItems": true,
            "type": "array",
            "description": "Filter by study type buckets (interventional, observational, expanded access).",
            "items": {
              "type": "string",
              "enum": [
                "interventional",
                "observational",
                "patientRegistry",
                "expandedAccess",
                "expandedAccessIndividual",
                "expandedAccessIntermediate",
                "expandedAccessTreatment"
              ],
              "enumTitles": [
                "Interventional",
                "Observational",
                "Patient registries",
                "Expanded access",
                "Individual patients",
                "Intermediate-size population",
                "Treatment IND/Protocol"
              ]
            }
          },
          "resultsAvailability": {
            "title": "Study Results",
            "enum": [
              "any",
              "withResults",
              "withoutResults"
            ],
            "type": "string",
            "description": "Limit to studies with or without posted results.",
            "default": "any"
          },
          "documentTypes": {
            "title": "Study Documents",
            "uniqueItems": true,
            "type": "array",
            "description": "Return only studies with specific document uploads (protocols, SAPs, informed consent forms).",
            "items": {
              "type": "string",
              "enum": [
                "protocol",
                "sap",
                "consent"
              ],
              "enumTitles": [
                "Study protocols",
                "Statistical analysis plans (SAPs)",
                "Informed consent forms (ICFs)"
              ]
            }
          },
          "funderTypes": {
            "title": "Funder Type",
            "uniqueItems": true,
            "type": "array",
            "description": "Filter by the lead sponsor / funder class reported to ClinicalTrials.gov.",
            "items": {
              "type": "string",
              "enum": [
                "nih",
                "federal",
                "industry",
                "other"
              ],
              "enumTitles": [
                "NIH",
                "Other U.S. federal agency",
                "Industry",
                "All others (individuals, universities, organizations)"
              ]
            }
          },
          "studyStartDateFrom": {
            "title": "Study Start - From date",
            "type": "string",
            "description": "Start date (YYYY-MM-DD)"
          },
          "studyStartDateTo": {
            "title": "Study Start - To date",
            "type": "string",
            "description": "End date (YYYY-MM-DD)"
          },
          "primaryCompletionDateFrom": {
            "title": "Primary completion - From date",
            "type": "string",
            "description": "Start date (YYYY-MM-DD)"
          },
          "primaryCompletionDateTo": {
            "title": "Primary completion - To date",
            "type": "string",
            "description": "End date (YYYY-MM-DD)"
          },
          "studyCompletionDateFrom": {
            "title": "Study completion - From date",
            "type": "string",
            "description": "Start date (YYYY-MM-DD)"
          },
          "studyCompletionDateTo": {
            "title": "Study completion - To date",
            "type": "string",
            "description": "End date (YYYY-MM-DD)"
          },
          "firstPostedDateFrom": {
            "title": "First posted - From date",
            "type": "string",
            "description": "Start date (YYYY-MM-DD)"
          },
          "firstPostedDateTo": {
            "title": "First posted - To date",
            "type": "string",
            "description": "End date (YYYY-MM-DD)"
          },
          "resultsFirstPostedDateFrom": {
            "title": "Results first posted - From date",
            "type": "string",
            "description": "Start date (YYYY-MM-DD)"
          },
          "resultsFirstPostedDateTo": {
            "title": "Results first posted - To date",
            "type": "string",
            "description": "End date (YYYY-MM-DD)"
          },
          "lastUpdatePostedDateFrom": {
            "title": "Last update posted - From date",
            "type": "string",
            "description": "Start date (YYYY-MM-DD)"
          },
          "lastUpdatePostedDateTo": {
            "title": "Last update posted - To date",
            "type": "string",
            "description": "End date (YYYY-MM-DD)"
          },
          "titleOrAcronym": {
            "title": "Title and/or Title Acronym",
            "type": "string",
            "description": "Search by study title or its acronym."
          },
          "outcomeMeasure": {
            "title": "Outcome measure",
            "type": "string",
            "description": "Search by outcome measures used in the study."
          },
          "sponsorOrCollaborator": {
            "title": "Sponsor and/or Collaborator",
            "type": "string",
            "description": "Search by sponsor name or collaborator name."
          },
          "leadSponsor": {
            "title": "Sponsor (Lead)",
            "type": "string",
            "description": "Search by the lead sponsor name specifically."
          },
          "studyIds": {
            "title": "Study IDs",
            "type": "string",
            "description": "Search by study identification numbers (e.g., NCT number, protocol ID)."
          },
          "facilityName": {
            "title": "Facility Name",
            "type": "string",
            "description": "Search by the name of the facility where the study is conducted."
          },
          "fdaRegulationViolation": {
            "title": "FDAAA violation flag",
            "type": "boolean",
            "description": "Only return studies flagged for FDAAA results submission violations."
          },
          "sortBy": {
            "title": "Sort studies by",
            "enum": [
              "relevance",
              "newestFirst"
            ],
            "type": "string",
            "description": "Sort search results by relevance or by newest entries first.",
            "default": "relevance"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}