{
  "openapi": "3.0.1",
  "info": {
    "title": "ClinicalTrials.gov Scraper: Search Clinical Trials by Drug",
    "description": "Search ClinicalTrials.gov, the official registry of clinical studies, by condition, drug or intervention, sponsor, location, phase and recruitment status. One flat record per trial with dates, enrollment, sponsors, sites, eligibility and outcomes. Official API v2, no key. JSON, CSV or Excel.",
    "version": "0.1",
    "x-build-id": "dqMl6JQPbnk7pEW0Y"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nexus-scrapers~clinical-trials-search/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nexus-scrapers-clinical-trials-search",
        "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/nexus-scrapers~clinical-trials-search/runs": {
      "post": {
        "operationId": "runs-sync-nexus-scrapers-clinical-trials-search",
        "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/nexus-scrapers~clinical-trials-search/run-sync": {
      "post": {
        "operationId": "run-sync-nexus-scrapers-clinical-trials-search",
        "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": "Condition, disease or synonym (the registry expands synonyms, e.g. 'heart attack' also finds myocardial infarction)."
          },
          "intervention": {
            "title": "Intervention / drug",
            "type": "string",
            "description": "Drug, device, procedure or other intervention name."
          },
          "sponsor": {
            "title": "Sponsor or collaborator",
            "type": "string",
            "description": "Lead sponsor or collaborator organisation name."
          },
          "searchTerm": {
            "title": "Other search terms",
            "type": "string",
            "description": "Free text searched across all fields of a study. Supports AND, OR, NOT and quotes."
          },
          "titleSearch": {
            "title": "Title search",
            "type": "string",
            "description": "Words that must appear in the title or acronym."
          },
          "country": {
            "title": "Country",
            "type": "string",
            "description": "Country of at least one study site, in English (Italy, United States, Germany, ...)."
          },
          "city": {
            "title": "City or state",
            "type": "string",
            "description": "City, state or facility name of a study site. Combined with the country when both are set."
          },
          "latitude": {
            "title": "Latitude (geo search)",
            "type": "number",
            "description": "Centre of a geographic search, -90 to 90. Use together with longitude."
          },
          "longitude": {
            "title": "Longitude (geo search)",
            "type": "number",
            "description": "Centre of a geographic search, -180 to 180."
          },
          "radiusKm": {
            "title": "Radius (km)",
            "minimum": 1,
            "maximum": 20000,
            "type": "number",
            "description": "Radius around the latitude/longitude point; studies with a site within it are returned.",
            "default": 50
          },
          "overallStatus": {
            "title": "Recruitment status",
            "type": "array",
            "description": "Only studies in one of these statuses. If you leave this field out the Actor uses Recruiting + Not yet recruiting (except when you give NCT IDs, then no status filter applies). Send an empty list for all statuses.",
            "items": {
              "type": "string",
              "enum": [
                "RECRUITING",
                "NOT_YET_RECRUITING",
                "ENROLLING_BY_INVITATION",
                "ACTIVE_NOT_RECRUITING",
                "COMPLETED",
                "SUSPENDED",
                "TERMINATED",
                "WITHDRAWN",
                "UNKNOWN",
                "AVAILABLE",
                "NO_LONGER_AVAILABLE",
                "TEMPORARILY_NOT_AVAILABLE",
                "APPROVED_FOR_MARKETING",
                "WITHHELD"
              ],
              "enumTitles": [
                "Recruiting",
                "Not yet recruiting",
                "Enrolling by invitation",
                "Active, not recruiting",
                "Completed",
                "Suspended",
                "Terminated",
                "Withdrawn",
                "Unknown status",
                "Expanded access: available",
                "Expanded access: no longer available",
                "Expanded access: temporarily not available",
                "Expanded access: approved for marketing",
                "Withheld"
              ]
            }
          },
          "phases": {
            "title": "Phase",
            "type": "array",
            "description": "Study phase(s). Empty = any phase.",
            "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 (devices, behavioural, ...)"
              ]
            }
          },
          "studyTypes": {
            "title": "Study type",
            "type": "array",
            "description": "Empty = any type.",
            "items": {
              "type": "string",
              "enum": [
                "INTERVENTIONAL",
                "OBSERVATIONAL",
                "EXPANDED_ACCESS"
              ],
              "enumTitles": [
                "Interventional (clinical trials)",
                "Observational",
                "Expanded access"
              ]
            }
          },
          "onlyWithResults": {
            "title": "Only studies with posted results",
            "type": "boolean",
            "description": "Return only studies whose results have been posted on ClinicalTrials.gov.",
            "default": false
          },
          "startFrom": {
            "title": "Start date from",
            "type": "string",
            "description": "Study start date on or after this day (YYYY-MM-DD)."
          },
          "startTo": {
            "title": "Start date to",
            "type": "string",
            "description": "Study start date on or before this day."
          },
          "primaryCompletionFrom": {
            "title": "Primary completion from",
            "type": "string",
            "description": "Primary completion date on or after this day."
          },
          "primaryCompletionTo": {
            "title": "Primary completion to",
            "type": "string",
            "description": "Primary completion date on or before this day."
          },
          "completionFrom": {
            "title": "Completion date from",
            "type": "string",
            "description": "Study completion date on or after this day."
          },
          "completionTo": {
            "title": "Completion date to",
            "type": "string",
            "description": "Study completion date on or before this day."
          },
          "firstPostedFrom": {
            "title": "First posted from",
            "type": "string",
            "description": "First posted on ClinicalTrials.gov on or after this day."
          },
          "firstPostedTo": {
            "title": "First posted to",
            "type": "string",
            "description": "First posted on or before this day."
          },
          "lastUpdateFrom": {
            "title": "Last update from",
            "type": "string",
            "description": "Last updated on ClinicalTrials.gov on or after this day. Handy for daily monitoring."
          },
          "lastUpdateTo": {
            "title": "Last update to",
            "type": "string",
            "description": "Last updated on or before this day."
          },
          "nctIds": {
            "title": "NCT IDs",
            "type": "array",
            "description": "Fetch these studies directly (NCT followed by 8 digits, up to 1,000). Other filters still apply if set; the default status filter does not. Maximum results is raised to the number of IDs.",
            "items": {
              "type": "string"
            }
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "lastUpdate",
              "firstPosted",
              "startDate",
              "relevance"
            ],
            "type": "string",
            "description": "Order of results; the first N are kept when maximum results is reached.",
            "default": "lastUpdate"
          },
          "maxItems": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum number of studies to return. You are charged per result, so keep this low while testing.",
            "default": 20
          },
          "maxLocations": {
            "title": "Max sites listed per study",
            "minimum": 0,
            "maximum": 500,
            "type": "integer",
            "description": "Cap on the locations list of each study. The total number of sites is always given in locationsCount. 0 = no list.",
            "default": 10
          },
          "includeEligibilityCriteria": {
            "title": "Include full eligibility criteria text",
            "type": "boolean",
            "description": "Add the full inclusion/exclusion criteria text to every study (long text).",
            "default": false
          },
          "includeOutcomes": {
            "title": "Include primary and secondary outcomes",
            "type": "boolean",
            "description": "Add the primary and secondary outcome measures (with time frames) to every study.",
            "default": false
          },
          "includeContacts": {
            "title": "Include central contacts and study officials",
            "type": "boolean",
            "description": "Add the central contacts (name, role, e-mail, phone) and overall officials published by the study. Off by default: these are names and e-mail addresses of study staff, which are personal data under GDPR. Enable only if you have a lawful basis to process them.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}