{
  "openapi": "3.0.1",
  "info": {
    "title": "Clinical Trials Scraper - ClinicalTrials.gov Data API",
    "description": "Clinical trials API for ClinicalTrials.gov: export studies by condition, drug, sponsor, phase, status or date to CSV, Excel or JSON. $1 per 1,000 trials.",
    "version": "0.1",
    "x-build-id": "GRp26fskTINghb5mO"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/deanko~clinicaltrials-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-deanko-clinicaltrials-scraper",
        "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/deanko~clinicaltrials-scraper/runs": {
      "post": {
        "operationId": "runs-sync-deanko-clinicaltrials-scraper",
        "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/deanko~clinicaltrials-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-deanko-clinicaltrials-scraper",
        "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 to search for (ClinicalTrials.gov condition field). Add several to match any of them. Examples: obesity, breast cancer, Alzheimer disease.",
            "items": {
              "type": "string"
            }
          },
          "searchTerms": {
            "title": "Search terms (all fields)",
            "type": "array",
            "description": "Free-text search across all study fields, like the 'Other terms' box on ClinicalTrials.gov. Supports their search syntax (AND, OR, NOT, quotes). Examples: GLP-1, CRISPR, \"cell therapy\".",
            "items": {
              "type": "string"
            }
          },
          "interventions": {
            "title": "Interventions / drugs",
            "type": "array",
            "description": "Drug, biologic, device or procedure being tested. Add several to match any of them. Examples: semaglutide, pembrolizumab, CAR-T.",
            "items": {
              "type": "string"
            }
          },
          "sponsors": {
            "title": "Sponsors / collaborators",
            "type": "array",
            "description": "Lead sponsor or collaborator organization. Add several to match any of them. Examples: Novo Nordisk, Pfizer, National Cancer Institute.",
            "items": {
              "type": "string"
            }
          },
          "locations": {
            "title": "Locations (country, state, city or facility)",
            "type": "array",
            "description": "Where the study runs: country, state, city or facility name. Add several to match any of them. Examples: United States, Germany, Boston, Mayo Clinic.",
            "items": {
              "type": "string"
            }
          },
          "overallStatus": {
            "title": "Overall status",
            "type": "array",
            "description": "Recruitment status. Pick RECRUITING and NOT_YET_RECRUITING to find open trials. Leave empty for all statuses.",
            "items": {
              "type": "string",
              "enum": [
                "RECRUITING",
                "NOT_YET_RECRUITING",
                "ACTIVE_NOT_RECRUITING",
                "ENROLLING_BY_INVITATION",
                "COMPLETED",
                "SUSPENDED",
                "TERMINATED",
                "WITHDRAWN",
                "AVAILABLE",
                "NO_LONGER_AVAILABLE",
                "TEMPORARILY_NOT_AVAILABLE",
                "APPROVED_FOR_MARKETING",
                "WITHHELD",
                "UNKNOWN"
              ]
            }
          },
          "phases": {
            "title": "Phases",
            "type": "array",
            "description": "Only return studies in one of these phases. NA = not applicable (e.g. device or behavioral studies). Leave empty for all phases.",
            "items": {
              "type": "string",
              "enum": [
                "EARLY_PHASE1",
                "PHASE1",
                "PHASE2",
                "PHASE3",
                "PHASE4",
                "NA"
              ]
            },
            "default": []
          },
          "studyType": {
            "title": "Study type",
            "enum": [
              "",
              "INTERVENTIONAL",
              "OBSERVATIONAL",
              "EXPANDED_ACCESS"
            ],
            "type": "string",
            "description": "Restrict to one study type.",
            "default": ""
          },
          "startDateFrom": {
            "title": "Start date from",
            "pattern": "^(\\d{4}(-\\d{2}(-\\d{2})?)?)?$",
            "type": "string",
            "description": "Only studies starting on or after this date. Format YYYY, YYYY-MM or YYYY-MM-DD.",
            "default": ""
          },
          "startDateTo": {
            "title": "Start date to",
            "pattern": "^(\\d{4}(-\\d{2}(-\\d{2})?)?)?$",
            "type": "string",
            "description": "Only studies starting on or before this date. Format YYYY, YYYY-MM or YYYY-MM-DD.",
            "default": ""
          },
          "lastUpdateFrom": {
            "title": "Last update from",
            "pattern": "^(\\d{4}(-\\d{2}(-\\d{2})?)?)?$",
            "type": "string",
            "description": "Only studies whose record was last updated on or after this date. Useful for daily/weekly monitoring. Format YYYY, YYYY-MM or YYYY-MM-DD.",
            "default": ""
          },
          "lastUpdateTo": {
            "title": "Last update to",
            "pattern": "^(\\d{4}(-\\d{2}(-\\d{2})?)?)?$",
            "type": "string",
            "description": "Only studies whose record was last updated on or before this date. Format YYYY, YYYY-MM or YYYY-MM-DD.",
            "default": ""
          },
          "nctIds": {
            "title": "NCT IDs (direct lookup)",
            "type": "array",
            "description": "Look up specific studies by NCT number (e.g. NCT04368728) or full study URL. This is combined with the other filters (AND), so clear them if you only want these IDs.",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Max studies",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum number of studies to save. You are charged per study saved, so this caps your cost (20 studies is about $0.03; 1,000 studies is about $1.50).",
            "default": 20
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}