# ClinicalTrials.gov Scraper | 26 Fields, Sites, No API Key (`themineworks/clinicaltrials-scraper`) Actor

Scrape ClinicalTrials.gov by condition, drug, sponsor, phase, status & location. Get clean JSON with sponsors, enrollment, phases, eligibility & trial sites. No API key. Use it as an MCP server in Claude, ChatGPT & AI agents. Zero charge on empty runs.

- **URL**: https://apify.com/themineworks/clinicaltrials-scraper.md
- **Developed by:** [The Mine Works](https://apify.com/themineworks) (community)
- **Categories:** Other, Business, MCP servers
- **Stats:** 2 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.50 / 1,000 study scrapeds

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 & Pipeline Data

💰 From $2.50 / 1,000 results.

### Overview

ClinicalTrials.gov Scraper searches the US National Library of Medicine's global trial registry and returns clean, structured JSON. Filter by condition, drug or intervention, sponsor, recruitment status, and location; get NCT ID, title, phases, enrollment, eligibility criteria, key dates, lead sponsor, collaborators, and every study site. Built for pharma and biotech competitive intelligence, patient recruitment, and life-sciences data pipelines.

ClinicalTrials.gov holds 480,000+ studies, and its API v2 is powerful but deeply nested. Each study is a tree of protocol section modules (identification, status, sponsor, design, arms, contacts, locations, eligibility) with token-based pagination. This actor walks that tree for every record and hands you one flat, analysis-ready record per study.

✅ No API key | ✅ Fully open (official API v2) | ✅ Zero charge on empty runs | ✅ Pay only for studies delivered | ✅ MCP-ready for AI agents

### Features

Targeted search by condition, intervention, sponsor, location, or free-text term, with recruitment-status filtering.
Every field flattened: NCT ID, title, status, study type, phase, conditions, interventions, sponsor, enrollment, eligibility, key dates, direct study link.
Optional full site list: facility, city, state, and country for every study location.
Token pagination handled automatically, from a handful of trials to tens of thousands per run.
Fully open access via the official ClinicalTrials.gov API v2, so there is no key, no login, and no anti-bot friction.

### How it works

The actor calls the ClinicalTrials.gov API v2 with your filters, then walks each study's protocol section modules to flatten identification, status, sponsors, design, arms, interventions, eligibility, and locations into a single record. Token pagination is handled internally, so you can pull anywhere from 1 to 10,000 studies in one run.

Empty searches are recognized before charging: a search that matches zero trials costs zero. When `includeLocations` is on, the actor attaches the full array of study sites for downstream geographic or recruitment analysis.

### 🧾 Input configuration

```json
{
  "condition": "breast cancer",
  "intervention": "pembrolizumab",
  "status": ["RECRUITING", "ACTIVE_NOT_RECRUITING"],
  "maxResults": 200,
  "includeLocations": true
}
```

### 📤 Output format

```json
{
  "nct_id": "NCT02896335",
  "title": "Palbociclib and Pembrolizumab in CNS Metastases",
  "overall_status": "RECRUITING",
  "study_type": "INTERVENTIONAL",
  "phases": ["PHASE2"],
  "conditions": ["Metastatic Malignant Neoplasm to Brain"],
  "interventions": [{ "type": "DRUG", "name": "Palbociclib" }],
  "lead_sponsor": "Massachusetts General Hospital",
  "sponsor_class": "OTHER",
  "collaborators": [],
  "enrollment": 45,
  "start_date": "2017-03-01",
  "primary_completion_date": "2026-12-01",
  "completion_date": "2027-06-01",
  "sex": "ALL",
  "minimum_age": "18 Years",
  "healthy_volunteers": false,
  "location_count": 3,
  "location_countries": ["United States"],
  "study_url": "https://clinicaltrials.gov/study/NCT02896335",
  "scraped_at": "2026-06-10T15:00:00.000Z"
}
```

Every study record contains these fields:

| Field | Description |
| --- | --- |
| 🆔 `nct_id` | ClinicalTrials.gov identifier |
| 📝 `title` | Brief study title |
| 🚦 `overall_status` | Recruitment status (RECRUITING, COMPLETED, etc.) |
| 🔬 `study_type` | INTERVENTIONAL or OBSERVATIONAL |
| 🧪 `phases[]` | Trial phases (PHASE1, PHASE2, PHASE3, PHASE4) |
| 🩺 `conditions[]` | Diseases or conditions studied |
| 💊 `interventions[]` | Drug, device, biologic, or procedure names with type |
| 🏢 `lead_sponsor` | Primary sponsor name |
| 🏛️ `sponsor_class` | Sponsor category (INDUSTRY, NIH, OTHER) |
| 🤝 `collaborators[]` | Collaborating organizations |
| 👥 `enrollment` | Actual or planned participant count |
| 📅 `start_date` | Study start date |
| 🏁 `completion_date` | Estimated or actual completion date |
| ⚧ `sex` | Eligible sex (ALL, MALE, FEMALE) |
| 🎂 `minimum_age` | Youngest eligible age |
| 🌍 `location_countries[]` | Countries with study sites |
| 🔗 `study_url` | Direct link to the trial page |
| 🕒 `scraped_at` | ISO timestamp of capture |

### 💼 Common use cases

**Pharma and biotech competitive intelligence**
Track every trial a competitor sponsors, by drug, phase, and status, and watch their pipeline move.
Map all active trials for a target, mechanism, or disease area.

**Patient recruitment and site selection**
Find recruiting trials by condition and location to support site selection or patient matching.
Enable `includeLocations` for facility and city detail across countries.

**Investment and diligence**
Monitor trial status changes (recruiting to completed to terminated) as catalysts.
Assemble structured cohorts of studies with eligibility and enrollment for portfolio review.

**Research and meta-analysis**
Build filtered corpora for systematic reviews with eligibility criteria and enrollment ready to analyze.
Schedule saved searches to capture new or updated trials automatically.

### 🚀 Getting started

1. Open the actor and enter a Condition (e.g. `diabetes`) or an Intervention (e.g. `semaglutide`), or both.
2. Optionally add a Sponsor, Location, or free-text Search term to narrow the pull.
3. Pick the Study statuses you want (default: RECRUITING); leave empty for every status.
4. Set Max results (default 100), and toggle Include locations if you need the full site list.
5. Click Save & Start, then download as JSON, CSV, or Excel, or pull via API or MCP.

### FAQ

**Do I need an API key?**
No. The ClinicalTrials.gov API v2 is fully open. You do not need to register anywhere.

**How current is the data?**
Real-time. The actor reads the live registry, so newly posted and updated studies appear immediately.

**Can I get all the study sites?**
Yes. Turn on `includeLocations` to attach facility, city, state, and country for every location on every study.

**Which statuses can I filter by?**
Recruiting, not yet recruiting, enrolling by invitation, active (not recruiting), completed, suspended, terminated, withdrawn, and unknown.

**How am I charged?**
Pay per study delivered: $2.50 per 1,000 studies on Gold and above, $3.50 per 1,000 on the Free plan. You pay only for studies actually delivered, and runs that return zero studies are never charged.

### Use in Claude, ChatGPT & any MCP agent

```
https://mcp.apify.com/?tools=themineworks/clinicaltrials-scraper
```

Or call it programmatically with the Apify client:

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

const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });

