# NIH ClinicalTrials.gov Drug & Clinical Studies Scraper (`jaiveda/clinical-trials-intelligence`) Actor

Extract real-time global clinical trials, investigational drug pipelines, study phases, sponsor organizations, and clinical sites directly from the official NIH ClinicalTrials.gov database.

- **URL**: https://apify.com/jaiveda/clinical-trials-intelligence.md
- **Developed by:** [Bhavadharini](https://apify.com/jaiveda) (community)
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## NIH ClinicalTrials.gov Drug & Clinical Studies Intelligence Scraper

Extract global clinical trials, investigational drug pipelines, study phases, pharma sponsors, and medical research trial sites directly from the official **NIH ClinicalTrials.gov v2 REST API**.

***

### 🎯 Key Features & Capabilities

- **Complete Global Clinical Trials Database:** Access over 490,000+ registered clinical studies across all therapeutic areas.
- **Precision Drug Pipeline Filters:** Search by medical condition (e.g. `Alzheimer`, `Oncology`, `Diabetes`), lead sponsor (e.g. `Pfizer`, `Novartis`, `Eli Lilly`), or investigational drug/mechanism (`GLP-1`, `mRNA`, `CAR-T`).
- **Study Phases & Recruitment Status:** Filter by clinical phase (Phase 1, 2, 3 Pivotal, 4) and recruitment state (`RECRUITING`, `ACTIVE_NOT_RECRUITING`, `COMPLETED`, `TERMINATED`).
- **Clinical Site & Investigator Intelligence:** Extracts participating hospitals, research institutions, patient enrollment targets, and central study coordinator contacts.
- **100% Reliable & Fast:** Uses the modern NIH v2 API with official data schemas, requiring no fragile browser automation.

***

### 💼 Commercial Use Cases

- **Biotech & Pharma Competitive Intelligence:** Track competitor drug candidates entering Phase 2 and Phase 3 trials in real time.
- **Healthcare Hedge Funds & Life Science Investors:** Monitor trial completion dates, primary endpoints, and termination reasons for public biotech stocks.
- **Clinical Research Organizations (CROs):** Identify active trial sites and patient recruitment bottlenecks for partnership opportunities.
- **Physician & Patient Referral Services:** Power clinical trial search engines and patient matching platforms.

***

### 📥 Input Parameters

| Parameter | Type | Default | Description |
|---|---|---|---|
| `condition` | String | `"Alzheimer"` | Disease or medical condition (e.g. `Breast Cancer`, `Obesity`, `Depression`). |
| `sponsor` | String | `""` | Lead sponsor or research institution (e.g. `Pfizer`, `Moderna`, `Mayo Clinic`). |
| `intervention` | String | `""` | Drug name, therapy, or medical device (e.g. `Pembrolizumab`, `GLP-1`). |
| `searchTerm` | String | `""` | Free-text keyword search across entire study protocol. |
| `statusFilter` | String | `"ALL"` | Status: `ALL`, `RECRUITING`, `NOT_YET_RECRUITING`, `ACTIVE_NOT_RECRUITING`, `COMPLETED`, `TERMINATED`. |
| `phases` | Array | `[]` | Phase filter: `PHASE1`, `PHASE2`, `PHASE3`, `PHASE4`, `EARLY_PHASE1`. |
| `maxItems` | Integer | `25` | Maximum number of study records to retrieve (1 to 500). |

***

### 📤 Output Dataset Format

```json
{
  "nctId": "NCT05817188",
  "url": "https://clinicaltrials.gov/study/NCT05817188",
  "briefTitle": "A Study to Evaluate the Safety and Efficacy of...",
  "officialTitle": "A Phase 3, Randomized, Double-Blind, Placebo-Controlled Study...",
  "overallStatus": "RECRUITING",
  "whyStopped": null,
  "studyType": "INTERVENTIONAL",
  "phases": ["PHASE3"],
  "leadSponsor": "Eli Lilly and Company",
  "leadSponsorClass": "INDUSTRY",
  "collaborators": [],
  "conditions": ["Alzheimer Disease"],
  "interventions": [
    {
      "name": "Donanemab",
      "type": "DRUG",
      "description": "Administered via intravenous infusion"
    }
  ],
  "briefSummary": "The main purpose of this study is to investigate...",
  "enrollmentCount": 1500,
  "enrollmentType": "ESTIMATED",
  "startDate": "2023-05-15",
  "primaryCompletionDate": "2027-11",
  "completionDate": "2028-02",
  "hasResults": false,
  "eligibility": {
    "gender": "ALL",
    "minimumAge": "60 Years",
    "maximumAge": "85 Years",
    "healthyVolunteers": false
  },
  "centralContacts": [
    {
      "name": "Lilly Clinical Trial Registry",
      "phone": "1-877-CTLILLY",
      "email": "clinicaltrials@lilly.com"
    }
  ],
  "locationsCount": 115,
  "sampleLocations": [
    {
      "facility": "Mayo Clinic Rochester",
      "city": "Rochester",
      "state": "Minnesota",
      "zip": "55905",
      "country": "United States",
      "status": "RECRUITING"
    }
  ]
}
```

***

### 🚀 How to Run Locally

```bash
cd clinical-trials-intelligence
python -m src.main
```

# Actor input Schema

## `condition` (type: `string`):

Disease or medical condition being studied (e.g. 'Alzheimer', 'Breast Cancer', 'Diabetes', 'Obesity', 'Depression').

## `sponsor` (type: `string`):

Pharmaceutical company, biotech startup, or research institution (e.g. 'Pfizer', 'Eli Lilly', 'Moderna', 'Novartis', 'Mayo Clinic').

## `intervention` (type: `string`):

Investigational drug name, biological agent, therapy, or medical device (e.g. 'Pembrolizumab', 'GLP-1', 'mRNA', 'CAR-T').

## `searchTerm` (type: `string`):

General keywords to search across titles, protocols, and trial summaries.

## `statusFilter` (type: `string`):

Filter trials by current recruitment or activity status.

## `phases` (type: `array`):

Filter by clinical trial phases.

## `maxItems` (type: `integer`):

Maximum number of clinical trial records to retrieve in this run.

## Actor input object example

```json
{
  "condition": "Alzheimer",
  "sponsor": "",
  "intervention": "",
  "searchTerm": "",
  "statusFilter": "ALL",
  "phases": [],
  "maxItems": 25
}
```

# Actor output Schema

## `results` (type: `string`):

Registered global clinical trials, investigational drug candidates, study phases, pharma sponsors, and medical center trial sites.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "condition": "Alzheimer",
    "sponsor": "",
    "intervention": "",
    "searchTerm": ""
};

// Run the Actor and wait for it to finish
const run = await client.actor("jaiveda/clinical-trials-intelligence").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "condition": "Alzheimer",
    "sponsor": "",
    "intervention": "",
    "searchTerm": "",
}

# Run the Actor and wait for it to finish
run = client.actor("jaiveda/clinical-trials-intelligence").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "condition": "Alzheimer",
  "sponsor": "",
  "intervention": "",
  "searchTerm": ""
}' |
apify call jaiveda/clinical-trials-intelligence --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,jaiveda/clinical-trials-intelligence"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/eqPOlb8QODDwMQTSJ/builds/yPWD6aY1Q2SMpj0Kf/openapi.json
