# ClinicalTrials.gov Scraper (`straightforward_hydra/clinicaltrials-gov-scraper`) Actor

Search and export clinical trial records from the official ClinicalTrials.gov API v2. No API key.

- **URL**: https://apify.com/straightforward\_hydra/clinicaltrials-gov-scraper.md
- **Developed by:** [Dev D](https://apify.com/straightforward_hydra) (community)
- **Categories:** Developer tools, Automation, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.00 / 1,000 studies

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#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 🧪

**Search and export clinical trial records from the official ClinicalTrials.gov API — by condition, drug, sponsor, phase, status and location. No API key, no login.**

Pull clean, structured clinical-trial data straight from the U.S. National Library of Medicine's [ClinicalTrials.gov](https://clinicaltrials.gov) registry (API v2). Filter by **condition/disease**, **intervention/drug**, **sponsor**, **recruitment status**, **phase**, **study type** and **location** — and get one tidy record per trial. Perfect for pharma/biotech competitive intelligence, drug-pipeline tracking, medical research, CRO market analysis and investor due diligence.

> Uses the official ClinicalTrials.gov REST API v2 — public U.S. government registry data, no key required.

***

### What you can do with it

- 💊 **Track a drug pipeline** — every trial for an intervention across all phases and sponsors.
- 🏢 **Competitive intelligence** — all of a competitor's active/completed trials by sponsor name.
- 🔬 **Recruiting trials** — currently-recruiting studies for a condition, with sites and locations.
- 📈 **Market & investor research** — enrollment sizes, phases and timelines across a therapeutic area.
- 🗺️ **Find trial sites** — facilities, cities and countries running a given study.

### Features

- ✅ **No API key** — official ClinicalTrials.gov v2 API, works out of the box.
- ✅ **Rich records** — status, phase, sponsor, interventions, conditions, eligibility, enrollment, outcomes, locations.
- ✅ **Powerful filters** — condition, intervention, sponsor, status, phase, study type, location, title.
- ✅ **Sort** — by relevance, last updated, first posted, enrollment size or start date.
- ✅ **Scales** — token-paginated, up to 1,000 studies per request.

***

### Input

| Field | Description |
|---|---|
| **Condition / disease** | e.g. `breast cancer`, `type 2 diabetes`. |
| **Intervention / treatment** | e.g. `pembrolizumab`, `metformin`. |
| **Sponsor** | e.g. `Pfizer`, `National Cancer Institute`. |
| **Other search terms** | Free text across the whole record. |
| **Recruitment status** | RECRUITING, COMPLETED, TERMINATED, … |
| **Study type / Phase** | Interventional/Observational · PHASE1–4. |
| **Location** | e.g. `Boston`, `Germany`. |
| **Sort / Max results** | Ordering and result cap. |

#### Example — recruiting Phase 3 cancer trials, largest first

```json
{
  "condition": "cancer",
  "statuses": ["RECRUITING"],
  "phases": ["PHASE3"],
  "sort": "EnrollmentCount:desc",
  "maxResults": 200
}
```

#### Example — all Pfizer trials, newest updates first

```json
{
  "sponsor": "Pfizer",
  "sort": "LastUpdatePostDate:desc",
  "maxResults": 500
}
```

### Output

One row per trial:

```json
{
  "nct_id": "NCT01234567",
  "url": "https://clinicaltrials.gov/study/NCT01234567",
  "brief_title": "A Study of Drug X in Advanced Solid Tumors",
  "overall_status": "RECRUITING",
  "study_type": "INTERVENTIONAL",
  "phases": ["PHASE2"],
  "conditions": ["Solid Tumor", "Melanoma"],
  "interventions": [{ "type": "DRUG", "name": "Drug X" }],
  "lead_sponsor": "Example Pharma",
  "lead_sponsor_class": "INDUSTRY",
  "enrollment_count": 240,
  "enrollment_type": "ESTIMATED",
  "primary_purpose": "TREATMENT",
  "eligibility_sex": "ALL",
  "minimum_age": "18 Years",
  "start_date": "2024-03",
  "last_update_post_date": "2025-01-15",
  "primary_outcomes": ["Overall Response Rate"],
  "locations_count": 42,
  "locations": [
    { "facility": "Example Cancer Center", "city": "Boston", "state": "Massachusetts", "country": "United States", "status": "RECRUITING" }
  ]
}
```

### Run it on a schedule

Schedule the Actor to snapshot a therapeutic area or a competitor's pipeline over time, and connect a **Google Sheets / Slack / webhook** integration to get alerted when new trials appear or statuses change.

### Notes & limitations

- Uses the official ClinicalTrials.gov API v2 — no key needed.
- Data is a point-in-time snapshot at run time.
- `locations` is capped per study (configurable); `locations_count` always reflects the true total.
- Public, non-personal U.S. government registry data.
- Data source: ClinicalTrials.gov (U.S. National Library of Medicine).

***

#### Keywords

ClinicalTrials.gov, clinical trials, clinical trial data, clinical trials scraper, clinical trials API, drug pipeline, pharma intelligence, biotech research, medical research, trial recruitment, NCT, interventional study, observational study, trial phase, sponsor trials, therapeutic area, CRO, drug development, pharmaceutical data, life sciences.

# Actor input Schema

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

Condition or disease, e.g. "breast cancer", "type 2 diabetes", "alzheimer".

## `term` (type: `string`):

Free-text terms searched across the whole record (drug, keyword, etc.), e.g. "semaglutide".

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

Intervention name, e.g. "pembrolizumab", "metformin", "gene therapy".

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

Lead sponsor or collaborator, e.g. "Pfizer", "Moderna", "National Cancer Institute".

## `title` (type: `string`):

Words that must appear in the study title.

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

Location terms, e.g. "Boston", "Germany", "California".

## `statuses` (type: `array`):

Keep only these statuses. Common: RECRUITING, NOT\_YET\_RECRUITING, ACTIVE\_NOT\_RECRUITING, COMPLETED, TERMINATED, WITHDRAWN, SUSPENDED.

## `studyType` (type: `string`):

Limit to a study type.

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

Trial phase(s), e.g. PHASE1, PHASE2, PHASE3, PHASE4, EARLY\_PHASE1, NA.

## `sort` (type: `string`):

How to order results.

## `maxLocationsPerStudy` (type: `integer`):

Cap the locations array per study (large trials can have hundreds). locations\_count always reflects the true total.

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

How many studies to return.

## Actor input object example

```json
{
  "studyType": "",
  "sort": "",
  "maxLocationsPerStudy": 100,
  "maxResults": 100
}
```

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("straightforward_hydra/clinicaltrials-gov-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 = {}

# Run the Actor and wait for it to finish
run = client.actor("straightforward_hydra/clinicaltrials-gov-scraper").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{}' |
apify call straightforward_hydra/clinicaltrials-gov-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=straightforward_hydra/clinicaltrials-gov-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

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