# ClinicalTrials.gov Scraper - Studies, Phases & Sponsors (`themineworks/clinicaltrials-scraper`) Actor

Search ClinicalTrials.gov by condition, intervention or sponsor. Returns NCT ID, title, phase, status, sponsor, dates and eligibility. No API key. Works in Claude, ChatGPT & any MCP-compatible AI agent.

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

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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 — Studies, Sponsors, Drugs & Sites

Search **ClinicalTrials.gov** — the US National Library of Medicine's global registry of clinical studies — and get clean, structured JSON back. Filter by **condition, drug/intervention, sponsor, recruitment status and location**, and pull everything you need on each trial: phase, enrollment, sponsors, eligibility, dates and study sites. Built for **pharma and biotech competitive intelligence**, **clinical research**, **patient recruitment**, and **life-sciences data pipelines**. You only pay for studies actually delivered.

**Keywords:** ClinicalTrials.gov API, clinical trials scraper, clinical trial data, drug pipeline data, pharma competitive intelligence, trial recruitment, NCT lookup, biotech research data, life sciences dataset.

---

### Why this actor

ClinicalTrials.gov holds 480,000+ studies, and its API v2 is powerful but deeply nested — every study is a tree of "protocol section" modules (identification, status, sponsor, design, arms/interventions, contacts/locations, eligibility). Pulling a usable table out of it means walking that tree for every record and handling token-based pagination.

This actor does that for you and returns **one flat, analysis-ready record per study**:

- **Targeted search** — by condition/disease, intervention (drug/device), sponsor, location and free-text term, with recruitment-status filtering.
- **Everything that matters, flattened** — NCT ID, title, status, study type, phase, conditions, interventions, lead sponsor and collaborators, enrollment, eligibility (sex, age range, healthy volunteers), key dates, and a direct study link.
- **Optional full site list** — facility, city, state and country for every study location, for recruitment and geographic analysis.
- **Token pagination handled** — pull a handful of trials or tens of thousands.
- **Fully open, no API key** — official ClinicalTrials.gov API v2. No key, no login, no anti-bot.

---

### What you can build with it

- **Pharma / biotech competitive intelligence** — track every trial a competitor sponsors, by drug, phase and status, and watch their pipeline move.
- **Drug & indication landscaping** — map all active trials for a target, mechanism or disease area.
- **Patient recruitment** — find recruiting trials by condition and location to support site selection or patient matching.
- **Investment & diligence** — monitor trial status changes (recruiting → completed → terminated) as catalysts.
- **Research & meta-analysis** — assemble structured cohorts of studies with eligibility and enrollment for systematic review.
- **Recurring monitoring** — schedule a saved search and capture new or updated trials automatically.

---

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| `condition` | string | `diabetes` | Condition or disease to search. |
| `searchTerm` | string | — | Free-text terms across the whole record (keyword, NCT number, phrase). |
| `intervention` | string | — | Drug, device or intervention name. |
| `sponsor` | string | — | Lead sponsor or collaborator name. |
| `location` | string | — | Country, state or city. |
| `status` | string[] | `["RECRUITING"]` | Recruitment statuses to include. Empty = all. |
| `maxResults` | integer | 100 | Max studies to return. |
| `includeLocations` | boolean | false | Attach the full list of study sites per study. |

#### Example input

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

***

### Output

Each study is one dataset record:

```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" }, { "type": "DRUG", "name": "Pembrolizumab" }],
  "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"
}
```

`brief_summary` is included on every record; the full `locations` array appears when `includeLocations` is on. A final `{"_type": "summary"}` record reports how many studies were returned and how many matched in total.

***

### Pricing

**Your first 25 studies are free — every Apify account, no card, no trial clock.** After that it is a flat **$0.003 per study delivered**.

- First 25 studies free per account (lifetime), then $0.003/study
- **Zero charge on empty runs** — a search that matches nothing costs you nothing
- No monthly minimum, no rental
- A run pulling 1,000 studies costs $3.00

***

### FAQ

**Do I need an API key?** No. The ClinicalTrials.gov API v2 is fully open.

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

**Can I get all the study sites?** Yes — turn on `includeLocations` for facility, city, state and country of every location.

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

**Can I monitor a drug or sponsor pipeline?** Yes — save an intervention or sponsor search as a task and schedule it; each run returns the latest matching trials.

# 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. 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",
  "status": [
    "RECRUITING"
  ],
  "maxResults": 25,
  "includeLocations": false
}
```

# 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",
    "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",
    "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("💾 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 '{
  "condition": "diabetes",
  "status": [
    "RECRUITING"
  ],
  "maxResults": 25
}' |
apify call themineworks/clinicaltrials-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "ClinicalTrials.gov Scraper - Studies, Phases & Sponsors",
        "description": "Search ClinicalTrials.gov by condition, intervention or sponsor. Returns NCT ID, title, phase, status, sponsor, dates and eligibility. No API key. Works in Claude, ChatGPT & any MCP-compatible AI agent.",
        "version": "0.1",
        "x-build-id": "LBQY3lQ6bendJIwKa"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/themineworks~clinicaltrials-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-themineworks-clinicaltrials-scraper",
                "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/themineworks~clinicaltrials-scraper/runs": {
            "post": {
                "operationId": "runs-sync-themineworks-clinicaltrials-scraper",
                "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/themineworks~clinicaltrials-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-themineworks-clinicaltrials-scraper",
                "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 / disease",
                        "type": "string",
                        "description": "Medical condition or disease to search for (e.g. diabetes, breast cancer, alzheimer). Maps to ClinicalTrials.gov 'Condition or disease'."
                    },
                    "searchTerm": {
                        "title": "Other search terms",
                        "type": "string",
                        "description": "Free-text terms matched across the whole record (e.g. a keyword, NCT number, or phrase)."
                    },
                    "intervention": {
                        "title": "Intervention / drug",
                        "type": "string",
                        "description": "Drug, device or intervention name (e.g. semaglutide, pembrolizumab)."
                    },
                    "sponsor": {
                        "title": "Sponsor",
                        "type": "string",
                        "description": "Lead sponsor or collaborator name (e.g. Pfizer, National Cancer Institute)."
                    },
                    "location": {
                        "title": "Location",
                        "type": "string",
                        "description": "Location term — country, state or city (e.g. United States, California, Boston)."
                    },
                    "status": {
                        "title": "Study status",
                        "type": "array",
                        "description": "Filter by recruitment status. Leave empty for all statuses.",
                        "items": {
                            "type": "string",
                            "enum": [
                                "RECRUITING",
                                "NOT_YET_RECRUITING",
                                "ENROLLING_BY_INVITATION",
                                "ACTIVE_NOT_RECRUITING",
                                "COMPLETED",
                                "SUSPENDED",
                                "TERMINATED",
                                "WITHDRAWN",
                                "UNKNOWN"
                            ]
                        }
                    },
                    "maxResults": {
                        "title": "Max studies to return",
                        "minimum": 1,
                        "maximum": 10000,
                        "type": "integer",
                        "description": "Maximum number of studies to return.",
                        "default": 100
                    },
                    "includeLocations": {
                        "title": "Include all study sites",
                        "type": "boolean",
                        "description": "Attach the full list of study sites (facility, city, country) for each study. Larger output.",
                        "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
                                    }
                                }
                            },
                            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
