{
  "openapi": "3.0.1",
  "info": {
    "title": "ClinicalTrials.gov Scraper & Monitor ($2/1K trials)",
    "description": "Input: condition, drug, sponsor, location, status or phase filters. Output: flat ClinicalTrials.gov trial records with eligibility, outcomes, sites and contacts. $2 per 1,000 trials. Includes a new/updated-only monitor mode.",
    "version": "0.1",
    "x-build-id": "ocgwuiLMOYcsz1pao"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/wintersworks~clinical-trials-search-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-wintersworks-clinical-trials-search-monitor",
        "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/wintersworks~clinical-trials-search-monitor/runs": {
      "post": {
        "operationId": "runs-sync-wintersworks-clinical-trials-search-monitor",
        "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/wintersworks~clinical-trials-search-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-wintersworks-clinical-trials-search-monitor",
        "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": "e.g. diabetes, breast cancer, Alzheimer's.",
            "default": "diabetes"
          },
          "intervention": {
            "title": "Intervention / drug",
            "type": "string",
            "description": "Drug, device or procedure name, e.g. semaglutide.",
            "default": ""
          },
          "sponsor": {
            "title": "Sponsor / collaborator",
            "type": "string",
            "description": "e.g. Pfizer, National Cancer Institute.",
            "default": ""
          },
          "country": {
            "title": "Country",
            "type": "string",
            "description": "e.g. United States, Germany.",
            "default": ""
          },
          "state": {
            "title": "State / province",
            "type": "string",
            "description": "State / province.",
            "default": ""
          },
          "city": {
            "title": "City",
            "type": "string",
            "description": "City.",
            "default": ""
          },
          "query": {
            "title": "Free-text query",
            "type": "string",
            "description": "Searches all fields. Supports AND / OR / NOT operators.",
            "default": ""
          },
          "statuses": {
            "title": "Overall 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"
              ]
            },
            "default": []
          },
          "phases": {
            "title": "Phase",
            "type": "array",
            "description": "Leave empty for all phases.",
            "items": {
              "type": "string",
              "enum": [
                "EARLY_PHASE1",
                "PHASE1",
                "PHASE2",
                "PHASE3",
                "PHASE4",
                "NA"
              ]
            },
            "default": []
          },
          "studyType": {
            "title": "Study type",
            "enum": [
              "ANY",
              "INTERVENTIONAL",
              "OBSERVATIONAL",
              "EXPANDED_ACCESS"
            ],
            "type": "string",
            "description": "Study type.",
            "default": "ANY"
          },
          "startDateFrom": {
            "title": "Start date from",
            "type": "string",
            "description": "YYYY-MM-DD",
            "default": ""
          },
          "startDateTo": {
            "title": "Start date to",
            "type": "string",
            "description": "YYYY-MM-DD",
            "default": ""
          },
          "updatedFrom": {
            "title": "Last updated from",
            "type": "string",
            "description": "YYYY-MM-DD",
            "default": ""
          },
          "updatedTo": {
            "title": "Last updated to",
            "type": "string",
            "description": "YYYY-MM-DD",
            "default": ""
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum trials to return (billed per result).",
            "default": 20
          },
          "includeEligibilityText": {
            "title": "Include full eligibility criteria text",
            "type": "boolean",
            "description": "Include full eligibility criteria text.",
            "default": false
          },
          "eligibilityMaxChars": {
            "title": "Eligibility text max characters",
            "minimum": 0,
            "type": "integer",
            "description": "Truncate criteria text to this length (0 = no truncation).",
            "default": 1500
          },
          "onlyNew": {
            "title": "Only new or updated trials (monitor mode)",
            "type": "boolean",
            "description": "Remembers NCT IDs and last-update dates between runs (per identical search) and emits only trials not seen before or updated since. Use with a schedule.",
            "default": false
          },
          "stateStoreName": {
            "title": "Monitor state store name",
            "type": "string",
            "description": "Monitor state store name.",
            "default": "clinical-trials-seen"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}