{
  "openapi": "3.0.1",
  "info": {
    "title": "ClinicalTrials.gov Scraper: Clinical Trials Search API & Alerts",
    "description": "Search clinical trials from the official ClinicalTrials.gov API by condition, drug, sponsor, phase, status, location and dates. Sponsors, sites, enrollment, outcomes, eligibility. New-trial alerts. No contact persons. $1 per 1,000 studies.",
    "version": "1.0",
    "x-build-id": "QyLuNQuAAa1buMn5t"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/manageable_gully~clinical-trials-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-manageable_gully-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/manageable_gully~clinical-trials-scraper/runs": {
      "post": {
        "operationId": "runs-sync-manageable_gully-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/manageable_gully~clinical-trials-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-manageable_gully-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": {
          "conditions": {
            "title": "Conditions / diseases",
            "type": "array",
            "description": "Disease or condition, e.g. `lung cancer`, `type 2 diabetes`, `Alzheimer`. Several values are combined with OR. Uses ClinicalTrials.gov synonyms (e.g. `NSCLC`).",
            "items": {
              "type": "string"
            }
          },
          "searchTerms": {
            "title": "Other terms (full text)",
            "type": "string",
            "description": "Free-text search across the whole study record (title, summary, keywords, outcomes). Supports AND, OR, NOT and quotes, e.g. `immunotherapy AND \"first line\"`."
          },
          "interventions": {
            "title": "Interventions / drugs",
            "type": "array",
            "description": "Drug, device, procedure or behavioural intervention, e.g. `semaglutide`, `pembrolizumab`, `CAR-T`.",
            "items": {
              "type": "string"
            }
          },
          "sponsors": {
            "title": "Sponsors / collaborators",
            "type": "array",
            "description": "Sponsor or collaborator organisation, e.g. `Pfizer`, `National Cancer Institute`, `Novo Nordisk`.",
            "items": {
              "type": "string"
            }
          },
          "locations": {
            "title": "Location terms",
            "type": "array",
            "description": "Country, state or city of study sites, e.g. `Israel`, `Germany`, `Boston`. For a radius search use Near location.",
            "items": {
              "type": "string"
            }
          },
          "titleTerms": {
            "title": "Title / acronym terms",
            "type": "string",
            "description": "Search only in titles and acronyms."
          },
          "nctIds": {
            "title": "NCT IDs (lookup)",
            "type": "array",
            "description": "Fetch specific studies by ID, e.g. `NCT04368728`. Up to 1,000 IDs.",
            "items": {
              "type": "string"
            }
          },
          "statuses": {
            "title": "Recruitment status",
            "type": "array",
            "description": "Leave empty for all statuses.",
            "items": {
              "type": "string",
              "enum": [
                "RECRUITING",
                "NOT_YET_RECRUITING",
                "ENROLLING_BY_INVITATION",
                "ACTIVE_NOT_RECRUITING",
                "COMPLETED",
                "SUSPENDED",
                "TERMINATED",
                "WITHDRAWN",
                "UNKNOWN",
                "AVAILABLE",
                "NO_LONGER_AVAILABLE",
                "TEMPORARILY_NOT_AVAILABLE",
                "APPROVED_FOR_MARKETING",
                "WITHHELD"
              ],
              "enumTitles": [
                "Recruiting",
                "Not yet recruiting",
                "Enrolling by invitation",
                "Active, not recruiting",
                "Completed",
                "Suspended",
                "Terminated",
                "Withdrawn",
                "Unknown",
                "Expanded access: available",
                "Expanded access: no longer available",
                "Expanded access: temporarily not available",
                "Expanded access: approved for marketing",
                "Withheld"
              ]
            }
          },
          "phases": {
            "title": "Phases",
            "type": "array",
            "description": "Leave empty for all phases.",
            "items": {
              "type": "string",
              "enum": [
                "EARLY_PHASE1",
                "PHASE1",
                "PHASE2",
                "PHASE3",
                "PHASE4",
                "NA"
              ],
              "enumTitles": [
                "Early phase 1",
                "Phase 1",
                "Phase 2",
                "Phase 3",
                "Phase 4",
                "Not applicable"
              ]
            }
          },
          "studyTypes": {
            "title": "Study types",
            "type": "array",
            "description": "Leave empty for all study types.",
            "items": {
              "type": "string",
              "enum": [
                "INTERVENTIONAL",
                "OBSERVATIONAL",
                "EXPANDED_ACCESS"
              ],
              "enumTitles": [
                "Interventional (clinical trial)",
                "Observational",
                "Expanded access"
              ]
            }
          },
          "sponsorClasses": {
            "title": "Funder type",
            "type": "array",
            "description": "Lead sponsor class, e.g. only industry-funded trials.",
            "items": {
              "type": "string",
              "enum": [
                "INDUSTRY",
                "NIH",
                "FED",
                "OTHER_GOV",
                "NETWORK",
                "OTHER"
              ],
              "enumTitles": [
                "Industry",
                "NIH",
                "Other U.S. federal",
                "Other government",
                "Network",
                "Other (universities, hospitals, foundations)"
              ]
            }
          },
          "onlyWithResults": {
            "title": "Only studies with posted results",
            "type": "boolean",
            "description": "Only studies that have posted results on ClinicalTrials.gov.",
            "default": false
          },
          "postedFrom": {
            "title": "First posted from",
            "type": "string",
            "description": "YYYY-MM-DD, YYYY-MM or relative (`7 days`, `3 months`, `1 year`). New trials only: use this with sort Newest."
          },
          "postedTo": {
            "title": "First posted to",
            "type": "string",
            "description": "Optional end of the first-posted window."
          },
          "updatedFrom": {
            "title": "Last updated from",
            "type": "string",
            "description": "Studies updated since this date (status changes, new sites, results)."
          },
          "updatedTo": {
            "title": "Last updated to",
            "type": "string",
            "description": "Optional end of the last-updated window."
          },
          "startFrom": {
            "title": "Study start from",
            "type": "string",
            "description": "Study start date from (actual or anticipated)."
          },
          "startTo": {
            "title": "Study start to",
            "type": "string",
            "description": "Study start date to."
          },
          "completionFrom": {
            "title": "Primary completion from",
            "type": "string",
            "description": "E.g. readouts expected in the next year: from `today` to `2027-12-31`."
          },
          "completionTo": {
            "title": "Primary completion to",
            "type": "string",
            "description": "Optional end of the primary completion window."
          },
          "minEnrollment": {
            "title": "Min enrollment",
            "minimum": 0,
            "type": "integer",
            "description": "Only studies with at least this many participants (actual or estimated)."
          },
          "sex": {
            "title": "Eligible sex",
            "enum": [
              "",
              "FEMALE",
              "MALE"
            ],
            "type": "string",
            "description": "Only studies that accept this sex (studies open to all are included).",
            "default": ""
          },
          "healthyVolunteers": {
            "title": "Only studies accepting healthy volunteers",
            "type": "boolean",
            "description": "Only studies that accept healthy volunteers.",
            "default": false
          },
          "nearLocation": {
            "title": "Near location (radius)",
            "type": "object",
            "description": "Sites within a radius, e.g. `{\"lat\": 40.71, \"lon\": -74.0, \"distance\": \"50mi\"}` (mi or km)."
          },
          "expertQuery": {
            "title": "Expert query (advanced)",
            "type": "string",
            "description": "Raw ClinicalTrials.gov Essie expression, ANDed with the filters, e.g. `AREA[LocationCountry]Israel` or `AREA[DesignMasking]QUADRUPLE`."
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "last-updated",
              "newest",
              "start-date",
              "enrollment",
              "relevance"
            ],
            "type": "string",
            "description": "Order of results.",
            "default": "last-updated"
          },
          "maxItems": {
            "title": "Max studies",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many studies. Empty = 1,000. 0 = no limit."
          },
          "includeEligibility": {
            "title": "Include eligibility criteria text",
            "type": "boolean",
            "description": "Add the full inclusion/exclusion criteria text (cut at Max characters).",
            "default": true
          },
          "includeLocations": {
            "title": "Include study sites",
            "type": "boolean",
            "description": "Facility, status, city, state, country and coordinates of each site (no contacts).",
            "default": true
          },
          "maxLocations": {
            "title": "Max sites per study",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "Cut the site list per study at this number (0 = no site list).",
            "default": 50
          },
          "maxTextChars": {
            "title": "Max characters per text field",
            "minimum": 200,
            "maximum": 20000,
            "type": "integer",
            "description": "Summary and eligibility text are cut at this length.",
            "default": 3000
          },
          "onlyNew": {
            "title": "Only new studies (alerts)",
            "type": "boolean",
            "description": "Remember studies already delivered (per State key) and return only new ones on the next run. Already-seen studies are free. Schedule daily for trial alerts.",
            "default": false
          },
          "alertOnUpdates": {
            "title": "Also alert on updated studies",
            "type": "boolean",
            "description": "With Only new: a study counts as new again when its last-update date changes (status change, new sites, results posted).",
            "default": false
          },
          "stateKey": {
            "title": "State key",
            "type": "string",
            "description": "Separate alert memory per saved search.",
            "default": "default"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}