{
  "openapi": "3.0.1",
  "info": {
    "title": "Clinical Trials Tracker, from ClinicalTrials.gov data",
    "description": "Search public ClinicalTrials.gov data by condition, drug, sponsor, phase, status and country, and track what changed since the last run: new trials, status changes and date changes.",
    "version": "0.1",
    "x-build-id": "r7LeXLTSpprhDmaM2"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/br_data_hub~clinical-trials-tracker/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-br_data_hub-clinical-trials-tracker",
        "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/br_data_hub~clinical-trials-tracker/runs": {
      "post": {
        "operationId": "runs-sync-br_data_hub-clinical-trials-tracker",
        "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/br_data_hub~clinical-trials-tracker/run-sync": {
      "post": {
        "operationId": "run-sync-br_data_hub-clinical-trials-tracker",
        "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 or disease",
            "type": "string",
            "description": "Type a disease or condition as on ClinicalTrials.gov, e.g. obesity, non-small cell lung cancer or Alzheimer disease. The registry expands synonyms.",
            "default": "obesity"
          },
          "intervention": {
            "title": "Intervention or drug",
            "type": "string",
            "description": "Type a drug, device or procedure by generic name, brand name or code, e.g. semaglutide, Keytruda or AMG 355."
          },
          "sponsor": {
            "title": "Sponsor",
            "type": "string",
            "description": "Type a company or institution that sponsors or collaborates on the study, e.g. Novo Nordisk or National Cancer Institute."
          },
          "phases": {
            "title": "Phases",
            "type": "array",
            "description": "Pick the phases to keep. Phase 1/2 studies match both Phase 1 and Phase 2. 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"
              ]
            },
            "default": [
              "PHASE3"
            ]
          },
          "statuses": {
            "title": "Recruitment status",
            "type": "array",
            "description": "Pick the overall statuses to keep, e.g. Recruiting. Leave empty for all statuses (recommended with change tracking, so moves such as Recruiting to Completed stay visible).",
            "items": {
              "type": "string",
              "enum": [
                "NOT_YET_RECRUITING",
                "RECRUITING",
                "ENROLLING_BY_INVITATION",
                "ACTIVE_NOT_RECRUITING",
                "COMPLETED",
                "SUSPENDED",
                "TERMINATED",
                "WITHDRAWN",
                "UNKNOWN",
                "AVAILABLE",
                "NO_LONGER_AVAILABLE",
                "TEMPORARILY_NOT_AVAILABLE",
                "APPROVED_FOR_MARKETING",
                "WITHHELD"
              ],
              "enumTitles": [
                "Not yet recruiting",
                "Recruiting",
                "Enrolling by invitation",
                "Active not recruiting",
                "Completed",
                "Suspended",
                "Terminated",
                "Withdrawn",
                "Unknown",
                "Available",
                "No longer available",
                "Temporarily not available",
                "Approved for marketing",
                "Withheld"
              ]
            },
            "default": [
              "RECRUITING"
            ]
          },
          "countries": {
            "title": "Countries",
            "type": "array",
            "description": "Enter countries in English as on ClinicalTrials.gov, one per line, e.g. United States, Brazil. Studies with at least one site in any of them are kept.",
            "items": {
              "type": "string"
            }
          },
          "updatedSince": {
            "title": "Updated since",
            "type": "string",
            "description": "Pick a date to keep only studies whose record was last updated on or after it."
          },
          "searchTerms": {
            "title": "Other terms",
            "type": "string",
            "description": "Type free text or an Essie expression searched in all study fields, e.g. \"GLP-1\" or AREA[StudyType]INTERVENTIONAL. See the ClinicalTrials.gov search syntax."
          },
          "nctIds": {
            "title": "NCT IDs",
            "type": "array",
            "description": "Enter trial IDs to follow, one per line, e.g. NCT06131398 (your portfolio, partners or competitors). Combined with the other filters; leave the condition empty to track exactly these trials.",
            "items": {
              "type": "string"
            }
          },
          "trackChanges": {
            "title": "Only changes since last run",
            "type": "boolean",
            "description": "Turn on for scheduled runs: the Actor keeps a snapshot in a named key-value store and marks each study NEW, STATUS_CHANGED, DATES_CHANGED or UNCHANGED. Only new and changed studies are returned and charged.",
            "default": false
          },
          "includeUnchanged": {
            "title": "Also return unchanged",
            "type": "boolean",
            "description": "Turn on to also return studies marked UNCHANGED (free of charge). After the first run only recently updated studies are read, so this lists unchanged studies among those.",
            "default": false
          },
          "firstRunAsBaseline": {
            "title": "First run is baseline",
            "type": "boolean",
            "description": "Turn on to have the first run (no snapshot yet) only save the snapshot, without returning or charging any study. Later runs report only what changed.",
            "default": false
          },
          "snapshotName": {
            "title": "Snapshot name",
            "type": "string",
            "description": "Name this watch list, e.g. obesity-phase3, so several schedules can track different searches. Leave empty to derive it from the filters (changing the filters then starts a new snapshot)."
          },
          "storeName": {
            "title": "Key-value store",
            "type": "string",
            "description": "Type the name of the key-value store in your Apify account that keeps the snapshots between runs.",
            "default": "clinical-trials-tracker"
          },
          "maxResults": {
            "title": "Max studies",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Set the maximum number of studies read per run, e.g. 100. With change tracking, set it above the number of matching studies so the snapshot covers the whole search.",
            "default": 100
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}