# ClinicalTrials.gov Scraper — Bulk Trial Data Export, No API Key (`themineworks/clinicaltrials-bulk-exporter`) Actor

Scrape ClinicalTrials.gov in bulk: filter 575k+ trials by phase, status, condition, drug or country. Clean structured JSON with eligibility criteria, sponsors & enrollment. No API key. Use it as an MCP server in Claude, ChatGPT & AI agents.

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

## Pricing

$1.00 / 1,000 trial scrapeds

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 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 Bulk Exporter — Phase & Status Filter

Bulk export **ClinicalTrials.gov** records filtered by disease condition, trial phase, enrollment status, intervention, or country. Returns structured JSON covering 575,000+ registered trials from 221 countries. No API key required.

**Keywords:** ClinicalTrials.gov API, clinical trials data, Phase 3 trials, recruiting trials, clinical trial bulk export, FDA clinical trials, drug pipeline data.

---

### Why this actor

ClinicalTrials.gov is the world's largest registry of clinical studies. Its v2 API is open but returns paginated results requiring careful token handling. This actor handles pagination automatically and lets you bulk-download filtered trial sets — by phase, status, condition, or country — as clean structured JSON, ready for AI pipelines, systematic reviews, or competitive intelligence.

- **575,000+ studies**, 221 countries, updated daily.
- **Phase and status filters** — get all Phase 3 recruiting trials in a condition with one run.
- **Full eligibility criteria** — age, sex, inclusion/exclusion text included in output.
- **No API key** — official ClinicalTrials.gov API v2.

---

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| `condition` | string | `diabetes` | Disease or condition to search. |
| `intervention` | string | — | Drug or therapy name. |
| `phase` | string | `PHASE3` | Comma-separated: PHASE1, PHASE2, PHASE3, PHASE4. |
| `status` | string | `RECRUITING,ACTIVE_NOT_RECRUITING` | Trial enrollment status. |
| `country` | string | — | Filter by trial location country. |
| `maxResults` | integer | 500 (prefill 25) | Maximum trials to return (up to 10,000). The console prefills **25** so your first run stays inside the 25 free trials; raise it for larger pulls. |

---

### Output

```json
{
  "nct_id": "NCT05765396",
  "title": "A Study of Semaglutide in Adults With Type 2 Diabetes",
  "overall_status": "RECRUITING",
  "phase": "PHASE3",
  "start_date": "2023-06",
  "completion_date": "2026-12",
  "conditions": "Type 2 Diabetes Mellitus",
  "interventions": "DRUG:Semaglutide",
  "lead_sponsor": "Novo Nordisk A/S",
  "enrollment": 1200,
  "eligibility_criteria": "Inclusion Criteria:\n* Adults aged 18 years or older\n* Diagnosis of type 2 diabetes with HbA1c between 7.0% and 10.5%\n* Stable metformin dose for at least 90 days\n\nExclusion Criteria:\n* Type 1 diabetes\n* eGFR < 30 mL/min/1.73m^2\n* Use of a GLP-1 receptor agonist within 6 months of screening",
  "minimum_age": "18 Years",
  "maximum_age": "N/A",
  "sex": "ALL",
  "url": "https://clinicaltrials.gov/study/NCT05765396",
  "scraped_at": "2026-06-15T00:00:00.000Z"
}
````

***

### Pricing

**First 25 trials free per account**, then **$0.003 per trial** ($3 per 1,000). Zero charge on empty runs.

***

### FAQ

**How many trials are available?** Over 575,000 registered studies from 221 countries. ClinicalTrials.gov is updated daily.

**Can I get all Phase 3 trials in oncology?** Yes — set `condition: cancer` (or a specific cancer type), `phase: PHASE3`, `status: RECRUITING`. A typical oncology pull returns 2,000-5,000 active studies.

**Does this include eligibility criteria text?** Yes — the full eligibility criteria text (inclusion and exclusion criteria) is included in each record.

**How is this different from the ClinicalTrials Sponsor Intelligence actor?** This actor is a bulk exporter optimized for large dataset downloads (AI training, systematic reviews). The Sponsor Intelligence actor cross-references FDA drug approvals and is optimized for pharma competitive intelligence on a specific sponsor or compound.

**Can I automate weekly pipeline updates?** Yes — schedule this actor weekly on Apify to track changes in trial enrollment status and new trial registrations in your therapeutic area.

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

This actor is also a **Model Context Protocol (MCP) server tool** — call it directly from Claude, ChatGPT, Cursor, Windsurf, or any MCP-compatible AI agent. The agent only pays for results delivered (same pay-per-result model).

- Per-actor MCP endpoint: `https://mcp.apify.com/?tools=themineworks/clinicaltrials-bulk-exporter`
- Full Mine Works MCP server (all tools): `https://the-mine-works-mcp.hatchable.site/api/mcp`