const run = await client.actor('themineworks/clinicaltrials-scraper').call({
  condition: 'diabetes',
  status: ['RECRUITING'],
  maxResults: 100,
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

### 🛠️ Complete your life-sciences pipeline

Trials are one dataset. Add the rest of the biomedical stack:

- **[ClinicalTrials.gov Bulk Exporter](https://apify.com/themineworks/clinicaltrials-bulk-exporter)**: bulk-friendly export with eligibility text for AI or systematic reviews.
- **[openFDA Scraper](https://apify.com/themineworks/openfda-unified-crawler)**: FDA adverse events (FAERS), recalls, drug labels, and device 510k data.
- **[OpenAlex Scraper](https://apify.com/themineworks/openalex-scholarly-works)**: 250M+ scholarly papers with citations, authors, and abstracts for background research.

Typical flow: pull recruiting trials for a compound, cross-check FAERS for post-market signals, and pair with OpenAlex for the underlying literature.

Found a bug or have a feature request? Open an issue on the actor's Apify Console page or reach out through the Apify profile.

# Actor input Schema

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

Medical condition or disease to search for (e.g. diabetes, breast cancer, alzheimer). Maps to ClinicalTrials.gov 'Condition or disease'.

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

Free-text terms matched across the whole record (e.g. a keyword, NCT number, or phrase).

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

Drug, device or intervention name (e.g. semaglutide, pembrolizumab).

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

Lead sponsor or collaborator name (e.g. Pfizer, National Cancer Institute).

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

Location term — country, state or city (e.g. United States, California, Boston).

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

Filter by recruitment status, for example "RECRUITING" or "COMPLETED". Leave empty for all statuses.

## `maxResults` (type: `integer`):

Maximum number of studies to return.

## `includeLocations` (type: `boolean`):

Attach the full list of study sites (facility, city, country) for each study. Larger output.

## Actor input object example

```json
{
  "condition": "diabetes",
  "searchTerm": "NCT04280705",
  "intervention": "semaglutide",
  "sponsor": "Pfizer",
  "location": "United States",
  "status": [
    "RECRUITING"
  ],
  "maxResults": 25,
  "includeLocations": false
}
```

# Actor output Schema

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

No description

# 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": "diabetes",
    "searchTerm": "NCT04280705",
    "intervention": "semaglutide",
    "sponsor": "Pfizer",
    "location": "United States",
    "status": [
        "RECRUITING"
    ],
    "maxResults": 25
};

// Run the Actor and wait for it to finish
const run = await client.actor("themineworks/clinicaltrials-scraper").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": "diabetes",
    "searchTerm": "NCT04280705",
    "intervention": "semaglutide",
    "sponsor": "Pfizer",
    "location": "United States",
    "status": ["RECRUITING"],
    "maxResults": 25,
}

# Run the Actor and wait for it to finish
run = client.actor("themineworks/clinicaltrials-scraper").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": "diabetes",
  "searchTerm": "NCT04280705",
  "intervention": "semaglutide",
  "sponsor": "Pfizer",
  "location": "United States",
  "status": [
    "RECRUITING"
  ],
  "maxResults": 25
}' |
apify call themineworks/clinicaltrials-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,themineworks/clinicaltrials-scraper"
        }
    }
}

```

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/0r0Um5jXzRGMTaMOt/builds/EBkOVAiMvdVKjRKVs/openapi.json
