# ClinicalTrials.gov Scraper: Trials, Sponsors & Investigators (`fayoussef/clinical-trials-intelligence`) Actor

Scrape ClinicalTrials.gov through the official v2 API. Search 500,000+ studies by condition, sponsor, drug, phase, status and location, get 40+ clean fields per trial, monitor competitor pipelines for new trials and status changes, and extract investigator contacts. No API key, no login.

- **URL**: https://apify.com/fayoussef/clinical-trials-intelligence.md
- **Developed by:** [youssef farhan](https://apify.com/fayoussef) (community)
- **Categories:** Developer tools, Automation, Lead generation
- **Stats:** 2 total users, 0 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.80 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## ClinicalTrials.gov Scraper: Trials, Sponsors and Investigator Contacts

**Scrape ClinicalTrials.gov and turn it into a structured competitive-intelligence feed.** Search 500,000+ clinical studies by condition, sponsor, drug, status, phase and location, get clean JSON/CSV/Excel records, **monitor competitor drug pipelines** with new-trial and status-change alerts, and **enrich investigator & study-site contacts** (name, role, phone, email) for BD, recruiting and site outreach.

Built directly on the **official ClinicalTrials.gov v2 API** - no API key, no login, no proxies, no blocking. Just fast, reliable, structured trial data, with an Apify REST API, scheduling, webhooks and integrations (Google Sheets, Slack, Make, Zapier) on top.

***

### What it does

- 🔎 **Search the full registry** - query 500K+ trials by condition/disease, lead sponsor, intervention/drug, free text, location, recruitment status and trial phase.
- 🧬 **Clean, structured records** - 40+ flattened fields per trial: identifiers, status, phases, conditions, interventions, sponsor + collaborators, enrollment, key dates, eligibility, locations and a study summary.
- 📡 **Pipeline monitoring** - point a scheduled run at a competitor or therapeutic area and the Actor flags every **new trial** (`isNew`) and every **status change** (`statusChanged`, with `previousStatus`) since the last run. Perfect for a daily/weekly "what changed in my space" digest.
- 📇 **Investigator & site contact enrichment** - extract central contacts, overall officials (principal investigators) and per-site contacts with phone/email for trial-site outreach, patient-recruitment vendors and clinical BD.
- ⚡ **Reliable & high-margin** - official open API, retry/backoff on rate limits, correct pagination, streamed output. No residential proxies required.

### Who it's for

Pharma & biotech competitive-intelligence teams · clinical operations & feasibility · CROs and site networks · patient-recruitment companies · medical-device and diagnostics BD · biotech investors & analysts · medical writers and researchers · AI/RAG dataset builders.

***

### Quick start

1. Click **Try for free**.
2. Enter a **condition** (e.g. `non-small cell lung cancer`) and/or a **sponsor** (e.g. `Pfizer`).
3. Optionally pick a **recruitment status** (e.g. *Recruiting*) and **phases**.
4. Set **Maximum trials** and click **Start**.
5. Download results as **JSON, CSV or Excel**, or pull them from the dataset API.

#### Example input - track a competitor's active oncology pipeline

```json
{
  "conditions": ["non-small cell lung cancer"],
  "sponsor": "Pfizer",
  "status": ["RECRUITING", "NOT_YET_RECRUITING", "ACTIVE_NOT_RECRUITING"],
  "phases": ["PHASE2", "PHASE3"],
  "sortBy": "LAST_UPDATE_DESC",
  "maxItems": 200,
  "enrichContacts": true
}
```

#### Example input - weekly change monitor (recurring)

Schedule this and the Actor will report only what's new or changed each run:

```json
{
  "conditions": ["multiple sclerosis"],
  "status": ["RECRUITING", "NOT_YET_RECRUITING"],
  "sortBy": "LAST_UPDATE_DESC",
  "maxItems": 0,
  "stateStoreName": "ctgov-ms-monitor"
}
```

> Tip: use a unique `stateStoreName` per monitored topic. The first run records a baseline (everything is `isNew: true`); later runs flag only the deltas.

***

### Input reference

| Field | Type | Description |
|-------|------|-------------|
| `conditions` | array | Disease/condition terms; combined with OR. |
| `sponsor` | string | Lead sponsor or collaborator name. |
| `interventions` | array | Drug/device/procedure names; combined with OR. |
| `terms` | string | Free-text query across the whole record. |
| `location` | string | City, state or country of study sites. |
| `status` | array | Overall recruitment statuses (e.g. `RECRUITING`). |
| `phases` | array | Trial phases (`PHASE1`…`PHASE4`, `EARLY_PHASE1`). |
| `sortBy` | string | `RELEVANCE`, `LAST_UPDATE_DESC` or `START_DATE_DESC`. |
| `maxItems` | integer | Max trials. `0` = no limit. Free plans capped at 25. |
| `enrichContacts` | boolean | Extract investigator/site contacts (premium event). Default `true`. |
| `includeRawProtocol` | boolean | Append the full raw `protocolSection`. Default `false`. |
| `stateStoreName` | string | Named key-value store for cross-run change tracking. |

***

### Output sample

```json
{
  "nctId": "NCT01234567",
  "url": "https://clinicaltrials.gov/study/NCT01234567",
  "briefTitle": "A Study of Drug X in Advanced NSCLC",
  "overallStatus": "RECRUITING",
  "studyType": "INTERVENTIONAL",
  "phases": ["PHASE2"],
  "conditions": ["Non-small Cell Lung Cancer"],
  "interventions": [{ "type": "DRUG", "name": "Drug X" }],
  "leadSponsor": "Example Pharma Inc.",
  "leadSponsorClass": "INDUSTRY",
  "collaborators": ["University Cancer Center"],
  "enrollmentCount": 240,
  "enrollmentType": "ESTIMATED",
  "startDate": "2025-03-01",
  "primaryCompletionDate": "2027-06-30",
  "lastUpdatePostDate": "2026-05-20",
  "sex": "ALL",
  "minimumAge": "18 Years",
  "countries": ["United States", "Germany"],
  "locationsCount": 32,
  "contactCount": 3,
  "centralContacts": [
    { "name": "Clinical Trials Office", "role": "CONTACT", "phone": "+1 800-555-0100", "email": "trials@example.com" }
  ],
  "overallOfficials": [
    { "name": "Jane Smith, MD", "role": "PRINCIPAL_INVESTIGATOR", "affiliation": "Example Pharma Inc." }
  ],
  "siteContacts": [
    {
      "facility": "University Cancer Center",
      "city": "Boston", "state": "Massachusetts", "country": "United States",
      "status": "RECRUITING",
      "contacts": [{ "name": "Study Coordinator", "phone": "+1 617-555-0142", "email": "coord@ucc.example" }]
    }
  ],
  "isNew": true,
  "statusChanged": false,
  "previousStatus": null,
  "scrapedAt": "2026-05-30T12:00:00+00:00"
}
```

***

### Pricing (pay-per-event)

This Actor uses Apify's **pay-per-event** model - you pay for what you actually get, not for compute time. The current prices are shown on this Actor's Store page.

| Event | What triggers it |
|-------|------------------|
| **Actor start** (`apify-actor-start`) | Once when a run starts (per GB of memory) |
| **Trial result** (`apify-default-dataset-item`) | Each trial record written to the dataset |
| **Investigator contact** (`investigator-contact`) | Each trial where ≥1 reachable contact (phone/email) is enriched |

> The **Trial result** charge is the synthetic `apify-default-dataset-item` event - the platform charges it automatically when a record is pushed. The **Investigator contact** charge fires only when contact enrichment actually succeeds, so you never pay for empty enrichment. Set `enrichContacts: false` to disable the premium event entirely.

> **For the Actor owner:** event names are defined in code (`apify-default-dataset-item`, `investigator-contact`, `apify-actor-start`) but **prices are set in Apify Console → Publication → Monetization**, not in `actor.json`. The names in Console must match the code exactly.

#### Free plan

Free Apify accounts are capped at **25 trials per run**. Upgrade to any paid plan for unlimited results and full enrichment. (Plan detection fails open - if your plan can't be read, you're treated as paid and never throttled.)

***

### Use cases

- **Competitive pipeline intelligence** - track every trial a competitor sponsors, by phase and status, and get alerted when something moves.
- **Therapeutic-area landscaping** - map all active trials for an indication, including enrollment, geography and sponsors.
- **Clinical-trial site & PI outreach** - build contact lists of investigators and study sites for partnerships, recruitment or sales.
- **Feasibility & site selection** - find where trials for a condition are running and who's involved.
- **Investor due diligence** - monitor a portfolio company's or target's clinical activity.
- **AI / RAG datasets** - generate clean, structured clinical-trial corpora for LLM applications.

***

### FAQ

**Does this use the official ClinicalTrials.gov API?**
Yes - the modern **v2 REST API**. No scraping of HTML pages, no API key, no proxies.

**How fresh is the data?**
It's live: each run queries ClinicalTrials.gov in real time. Sort by *Most recently updated* and schedule runs for near-real-time monitoring.

**How does change tracking work?**
Provide a `stateStoreName`. The Actor remembers the trials (and their statuses) it has seen in a named key-value store, then flags `isNew` and `statusChanged` on subsequent runs. Without it, every run is a fresh one-off pull.

**Where do contacts come from?**
Only from the public `contactsLocationsModule` that sponsors themselves publish on ClinicalTrials.gov - central contacts, overall officials and study-site contacts.

**Can I get every field?**
Set `includeRawProtocol: true` to append the complete raw `protocolSection` alongside the cleaned fields.

**Why are some trials missing contacts?**
Not every sponsor publishes contact details, and completed trials often remove them. You're only billed the contact event for trials that actually have a reachable contact.

***

### Responsible use

This Actor returns **public information** that sponsors voluntarily publish on the U.S. National Library of Medicine's ClinicalTrials.gov registry. Contact details are intended by sponsors for trial-related inquiries. Use them lawfully and respectfully: comply with applicable anti-spam, privacy and data-protection laws (e.g. GDPR/CAN-SPAM), honor opt-outs, and do not use the data to contact or identify patients. This tool is for professional research, business development and analytics - not for medical advice.

Data source: [ClinicalTrials.gov](https://clinicaltrials.gov) · [v2 API documentation](https://clinicaltrials.gov/data-api/api)

***

⚡ Unlock full pages and higher limits by subscribing to an [Apify plan](https://apify.com/pricing?fpr=youssef).
💼 Need a custom solution? Reach out at youssefarhan24@gmail.com
🌐 Got a site in mind? [Suggest it here](https://automationbyexperts.com/apify)

# Actor input Schema

## `conditions` (type: `array`):

Disease or condition terms (e.g. "non-small cell lung cancer", "type 2 diabetes"). Multiple values are combined with OR.

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

Lead sponsor or collaborator name to track a specific company's or institution's pipeline (e.g. "Pfizer", "Memorial Sloan Kettering").

## `interventions` (type: `array`):

Drug, device or procedure names (e.g. "pembrolizumab"). Multiple values are combined with OR.

## `terms` (type: `string`):

Free-text query applied across the whole study record. Supports ClinicalTrials.gov search syntax.

## `location` (type: `string`):

Geographic filter for study sites — city, state or country (e.g. "Boston", "Germany").

## `status` (type: `array`):

Limit to one or more overall recruitment statuses. Leave empty for all statuses.

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

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.)

## `sortBy` (type: `string`):

How to order results. "Most recently updated" is recommended for scheduled monitoring so new and changed trials surface first.

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

Maximum number of trials to return. Set to 0 for no limit (fetch every matching trial). Free Apify plans are capped at 25 results.

## `enrichContacts` (type: `boolean`):

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.

## `includeRawProtocol` (type: `boolean`):

Append the complete raw ClinicalTrials.gov protocolSection object to every record for power users who need every field. Increases output size.

## `stateStoreName` (type: `string`):

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` (type: `integer`):

Advanced: number of trials fetched per ClinicalTrials.gov API request (1–1000). Larger pages mean fewer requests. Leave at the default unless tuning performance.

## `maxRetries` (type: `integer`):

Advanced: how many times to retry a ClinicalTrials.gov request on rate-limit (429) or server (5xx) errors before giving up.

## Actor input object example

```json
{
  "conditions": [
    "non-small cell lung cancer",
    "melanoma"
  ],
  "sponsor": "Pfizer",
  "interventions": [
    "pembrolizumab"
  ],
  "terms": "EGFR mutation",
  "location": "Boston",
  "status": [
    "RECRUITING",
    "NOT_YET_RECRUITING"
  ],
  "phases": [
    "PHASE2",
    "PHASE3"
  ],
  "sortBy": "RELEVANCE",
  "maxItems": 100,
  "enrichContacts": true,
  "includeRawProtocol": false,
  "stateStoreName": "ctgov-pfizer-nsclc-monitor",
  "pageSize": 100,
  "maxRetries": 5
}
```

# Actor output Schema

## `trials` (type: `string`):

All extracted and enriched clinical trial records from this run.

# 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 = {
    "conditions": [
        "non-small cell lung cancer"
    ],
    "maxItems": 100
};

// Run the Actor and wait for it to finish
const run = await client.actor("fayoussef/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 = {
    "conditions": ["non-small cell lung cancer"],
    "maxItems": 100,
}

# Run the Actor and wait for it to finish
run = client.actor("fayoussef/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 '{
  "conditions": [
    "non-small cell lung cancer"
  ],
  "maxItems": 100
}' |
apify call fayoussef/clinical-trials-intelligence --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,fayoussef/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/6A60Me7FRS89eScFx/builds/Nh3L5Ru8rn6F9MB2X/openapi.json
