{
  "openapi": "3.0.1",
  "info": {
    "title": "ClinicalTrials.gov Scraper & API - Trials by Condition & Phase",
    "description": "For pharma intelligence, site feasibility and RAG pipelines: trials from the official ClinicalTrials.gov v2 API, flattened from 12 nested modules, each start date labelled day, month or year. The registry holds 602,104 studies; a phase 2, 3 and 4 search returns 51,862 here, 2,597 naively",
    "version": "0.1",
    "x-build-id": "CerfSFCqvkVCeZXue"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/neverempty~clinical-trials-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-neverempty-clinical-trials-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/neverempty~clinical-trials-scraper/runs": {
      "post": {
        "operationId": "runs-sync-neverempty-clinical-trials-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/neverempty~clinical-trials-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-neverempty-clinical-trials-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": {
          "condition": {
            "title": "Condition or disease",
            "type": "string",
            "description": "The condition to search for, such as diabetes, breast cancer or Parkinson's disease. Leave it empty and search by intervention, sponsor, location or term instead - nothing is added to your search that you did not ask for. A term the registry does not recognise returns zero studies rather than an error, so a typo looks exactly like a disease nobody studies; that empty result is returned as its own row saying so."
          },
          "intervention": {
            "title": "Intervention or drug",
            "type": "string",
            "description": "A drug, device or procedure, such as metformin, semaglutide or CAR-T.",
            "default": ""
          },
          "term": {
            "title": "Other search term",
            "type": "string",
            "description": "Free text searched across the whole record - useful for a technique or gene name that is neither a condition nor an intervention, such as CRISPR.",
            "default": ""
          },
          "location": {
            "title": "Location",
            "type": "string",
            "description": "A country, state or city where the study has a site, such as Japan, California or Berlin.",
            "default": ""
          },
          "sponsor": {
            "title": "Sponsor",
            "type": "string",
            "description": "The organisation running the study, such as Pfizer, NIH or Mayo Clinic. The lead sponsor and its class (industry, NIH, other) come back on every row.",
            "default": ""
          },
          "statuses": {
            "title": "Recruitment status",
            "type": "array",
            "description": "Keep only studies in these statuses. An invalid value is rejected by the registry with HTTP 400 and the reason, rather than being ignored.",
            "items": {
              "type": "string",
              "enum": [
                "RECRUITING",
                "NOT_YET_RECRUITING",
                "ACTIVE_NOT_RECRUITING",
                "ENROLLING_BY_INVITATION",
                "COMPLETED",
                "SUSPENDED",
                "TERMINATED",
                "WITHDRAWN",
                "UNKNOWN"
              ],
              "enumTitles": [
                "Recruiting",
                "Not yet recruiting",
                "Active, not recruiting",
                "Enrolling by invitation",
                "Completed",
                "Suspended",
                "Terminated",
                "Withdrawn",
                "Unknown status"
              ]
            },
            "default": []
          },
          "phases": {
            "title": "Trial phase",
            "type": "array",
            "description": "Keep only these phases. Observational studies have no phase at all and come back with an empty list rather than a made-up value, so filtering by phase excludes them.",
            "items": {
              "type": "string",
              "enum": [
                "0",
                "1",
                "2",
                "3",
                "4"
              ],
              "enumTitles": [
                "Early Phase 1",
                "Phase 1",
                "Phase 2",
                "Phase 3",
                "Phase 4"
              ]
            },
            "default": []
          },
          "studyType": {
            "title": "Study type",
            "enum": [
              "",
              "int",
              "obs"
            ],
            "type": "string",
            "description": "int = interventional (a trial that gives a treatment), obs = observational (a study that watches without intervening). Leave empty for both.",
            "default": ""
          },
          "maxStudies": {
            "title": "Maximum studies",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "How many studies to return. You are charged for the rows you actually receive. The registry holds over 600,000 studies and a broad condition can match tens of thousands - cancer matched 123,154 when this was built - so this limit is what keeps a run affordable.",
            "default": 200
          },
          "maxRetries": {
            "title": "Attempts per request",
            "minimum": 1,
            "maximum": 6,
            "type": "integer",
            "description": "How many times to try a request in total when the registry does not answer. HTTP 400 is a permanent answer and is never retried.",
            "default": 4
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}