# Clinical Trials Scraper: Studies, Sites & Results (`punkrecordsdata/clinical-trials-scraper`) Actor

Search ClinicalTrials.gov and export studies with phases, sponsors, enrollment, trial sites, outcome measures, posted results and adverse events. Export CSV, Excel, JSON, XML.

- **URL**: https://apify.com/punkrecordsdata/clinical-trials-scraper.md
- **Developed by:** [PunkRecordsData](https://apify.com/punkrecordsdata) (community)
- **Categories:** Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $12.00 / 1,000 study records

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?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

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

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

<p align="center">
  <img src="https://api.apify.com/v2/key-value-stores/AAm3a1h3Z9nYfrvh9/records/banner?v=2" alt="PunkRecordsData" width="100%" />
</p>

## 🧬 Clinical Trials Scraper - ClinicalTrials.gov - PunkRecordsData

> 🚀 **Export clinical trials data in seconds.** Search 500K+ studies on ClinicalTrials.gov by condition, drug, sponsor, location, status and phase, and get structured rows with enrollment, every trial site, outcome measures, posted results and adverse-event totals. A recruiting melanoma Phase 3 search returns 36 studies with up to 150 sites each. Export to CSV, Excel, JSON or XML.

The Clinical Trials Scraper reads the official ClinicalTrials.gov v2 API, the registry where US law requires most interventional studies to post their protocols and results. One row per study carries 34 fields, and four optional modules (sites, outcomes, publications, results with adverse events) attach exactly the depth you need.

| 🎯 Target Audience | 💡 Primary Use Cases |
|---|---|
| Pharma and biotech competitive intelligence | Track competitor pipelines by drug, sponsor and phase |
| CROs and site-selection teams | Map every active site for an indication by country |
| Patient advocacy and navigators | Find recruiting trials for a condition near a location |
| Medical researchers and analysts | Build datasets of outcomes and adverse events at scale |

### 📋 What the Clinical Trials Scraper does

- **Study records**: NCT ID, titles, status, type, phases, conditions, interventions, lead sponsor and class, collaborators, enrollment, eligibility (sex, ages, healthy volunteers), key dates and results status.
- **Trial sites module**: every facility with city, state, country and per-site recruitment status (up to 300 per study).
- **Outcome measures module**: primary and secondary outcomes with timeframes.
- **Publications module**: linked references with PMIDs.
- **Results + adverse events module**: for studies with posted results, participant flow groups and serious/other adverse-event totals per arm.
- **Search that mirrors the registry**: condition, intervention, free term, location, sponsor, 10 recruitment statuses, 5 phases, 4 sort orders, plus direct NCT ID lookups.

> 💡 **Why it matters:** the registry's own UI shows one study at a time. Pipeline analysis, site selection and safety monitoring all need the same fields across hundreds of studies, in columns.

### 📊 Output of the clinical trials search

Real sample from a live run:

```json
{
  "nctId": "NCT01844505",
  "title": "Phase 3 Study of Nivolumab or Nivolumab Plus Ipilimumab Versus Ipilimumab Alone",
  "url": "https://clinicaltrials.gov/study/NCT01844505",
  "overallStatus": "COMPLETED",
  "phases": ["Phase 3"],
  "conditions": ["Melanoma"],
  "leadSponsor": "Bristol-Myers Squibb",
  "enrollment": 1345,
  "siteCount": 150,
  "hasResults": "Yes",
  "adverseEventGroups": [
    { "group": "Nivolumab", "seriousAffected": 187, "seriousAtRisk": 313, "otherAffected": 302 }
  ],
  "error": null
}
```

### ✨ Why choose this clinical trials scraper

- **5 billable events** (studies, sites, outcomes, publications, results): the widest measured surface in the niche, each one switchable.
- **Adverse-event totals per arm** from posted results, a field no measured competitor ships.
- **Site-level detail** with per-site recruitment status, ready for site-selection work.
- **Registry-true filters**: every dropdown maps 1:1 to a real API parameter, verified live.
- **Honest billing**: modules are charged per study only when they return real data; a study without posted results never bills the results event.

### 📈 How this ClinicalTrials.gov scraper compares to alternatives

Measured against the clinical-trials actors on the Apify Store (September 2026):

| | This actor | Most-used alternative | Other CT.gov actors |
|---|---|---|---|
| Billable data events | 5 | 1 | 1-2 |
| Adverse events from posted results | Yes | No | No |
| Per-site rows with status | Yes | No | Varies |
| Phase / status / sponsor filters | All, as dropdowns | Partial | Varies |
| Price per 1,000 studies | $12.50 | $12.00 | $2.00 to $12.00 |

### 🚀 How to use the Clinical Trials Scraper

1. Create a free Apify account (with $5 of credit) at console.apify.com.
2. Open this actor's page and click **Try for free**.
3. Enter a condition, drug, sponsor or location; pick status and phase if needed.
4. Toggle the modules you want (sites, outcomes, publications, results).
5. Click **Start** and download CSV, Excel, JSON or XML.

### 💼 Business use cases

#### Competitive pipeline tracking

All Phase 2/3 trials for your indication by sponsor, with enrollment and dates, refreshed on a schedule.

#### Site selection and feasibility

Every recruiting site for an indication, by country and status, in one table.

#### Safety intelligence

Serious adverse-event totals per arm across completed trials of a drug class.

#### Investor and market research

Trial momentum by sponsor class (industry vs academic), phase distribution and enrollment sizes.

### 🔌 Automating the Clinical Trials Scraper

Connect to **Make**, **Zapier**, **Slack**, **Airbyte**, **GitHub** or **Google Drive**: weekly pipeline diffs to Slack, warehouse syncs, or alerts when a watched NCT ID changes status.

### 🌟 Beyond business use cases

- **Research:** reproducible trial datasets with outcomes and AE data.
- **Personal:** find recruiting trials for a family member's condition.
- **Non-profit:** patient-group registries of open studies by region.
- **Experimentation:** a structured playground over the official registry API.

### 🤖 Ask an AI assistant about this scraper

> "I need all recruiting Phase 3 trials for a condition with their sites, sponsors, enrollment and outcome measures as CSV. Would the Clinical Trials Scraper on Apify (apify.com/punkrecordsdata/clinical-trials-scraper) do this on a schedule?"

### ❓ Frequently Asked Questions

#### 🧬 How do I export ClinicalTrials.gov search results to CSV or Excel?

Set your condition/drug/status filters, click Start, and download the dataset from the Storage tab.

#### 🏥 Can I get every site where a trial is running?

Yes. The sites module attaches facility, city, country and per-site status for up to 300 sites per study.

#### 💊 How do I track a competitor's trial pipeline?

Set the sponsor field to their name and sort by "Recently updated first"; schedule the run weekly.

#### 📊 Does it include study results and adverse events?

Yes, for studies with posted results: participant flow groups and serious/other AE totals per arm, billed only for those studies.

#### 🆔 Can I fetch specific studies by NCT number?

Yes, paste NCT IDs and they run before the search.

#### 🔎 Which filters are supported?

Condition, intervention, free term, location, sponsor, 10 recruitment statuses, phases Early-1 through 4, and 4 sort orders, all mapped to real API parameters.

#### 💵 Do I pay for modules with no data?

No. Each module bills per study only when it returns real content.

#### 📦 How many studies can one run return?

Up to 1,000,000 on paid plans, using the API's own pagination. Free users get a 10-study preview.

#### ⚙️ Does it need an API key?

No, the ClinicalTrials.gov v2 API is public.

#### 🕒 How current is the data?

Live from the registry at run time; the lastUpdated field per study shows exactly how fresh each record is.

#### ⚖️ Is this medical advice?

No. It exports public registry data for research and analysis; talk to a physician about treatment decisions.

### 🔌 Integrate with any app

Datasets are available via the Apify API in JSON, CSV, Excel or XML, with webhooks for run completion, ready for Python, R, Sheets or BI tools.

### 🔗 Recommended Actors

- [NPPES NPI Registry Scraper](https://apify.com/punkrecordsdata/nppes-npi-registry-scraper) - the US providers who run these trials
- [Healthcare Provider Payments Scraper](https://apify.com/punkrecordsdata/healthcare-provider-payments-scraper) - industry payments to investigators
- [arXiv Research Papers Scraper](https://apify.com/punkrecordsdata/arxiv-research-papers-scraper) - the preprint literature with citation metrics
- [Nonprofit 990 Financials Scraper](https://apify.com/punkrecordsdata/nonprofit-financials-scraper) - foundations funding medical research

> 💡 **Pro Tip:** browse the complete [PunkRecordsData collection](https://apify.com/punkrecordsdata) for more data tools.

**🆘 Need Help?** contact.punkrecordsdata@gmail.com

> **⚠️ Disclaimer:** independent tool, not affiliated with ClinicalTrials.gov or the NIH; only publicly available registry data. Not medical advice.

# Actor input Schema

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

Condition or disease to search (e.g. melanoma, type 2 diabetes).

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

Drug, device or treatment (e.g. pembrolizumab).

## `otherTerm` (type: `string`):

Free-text term matched across the study record.

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

City, state or country the trial runs in (e.g. Boston, Spain).

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

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

## `nctIds` (type: `array`):

Fetch exact studies by NCT number (e.g. NCT01844505). Runs in addition to the search.

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

Free users: Limited to 10 items (preview). Paid users: Optional, max 1,000,000

## `overallStatus` (type: `string`):

Only trials in this status.

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

Only trials in this phase.

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

Order of results.

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

Attach every site (facility, city, country, site status) to the study row. Billed per study when sites exist.

## `includeOutcomes` (type: `boolean`):

Primary and secondary outcome measures with timeframes.

## `includeReferences` (type: `boolean`):

Linked publications with PMIDs.

## `includeResults` (type: `boolean`):

For studies with posted results: participant flow, and serious/other adverse event totals per group. Billed per study that actually has results.

## Actor input object example

```json
{
  "condition": "melanoma",
  "nctIds": [],
  "maxItems": 10,
  "overallStatus": "",
  "phase": "",
  "sortBy": "",
  "includeLocations": true,
  "includeOutcomes": true,
  "includeReferences": false,
  "includeResults": false
}
```

# Actor output Schema

## `overview` (type: `string`):

Key fields per study

## `fullData` (type: `string`):

Complete dataset with all fields

# 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": "melanoma",
    "intervention": "",
    "otherTerm": "",
    "location": "",
    "sponsor": "",
    "nctIds": [],
    "maxItems": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("punkrecordsdata/clinical-trials-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": "melanoma",
    "intervention": "",
    "otherTerm": "",
    "location": "",
    "sponsor": "",
    "nctIds": [],
    "maxItems": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("punkrecordsdata/clinical-trials-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": "melanoma",
  "intervention": "",
  "otherTerm": "",
  "location": "",
  "sponsor": "",
  "nctIds": [],
  "maxItems": 10
}' |
apify call punkrecordsdata/clinical-trials-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,punkrecordsdata/clinical-trials-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/ymW46uosIwnldbNWf/builds/ZukaeKk4j5kH9J6KU/openapi.json
