{
  "openapi": "3.0.1",
  "info": {
    "title": "Clinical Trials Intelligence & Pipeline Monitor",
    "description": "Scrape ClinicalTrials.gov via the official API. Search 500k+ trials, monitor competitor pipelines, and extract investigator & site contacts. No API key",
    "version": "0.1",
    "x-build-id": "2xfqjJWauG0wMVfgg"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/fayoussef~clinical-trials-intelligence/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-fayoussef-clinical-trials-intelligence",
        "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/fayoussef~clinical-trials-intelligence/runs": {
      "post": {
        "operationId": "runs-sync-fayoussef-clinical-trials-intelligence",
        "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/fayoussef~clinical-trials-intelligence/run-sync": {
      "post": {
        "operationId": "run-sync-fayoussef-clinical-trials-intelligence",
        "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 terms (e.g. \"non-small cell lung cancer\", \"type 2 diabetes\"). Multiple values are combined with OR.",
            "items": {
              "type": "string"
            }
          },
          "sponsor": {
            "title": "Sponsor / organization",
            "type": "string",
            "description": "Lead sponsor or collaborator name to track a specific company's or institution's pipeline (e.g. \"Pfizer\", \"Memorial Sloan Kettering\")."
          },
          "interventions": {
            "title": "Interventions / drugs",
            "type": "array",
            "description": "Drug, device or procedure names (e.g. \"pembrolizumab\"). Multiple values are combined with OR.",
            "items": {
              "type": "string"
            }
          },
          "terms": {
            "title": "Free-text search",
            "type": "string",
            "description": "Free-text query applied across the whole study record. Supports ClinicalTrials.gov search syntax."
          },
          "location": {
            "title": "Location",
            "type": "string",
            "description": "Geographic filter for study sites — city, state or country (e.g. \"Boston\", \"Germany\")."
          },
          "status": {
            "title": "Recruitment status",
            "type": "array",
            "description": "Limit to one or more overall recruitment statuses. Leave empty for all statuses.",
            "items": {
              "type": "string",
              "enum": [
                "RECRUITING",
                "NOT_YET_RECRUITING",
                "ENROLLING_BY_INVITATION",
                "ACTIVE_NOT_RECRUITING",
                "COMPLETED",
                "SUSPENDED",
                "TERMINATED",
                "WITHDRAWN",
                "AVAILABLE",
                "NO_LONGER_AVAILABLE",
                "WITHHELD",
                "UNKNOWN"
              ],
              "enumTitles": [
                "Recruiting",
                "Not yet recruiting",
                "Enrolling by invitation",
                "Active, not recruiting",
                "Completed",
                "Suspended",
                "Terminated",
                "Withdrawn",
                "Available",
                "No longer available",
                "Withheld",
                "Unknown status"
              ]
            }
          },
          "phases": {
            "title": "Trial phases",
            "type": "array",
            "description": "Limit to one or more clinical trial phases. Leave empty for all phases. (Note: NA / non-applicable studies are excluded when any phase is selected.)",
            "items": {
              "type": "string",
              "enum": [
                "EARLY_PHASE1",
                "PHASE1",
                "PHASE2",
                "PHASE3",
                "PHASE4"
              ],
              "enumTitles": [
                "Early Phase 1",
                "Phase 1",
                "Phase 2",
                "Phase 3",
                "Phase 4"
              ]
            }
          },
          "sortBy": {
            "title": "Sort order",
            "enum": [
              "RELEVANCE",
              "LAST_UPDATE_DESC",
              "START_DATE_DESC"
            ],
            "type": "string",
            "description": "How to order results. \"Most recently updated\" is recommended for scheduled monitoring so new and changed trials surface first.",
            "default": "RELEVANCE"
          },
          "maxItems": {
            "title": "Maximum trials",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum number of trials to return. Set to 0 for no limit (fetch every matching trial). Free Apify plans are capped at 25 results.",
            "default": 100
          },
          "enrichContacts": {
            "title": "Enrich investigator & site contacts",
            "type": "boolean",
            "description": "Extract and structure central contacts, overall officials (principal investigators) and study-site contacts (name, role, phone, email). This is the premium enrichment and is billed only for trials where at least one contact is found.",
            "default": true
          },
          "includeRawProtocol": {
            "title": "Include raw protocol section",
            "type": "boolean",
            "description": "Append the complete raw ClinicalTrials.gov protocolSection object to every record for power users who need every field. Increases output size.",
            "default": false
          },
          "stateStoreName": {
            "title": "Monitoring state store (for change tracking)",
            "type": "string",
            "description": "Optional. Name of a named key-value store used to remember trials seen in previous runs. When set, each record is flagged with isNew and statusChanged so scheduled runs become a pipeline-change monitor. Leave empty for a one-off run (no change tracking)."
          },
          "pageSize": {
            "title": "API page size",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Advanced: number of trials fetched per ClinicalTrials.gov API request (1–1000). Larger pages mean fewer requests. Leave at the default unless tuning performance.",
            "default": 100
          },
          "maxRetries": {
            "title": "Max retries per request",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Advanced: how many times to retry a ClinicalTrials.gov request on rate-limit (429) or server (5xx) errors before giving up.",
            "default": 5
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}