```js
// Call this actor as a tool via apify-client (Node)
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });
const run = await client.actor('themineworks/clinicaltrials-bulk-exporter').call({ /* input from the table above */ });
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

# Actor input Schema

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

Disease or condition to search (e.g. breast cancer, type 2 diabetes).

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

Intervention, drug, or therapy name.

## `phase` (type: `string`):

PHASE1, PHASE2, PHASE3, PHASE4. Leave blank for all.

## `status` (type: `string`):

RECRUITING, COMPLETED, NOT\_YET\_RECRUITING, TERMINATED, ACTIVE\_NOT\_RECRUITING.

## `country` (type: `string`):

Filter by trial location country (e.g. United States, India).

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

Maximum trials to return. Prefilled to 25 so your first run stays inside the 25 free trials; default is 500 when the field is omitted (e.g. via API). Up to 10,000.

## Actor input object example

```json
{
  "condition": "diabetes",
  "phase": "PHASE3",
  "status": "RECRUITING,ACTIVE_NOT_RECRUITING",
  "maxResults": 25
}
```

# 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",
    "phase": "PHASE3",
    "status": "RECRUITING,ACTIVE_NOT_RECRUITING",
    "maxResults": 25
};

// Run the Actor and wait for it to finish
const run = await client.actor("themineworks/clinicaltrials-bulk-exporter").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",
    "phase": "PHASE3",
    "status": "RECRUITING,ACTIVE_NOT_RECRUITING",
    "maxResults": 25,
}

# Run the Actor and wait for it to finish
run = client.actor("themineworks/clinicaltrials-bulk-exporter").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",
  "phase": "PHASE3",
  "status": "RECRUITING,ACTIVE_NOT_RECRUITING",
  "maxResults": 25
}' |
apify call themineworks/clinicaltrials-bulk-exporter --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "ClinicalTrials.gov Scraper — Bulk Trial Data Export, No API Key",
        "description": "Scrape ClinicalTrials.gov in bulk: filter 575k+ trials by phase, status, condition, drug or country. Clean structured JSON with eligibility criteria, sponsors & enrollment. No API key. Use it as an MCP server in Claude, ChatGPT & AI agents.",
        "version": "0.1",
        "x-build-id": "PhpqJTfGeNGVQOfTT"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/themineworks~clinicaltrials-bulk-exporter/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-themineworks-clinicaltrials-bulk-exporter",
                "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-bulk-exporter/runs": {
            "post": {
                "operationId": "runs-sync-themineworks-clinicaltrials-bulk-exporter",
                "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-bulk-exporter/run-sync": {
            "post": {
                "operationId": "run-sync-themineworks-clinicaltrials-bulk-exporter",
                "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": "Disease or condition to search (e.g. breast cancer, type 2 diabetes)."
                    },
                    "intervention": {
                        "title": "Intervention / drug",
                        "type": "string",
                        "description": "Intervention, drug, or therapy name."
                    },
                    "phase": {
                        "title": "Phase filter (comma-separated)",
                        "type": "string",
                        "description": "PHASE1, PHASE2, PHASE3, PHASE4. Leave blank for all."
                    },
                    "status": {
                        "title": "Status filter (comma-separated)",
                        "type": "string",
                        "description": "RECRUITING, COMPLETED, NOT_YET_RECRUITING, TERMINATED, ACTIVE_NOT_RECRUITING."
                    },
                    "country": {
                        "title": "Country",
                        "type": "string",
                        "description": "Filter by trial location country (e.g. United States, India)."
                    },
                    "maxResults": {
                        "title": "Max trials",
                        "minimum": 1,
                        "maximum": 10000,
                        "type": "integer",
                        "description": "Maximum trials to return. Prefilled to 25 so your first run stays inside the 25 free trials; default is 500 when the field is omitted (e.g. via API). Up to 10,000.",
                        "default": 500
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
