# ClinicalTrials.gov Studies Scraper (`parselab/nih-clinical-trials-scraper`) Actor

Search ClinicalTrials.gov studies by condition, drug, sponsor, phase, status or country. Get study design, eligibility, outcomes, sites and contacts, plus adverse event counts and the most reported adverse event terms for completed trials that have posted results. Export to CSV or Excel.

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

## Pricing

from $18.75 / 1,000 results

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

## ClinicalTrials.gov Studies Scraper

This ClinicalTrials.gov scraper searches the registry of clinical studies by condition, drug, sponsor, phase, status or country and returns each study as one structured row. You get the design of the study, eligibility rules, primary and secondary outcomes, every recruiting site with its contacts and, for completed trials that posted results, the number of deaths, serious adverse events and other adverse events plus the most reported adverse event terms.

Pharma and biotech analysts, patient advocates, clinical operations teams and researchers use it to see what is being tested, who is running it and what actually happened in finished trials.

### What can you do with this ClinicalTrials.gov scraper?

- Find recruiting clinical trials for a condition
- Search trials by drug or intervention name
- List all Phase 3 trials from a sponsor such as Pfizer or Novartis
- Find trials near a country or region
- Get the eligibility criteria, age range and sex for a trial
- See primary and secondary outcome measures
- Get the contact person and sites for a recruiting study
- Check adverse events reported in completed trials
- Track newly posted trials and status changes
- Export clinical trial data to CSV or Excel

### What data can you extract from ClinicalTrials.gov?

| Field | What it holds |
|---|---|
| `nctId`, `studyUrl` | Study ID and link |
| `briefTitle`, `officialTitle`, `briefSummary` | What the study is about |
| `overallStatus`, `studyType`, `phases` | Status and design |
| `leadSponsor`, `collaborators` | Who runs and funds it |
| `conditions`, `interventions` | What is studied and what is tested |
| `primaryOutcomes`, `secondaryOutcomes` | Measures and time frames |
| `enrollmentCount`, `enrollmentType` | Planned or actual size |
| `eligibilityCriteria`, `sex`, `minimumAge`, `maximumAge`, `healthyVolunteers` | Who can join |
| `startDate`, `primaryCompletionDate`, `completionDate`, `studyFirstPostDate`, `lastUpdatePostDate` | Timeline |
| `locationsCount`, `locations`, `centralContacts` | Sites and contacts |
| `hasResults` | Whether results are posted |
| `totalDeaths`, `totalSeriousAdverseEvents`, `totalOtherAdverseEvents`, `topAdverseEvents` | Safety results for completed trials |

### How to scrape clinical trials

1. Enter a condition, a drug, a sponsor or any search term.
2. Optionally choose one or more statuses, phases or a country.
3. Set **Max Items**.
4. Click **Start** and export the dataset as CSV, Excel or from the Apify console.

### Input example

```json
{
  "condition": "diabetes",
  "status": ["COMPLETED"],
  "phase": ["PHASE3"],
  "maxItems": 100
}
```

### Output example

```json
{
  "nctId": "NCT02423798",
  "briefTitle": "New Generation Enlite Accuracy Study",
  "overallStatus": "COMPLETED",
  "studyType": "INTERVENTIONAL",
  "phases": ["NA"],
  "leadSponsor": "Medtronic MiniMed, Inc.",
  "conditions": ["Diabetes"],
  "interventions": [{ "type": "DEVICE", "name": "Glucose sensor (Enlite)" }],
  "primaryOutcomes": [{ "measure": "Sensor Accuracy", "timeFrame": "4 months" }],
  "enrollmentCount": 24,
  "hasResults": true,
  "totalDeaths": 0,
  "totalSeriousAdverseEvents": 0,
  "totalOtherAdverseEvents": 5,
  "topAdverseEvents": ["Abdominal Pain", "hematoma at insertion"],
  "studyUrl": "https://clinicaltrials.gov/study/NCT02423798"
}
```

### How much does it cost to scrape ClinicalTrials.gov?

You pay per result: $25 per 1,000 studies plus a tiny start fee. The free plan returns up to 10 studies per run.

### Good to know

- Adverse event fields are filled only for studies that posted results. For other studies they are empty and `hasResults` is false.
- Adverse event totals add up the event groups reported by the sponsor. Read them together with the study design.
- Long lists of sites are returned in full, so records for large multi-site trials can be big.

### Who uses clinical trial data?

- **Competitive intelligence teams** map what rivals are testing.
- **Patient groups** find recruiting trials for a disease.
- **Site and CRO teams** look for studies that need sites in a country.
- **Researchers** collect safety outcomes across many studies.

### FAQ

**Do I need a ClinicalTrials.gov account?**
No. The Actor works without any login.

**Does it include study results?**
Yes, for the safety side. You get adverse event counts and the most reported terms for completed studies with posted results.

**Can I search by location?**
Yes, by country. Use the site lists in each record to narrow down further.

**How do I follow new trials?**
Schedule the Actor with the same search and compare `studyFirstPostDate` and `lastUpdatePostDate` between runs.

### Search ideas

- All recruiting Phase 2 trials for a rare disease
- Every study a competitor sponsors in oncology
- Completed trials with posted results for a drug, sorted by safety events
- Trials that need sites in a specific country

Combine a condition with a status and a phase to keep the result list focused.

### Automate and connect

Schedule the Actor from the Apify console to refresh the data daily or weekly. Send finished datasets to Google Sheets, Zapier, Make or n8n, or trigger a webhook when a run ends, so your reports and alerts update without manual work.

### Legal note

This Actor collects information that is publicly visible on the website. Check the source site's terms and your local rules before using the data. Nothing here is medical advice.

### Support

Missing a field or found a bug? Open an issue from the Actor page.

# Actor input Schema

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

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

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

Condition or disease, e.g. 'diabetes', 'breast cancer'.

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

Drug, device or other intervention name, e.g. 'metformin'.

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

Free-text search across all study fields.

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

Lead sponsor name, e.g. 'Pfizer', 'National Cancer Institute'.

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

Filter by recruitment status. Leave empty for all statuses.

## `phase` (type: `array`):

Filter by trial phase. Leave empty for all phases.

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

Only include studies with a site in this country, e.g. 'United States'.

## Actor input object example

```json
{
  "maxItems": 10
}
```

# Actor output Schema

## `overview` (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 = {
    "maxItems": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("parselab/nih-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 = { "maxItems": 10 }

# Run the Actor and wait for it to finish
run = client.actor("parselab/nih-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 '{
  "maxItems": 10
}' |
apify call parselab/nih-clinical-trials-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,parselab/nih-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/QUyyej2g8sJ4g3xbM/builds/yCJhId3mqRRcIhvtB/openapi.json
