{
  "openapi": "3.0.1",
  "info": {
    "title": "ClinicalTrials.gov Feed: New Trials, Status Changes & Results",
    "description": "Daily feed of new clinical trials from the official ClinicalTrials.gov API (public domain), plus status changes (recruiting, completed, terminated, withdrawn) and newly posted results. Filter by condition, drug, sponsor, sponsor class, phase, country. No contact data.",
    "version": "0.1",
    "x-build-id": "6JqEFWg10Xfddmemg"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/moment-data~clinical-trials-new-studies-feed/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-moment-data-clinical-trials-new-studies-feed",
        "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/moment-data~clinical-trials-new-studies-feed/runs": {
      "post": {
        "operationId": "runs-sync-moment-data-clinical-trials-new-studies-feed",
        "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/moment-data~clinical-trials-new-studies-feed/run-sync": {
      "post": {
        "operationId": "run-sync-moment-data-clinical-trials-new-studies-feed",
        "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": {
          "eventTypes": {
            "title": "Event types",
            "type": "array",
            "description": "newStudies = studies first posted in the window (default). statusChanges = studies whose record was updated in the window and whose current status is a watched status (see Overall status), e.g. newly RECRUITING, COMPLETED, TERMINATED, WITHDRAWN. resultsPosted = studies whose results were first posted in the window. Empty = newStudies only.",
            "items": {
              "type": "string"
            }
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "window",
              "sinceLastRun"
            ],
            "type": "string",
            "description": "window (default): studies in the last N days, no saved state. sinceLastRun: only events not delivered before for this State key (and, for statusChanges, confirmed against the status saved last time). Use sinceLastRun for daily schedules.",
            "default": "window"
          },
          "daysBack": {
            "title": "Days back",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "Window of posting days ending today. ClinicalTrials.gov posts new records once a day, Monday to Friday (about 150-270 new studies per weekday). In window mode the window is widened (up to 7 extra days) when it holds fewer than Max records, so weekend runs still return the latest postings. Also the first-run window in sinceLastRun mode.",
            "default": 2
          },
          "conditions": {
            "title": "Conditions / diseases",
            "type": "array",
            "description": "Disease or condition terms, matched by ClinicalTrials.gov's condition search (synonyms included), e.g. obesity, non-small cell lung cancer, Alzheimer. Several terms = any of them. Empty = all.",
            "items": {
              "type": "string"
            }
          },
          "interventions": {
            "title": "Interventions (drug, device, keyword)",
            "type": "array",
            "description": "Intervention / treatment terms, e.g. semaglutide, CAR-T, monoclonal antibody, pembrolizumab, gene therapy, device. Several terms = any of them.",
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "title": "Other keywords (anywhere)",
            "type": "array",
            "description": "Free-text terms searched across the whole record (titles, summary, keywords, outcomes). Several terms = any of them.",
            "items": {
              "type": "string"
            }
          },
          "sponsorNames": {
            "title": "Sponsor / collaborator names",
            "type": "array",
            "description": "Lead sponsor or collaborator names, e.g. Pfizer, Novartis, Mayo Clinic, National Cancer Institute. Several names = any of them.",
            "items": {
              "type": "string"
            }
          },
          "sponsorClasses": {
            "title": "Lead sponsor class",
            "type": "array",
            "description": "INDUSTRY (pharma, biotech, medtech), NIH, FED (other US federal), OTHER_GOV (non-US government), NETWORK, OTHER (universities, hospitals, nonprofits). Empty = all.",
            "items": {
              "type": "string"
            }
          },
          "phases": {
            "title": "Phases",
            "type": "array",
            "description": "EARLY_PHASE1, PHASE1, PHASE2, PHASE3, PHASE4, NA (not applicable, e.g. device or behavioral studies). Shortcuts: 1, 2, 3, 4, 1/2, II. Empty = all.",
            "items": {
              "type": "string"
            }
          },
          "studyTypes": {
            "title": "Study types",
            "type": "array",
            "description": "INTERVENTIONAL, OBSERVATIONAL, EXPANDED_ACCESS. Empty = all.",
            "items": {
              "type": "string"
            }
          },
          "countries": {
            "title": "Site countries",
            "type": "array",
            "description": "Countries with at least one study site: ISO codes (US, GB, DE, CN, JP) or names (United States, Germany). Note: many new studies list no sites yet, so a country filter drops them. Empty = worldwide.",
            "items": {
              "type": "string"
            }
          },
          "overallStatuses": {
            "title": "Overall status",
            "type": "array",
            "description": "Current overall status: NOT_YET_RECRUITING, RECRUITING, ENROLLING_BY_INVITATION, ACTIVE_NOT_RECRUITING, SUSPENDED, TERMINATED, COMPLETED, WITHDRAWN, UNKNOWN. Applies to all event types. For statusChanges, empty = watch RECRUITING, ACTIVE_NOT_RECRUITING, COMPLETED, TERMINATED, WITHDRAWN, SUSPENDED.",
            "items": {
              "type": "string"
            }
          },
          "onlyLikelyStatusChanges": {
            "title": "statusChanges: only likely real changes",
            "type": "boolean",
            "description": "Most daily record updates are routine edits. When on, a study seen for the first time is delivered only if its status looks freshly changed: TERMINATED / WITHDRAWN / SUSPENDED not stopped long ago, COMPLETED with an actual completion date in the last 180 days, RECRUITING with an actual start in the last 120 days, ACTIVE_NOT_RECRUITING with an actual primary completion in the last 120 days. In sinceLastRun mode, studies already seen are delivered only when their status differs from the saved one (statusSignal = confirmed-change). Turn off to get every updated record with a watched status.",
            "default": true
          },
          "maxItems": {
            "title": "Max records per run",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Hard cap on delivered records (also caps your spend), split evenly across event types. Default is small so a first run is quick and cheap; raise it for production.",
            "default": 30
          },
          "autoExtend": {
            "title": "Widen window when it is short (window mode)",
            "type": "boolean",
            "description": "In window mode, look up to 7 extra days back when the window holds fewer than Max records (newest first). Turn off to get exactly the Days back window.",
            "default": true
          },
          "stateKey": {
            "title": "State key",
            "type": "string",
            "description": "Name of the saved search for sinceLastRun mode. Each key keeps its own history, so use one key per schedule / filter set.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}