{
  "openapi": "3.0.1",
  "info": {
    "title": "Clinical Trial Monitor",
    "description": "Track clinical trials on ClinicalTrials.gov by condition, sponsor, drug or location. Returns phase, status, enrollment, sites and sponsor for every study, and flags new trials, status changes and posted results since your last run.",
    "version": "0.1",
    "x-build-id": "77JIu2UhAL7cETc2M"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/arched_friend~clinical-trial-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-arched_friend-clinical-trial-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/arched_friend~clinical-trial-monitor/runs": {
      "post": {
        "operationId": "runs-sync-arched_friend-clinical-trial-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/arched_friend~clinical-trial-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-arched_friend-clinical-trial-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",
        "required": [
          "condition"
        ],
        "properties": {
          "condition": {
            "title": "Condition or disease",
            "type": "string",
            "description": "The disease area to search, for example melanoma or type 2 diabetes."
          },
          "sponsor": {
            "title": "Sponsor",
            "type": "string",
            "description": "Optional. Limit to one organisation, for example Merck or Pfizer. Use this to watch a competitor's pipeline."
          },
          "intervention": {
            "title": "Drug or intervention",
            "type": "string",
            "description": "Optional. A drug, device or procedure name, for example pembrolizumab."
          },
          "terms": {
            "title": "Other search terms",
            "type": "string",
            "description": "Optional. Free text searched across the whole record."
          },
          "location": {
            "title": "Location",
            "type": "string",
            "description": "Optional. A country, state or city where the trial has a site, for example Germany."
          },
          "statuses": {
            "title": "Recruitment status",
            "type": "array",
            "description": "Limit to these statuses. Leave empty for all of them.",
            "items": {
              "type": "string",
              "enum": [
                "NOT_YET_RECRUITING",
                "RECRUITING",
                "ENROLLING_BY_INVITATION",
                "ACTIVE_NOT_RECRUITING",
                "SUSPENDED",
                "TERMINATED",
                "COMPLETED",
                "WITHDRAWN",
                "UNKNOWN"
              ],
              "enumTitles": [
                "Not yet recruiting",
                "Recruiting",
                "Enrolling by invitation",
                "Active, not recruiting",
                "Suspended",
                "Terminated",
                "Completed",
                "Withdrawn",
                "Unknown"
              ]
            },
            "default": []
          },
          "phases": {
            "title": "Phases",
            "type": "array",
            "description": "Keep only these trial phases. Leave empty for all.",
            "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"
              ]
            },
            "default": []
          },
          "sponsorClasses": {
            "title": "Sponsor type",
            "type": "array",
            "description": "Keep only trials run by these kinds of organisation. Industry means a company rather than a university or government body.",
            "items": {
              "type": "string",
              "enum": [
                "INDUSTRY",
                "NIH",
                "FED",
                "OTHER_GOV",
                "NETWORK",
                "INDIV",
                "OTHER"
              ],
              "enumTitles": [
                "Industry",
                "NIH",
                "US federal",
                "Other government",
                "Network",
                "Individual",
                "Other"
              ]
            },
            "default": []
          },
          "countries": {
            "title": "Countries with a site",
            "type": "array",
            "description": "Keep only trials that have a site in one of these countries, spelled as the registry spells them, for example United States.",
            "items": {
              "type": "string"
            }
          },
          "minEnrollment": {
            "title": "Minimum enrolment",
            "minimum": 0,
            "type": "integer",
            "description": "Drop trials smaller than this. Trials that publish no target are always kept, because a missing number is not a small one.",
            "default": 0
          },
          "recruitingOnly": {
            "title": "Only trials open to enrolment",
            "type": "boolean",
            "description": "Keep only trials recruiting, not yet recruiting, or enrolling by invitation.",
            "default": false
          },
          "titleExcludes": {
            "title": "Exclude wording",
            "type": "array",
            "description": "Drop trials whose title or conditions contain any of these, one per line.",
            "items": {
              "type": "string"
            }
          },
          "onlyChanged": {
            "title": "Only new and changed trials",
            "type": "boolean",
            "description": "Return nothing on a quiet run. Turn this on for a scheduled search so you only hear about new trials, status changes and posted results.",
            "default": false
          },
          "maxResults": {
            "title": "Maximum trials to return",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "The most trials to pull in one run, most recently updated first.",
            "default": 200
          },
          "requestTimeoutSecs": {
            "title": "Request timeout (seconds)",
            "minimum": 5,
            "maximum": 300,
            "type": "integer",
            "description": "How long to wait for a single page of results before giving up on it.",
            "default": 45
          },
          "timeBudgetSecs": {
            "title": "Time budget (seconds)",
            "minimum": 30,
            "maximum": 3600,
            "type": "integer",
            "description": "How long the run may spend paging before it returns what it has. Keeps a scheduled run predictable.",
            "default": 180
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}