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

Scrapes clinical trial records from ClinicalTrials.gov by search query or direct URL. Returns each trial as a flat row with status, phase, enrollment, eligibility, contacts, locations, and posted dates.

- **URL**: https://apify.com/parseforge/clinicaltrials-scraper.md
- **Developed by:** [ParseForge](https://apify.com/parseforge) (community)
- **Categories:** Automation, Developer tools, Other
- **Stats:** 41 total users, 1 monthly users, 100.0% runs succeeded, 3 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $8.00 / 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?

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

[![ParseForge](https://raw.githubusercontent.com/ParseForge/apify-assets/main/banner.jpg)](https://apify.com/parseforge?fpr=vmoqkp)

### ClinicalTrials.gov Scraper

**Scrape clinical trials from ClinicalTrials.gov by condition, intervention, location, phase, sponsor, or date, up to a million per run.** Every trial comes with its status, eligibility, contacts, locations, and posted results. No API key or registration. Export to CSV, JSON, Excel, or XML.

ClinicalTrials.gov's official API needs a registered account, a token, and rate limits that throttle large exports. This reads the public study registry directly, filtered by condition, drug, phase, sponsor, location, or date, and returns each match in one fixed schema.

| Who uses it | What they scrape ClinicalTrials.gov for |
|---|---|
| Market researchers | Which trials are recruiting for a given condition this quarter |
| Pharma competitive intelligence teams | What sponsors are running Phase 3 trials in a therapeutic area |
| Clinical operations teams | Which sites are active for a protocol and their contact details |
| Patient advocacy groups | Which recruiting trials match a disease and location for their community |
| Data journalists | How many trials were posted or updated in a date range for a story |

### What it does

This Actor collects clinical trial records from ClinicalTrials.gov by search query or direct URL, and returns each trial as a flat row.

- 🔍 **Search or URL:** start from a ClinicalTrials.gov search URL, an API endpoint, or build a query from condition, intervention, location, and other filters.
- 📊 **Structured rows:** each trial returns as one flat record with status, phase, enrollment, eligibility, contacts, locations, and posted dates.
- 🗓️ **Date filters:** restrict by study start, primary completion, study completion, first posted, results first posted, or last update posted.
- 🏥 **Eligibility filters:** filter by sex, age groups, age range, and whether healthy volunteers are accepted.
- 💊 **Study filters:** filter by phase, study type, results availability, document types, funder type, and FDAAA violation flag.
- 📄 **Export ready:** download as CSV, JSON, Excel, or XML for analysis or upload to your own database.

Results export to CSV, JSON, Excel, or XML, or straight from the API.

### What you can do with ClinicalTrials.gov data

**📈 Track recruiting trials for a condition.**

A market researcher sets condition to 'diabetes' and study status to 'Recruiting and not yet recruiting studies' to get a weekly list of new trials and their sites.

**💊 Monitor competitor pipelines.**

A pharma analyst filters by lead sponsor and phase to see every Phase 3 trial a competitor has posted or updated in the last month.

**🏥 Find trial sites and contacts.**

A clinical operations team searches by facility name or location to get site addresses and contact emails for a specific protocol.

**📊 Audit FDAAA compliance.**

A compliance officer sets the FDAAA violation flag to true to list all studies flagged for results submission violations.

**📰 Build a news dataset.**

A journalist filters by first posted date range to count how many trials were registered for a disease in a given year.

### Why choose this scraper

| | What you get |
|---|---|
| **No API key** | No registration or token, run the Actor |
| **Up to 1M trials** | Paid users can pull up to a million records per run |
| **All trial fields** | Status, phase, enrollment, eligibility, contacts, locations, and posted dates |
| **Flexible filters** | Condition, intervention, location, sponsor, phase, study type, dates, and more |
| **Export formats** | CSV, JSON, Excel, or XML |

### How it compares

This Actor focuses on ClinicalTrials.gov study records with deep filters and high-volume export, while the competitors below add FDA data or AI enrichment.

| Feature | ParseForge | Clinical Trials & FDA Pipeline Intelligence Scraper | Healthcare Intel | ClinicalTrials.gov Scraper - Trials Data, No API Key |
|---|---|---|---|---|
| ClinicalTrials.gov study records | Yes | Yes | Yes | Yes |
| FDA drug approvals, devices, adverse events | Not listed | Yes | Yes | Not listed |
| AI-powered intelligence or news | Not listed | Not listed | Yes | Not listed |
| No API key required | Yes | Not listed | Not listed | Yes |
| Up to 1,000,000 records per run | Yes | Not listed | Not listed | Not listed |
| Export to CSV, JSON, Excel, XML | Yes | Not listed | Not listed | Yes |

### Configure the run

Drive the Actor from a ClinicalTrials.gov search URL or build a query from condition, intervention, location, sponsor, and other filters. Filters run as each trial is read so only matches reach your dataset. The Input tab lists every parameter.

A first run with the defaults:

```json
{
 "startUrl": "https://clinicaltrials.gov/search",
 "maxItems": 10
}
```

A larger pull:

```json
{
 "startUrl": "https://clinicaltrials.gov/search",
 "maxItems": 200
}
```

### Pricing

Pay-per-result: **$0.16 per result** collected. You pay only for the results written to your dataset.

| Results collected | Approximate cost |
|---|---|
| 100 results | $16.00 |
| 1,000 results | $160.00 |
| 10,000 results | $1600.00 |

New Apify accounts start with $5 in free credit.

### Free users

Free-plan runs return up to 10 results as a preview. [Upgrade your Apify plan](https://console.apify.com/sign-up?fpr=vmoqkp) to collect up to 1,000,000 results per run.

### Run it

1. [Create a free Apify account with $5 in credit](https://console.apify.com/sign-up?fpr=vmoqkp).
2. Open the [ClinicalTrials.gov Scraper](https://apify.com/parseforge/clinicaltrials-scraper?fpr=vmoqkp).
3. Set your inputs and any filters, then click **Start**.
4. Export the results as CSV, Excel, JSON, or XML from the **Dataset** tab.

Run it programmatically through the [Apify API](https://docs.apify.com/api/v2) (`run-sync-get-dataset-items`) or the [ApifyClient](https://docs.apify.com/api/client/js) for JavaScript and Python.

### Use with AI agents (MCP)

Give an AI agent live access to ClinicalTrials.gov through the Model Context Protocol. Add the Actor to Claude, Cursor, or any MCP client:

```bash
claude mcp add --transport http apify "https://mcp.apify.com/?tools=parseforge/clinicaltrials-scraper"
```

Then prompt it in plain language to run the scraper and read back the results.

### Troubleshooting

**Why am I getting no results?**

Check that your filters are not too restrictive. Try removing some filters or broadening the condition or intervention terms. Also verify that the startUrl, if used, is a valid ClinicalTrials.gov search URL.

**Why did the run stop at 100 items?**

Free users are limited to 100 items per run. Upgrade to a paid plan to increase maxItems up to 1,000,000.

**Why are my date filters not working?**

Date fields expect YYYY-MM-DD format. Make sure you entered both From and To dates correctly and that the From date is before the To date.

**Why are some fields empty in the output?**

Not all trials have every field populated. For example, results first posted date is only present for trials with posted results. Empty fields are normal.

**Can I use a URL from the ClinicalTrials.gov website?**

Yes, paste any search URL from clinicaltrials.gov/search into startUrl. The Actor will parse the query parameters and ignore other filters.

### FAQ

| Question | Answer |
|---|---|
| Do I need a ClinicalTrials.gov API key? | No. This Actor reads the public study registry directly, so no registration or token is required. |
| Can I scrape all trials for a condition? | Yes. Set the condition field and any other filters, then set maxItems to the number you need. Paid users can pull up to 1,000,000 records. |
| What filters are available? | You can filter by condition, intervention, location, study status, sex, age, phase, study type, results availability, document types, funder type, sponsor, dates, and more. |
| Can I use a search URL from ClinicalTrials.gov? | Yes. Paste any ClinicalTrials.gov search URL or API endpoint into the startUrl field, and all other filters are ignored. |
| What export formats are supported? | CSV, JSON, Excel, and XML. |
| Does it return posted results? | Yes. Each record includes whether results are posted and the results first posted date when available. |
| Can I filter by sponsor? | Yes. Use the leadSponsor field for the lead sponsor or sponsorOrCollaborator for any sponsor or collaborator. |
| Can I filter by study phase? | Yes. Select one or more phases from Early Phase 1 through Phase 4, or Not applicable. |
| Does it include contact information? | Yes. Each trial includes central and facility contacts with names, phone numbers, and emails when available. |
| Can I filter by location? | Yes. Use the location field to search by address, city, state, zip code, or country. |
| Is there a limit for free users? | Free users are limited to 100 items per run. Paid users can set maxItems up to 1,000,000. |
| Can I sort results? | Yes. Sort by relevance or newest first. |

### Related actors

Browse the full [ParseForge collection](https://apify.com/parseforge?fpr=vmoqkp) for more scrapers.

🆘 **Need help?** Email parseforge@protonmail.com with your run ID, your input, and what you expected.

⚠️ **Disclaimer.** This Actor is unofficial and is not affiliated with, endorsed by, or sponsored by U.S. National Library of Medicine. It collects only publicly available data. You are responsible for using the collected data in compliance with the source's terms of service and applicable data-protection laws, including GDPR, CCPA, and PIPL. Do not use it to collect personal data unlawfully.

# Actor input Schema

## `startUrl` (type: `string`):

Paste a ClinicalTrials.gov search URL or an `https://clinicaltrials.gov/api/int/studies?...` endpoint. When this is set, all other filters are ignored.

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

Free users: Limited to 100. Paid users: Optional, max 1,000,000

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

Specific condition or disease to search for (e.g. diabetes, hypertension, cancer). This will be combined with other search terms.

## `otherTerms` (type: `string`):

Additional search terms (e.g. symptoms, treatments, keywords). This will be combined with condition and intervention.

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

Intervention or treatment to search for (e.g. drug name, procedure, device). This will be combined with other search terms.

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

Search by address, city, state, zip code, or country. For information on using this field, see the How to Search for Clinical Studies page.

## `studyStatusFilter` (type: `string`):

Filter studies by status. 'All studies' shows all studies. 'Recruiting and not yet recruiting studies' shows only studies that are currently recruiting or not yet recruiting.

## `sex` (type: `string`):

Filter by eligible sex.

## `ageGroups` (type: `array`):

Filter by standard ClinicalTrials.gov age buckets. Only used when 'Select ranges' is selected.

## `ageRangeFrom` (type: `number`):

Minimum age value. Only used when 'Manually enter range' is selected.

## `ageRangeFromUnit` (type: `string`):

Unit of measurement for the minimum age value.

## `ageRangeTo` (type: `number`):

Maximum age value. Only used when 'Manually enter range' is selected.

## `ageRangeToUnit` (type: `string`):

Unit of measurement for the maximum age value.

## `acceptsHealthyVolunteers` (type: `boolean`):

When true, only trials that accept healthy volunteers are returned.

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

Filter interventional trials by phase labels.

## `studyTypes` (type: `array`):

Filter by study type buckets (interventional, observational, expanded access).

## `resultsAvailability` (type: `string`):

Limit to studies with or without posted results.

## `documentTypes` (type: `array`):

Return only studies with specific document uploads (protocols, SAPs, informed consent forms).

## `funderTypes` (type: `array`):

Filter by the lead sponsor / funder class reported to ClinicalTrials.gov.

## `studyStartDateFrom` (type: `string`):

Start date (YYYY-MM-DD)

## `studyStartDateTo` (type: `string`):

End date (YYYY-MM-DD)

## `primaryCompletionDateFrom` (type: `string`):

Start date (YYYY-MM-DD)

## `primaryCompletionDateTo` (type: `string`):

End date (YYYY-MM-DD)

## `studyCompletionDateFrom` (type: `string`):

Start date (YYYY-MM-DD)

## `studyCompletionDateTo` (type: `string`):

End date (YYYY-MM-DD)

## `firstPostedDateFrom` (type: `string`):

Start date (YYYY-MM-DD)

## `firstPostedDateTo` (type: `string`):

End date (YYYY-MM-DD)

## `resultsFirstPostedDateFrom` (type: `string`):

Start date (YYYY-MM-DD)

## `resultsFirstPostedDateTo` (type: `string`):

End date (YYYY-MM-DD)

## `lastUpdatePostedDateFrom` (type: `string`):

Start date (YYYY-MM-DD)

## `lastUpdatePostedDateTo` (type: `string`):

End date (YYYY-MM-DD)

## `titleOrAcronym` (type: `string`):

Search by study title or its acronym.

## `outcomeMeasure` (type: `string`):

Search by outcome measures used in the study.

## `sponsorOrCollaborator` (type: `string`):

Search by sponsor name or collaborator name.

## `leadSponsor` (type: `string`):

Search by the lead sponsor name specifically.

## `studyIds` (type: `string`):

Search by study identification numbers (e.g., NCT number, protocol ID).

## `facilityName` (type: `string`):

Search by the name of the facility where the study is conducted.

## `fdaRegulationViolation` (type: `boolean`):

Only return studies flagged for FDAAA results submission violations.

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

Sort search results by relevance or by newest entries first.

## Actor input object example

```json
{
  "startUrl": "https://clinicaltrials.gov/search",
  "maxItems": 10,
  "studyStatusFilter": "all",
  "sex": "all",
  "ageRangeFromUnit": "years",
  "ageRangeToUnit": "years",
  "resultsAvailability": "any",
  "sortBy": "relevance"
}
```

# Actor output Schema

## `trials` (type: `string`):

Complete dataset with all scraped clinical trial records including identifiers, status, design metadata, eligibility details, contacts, locations, and documents

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

Overview view of clinical trials with key fields displayed in a table format

# 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 = {
    "startUrl": "https://clinicaltrials.gov/search",
    "maxItems": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("parseforge/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 = {
    "startUrl": "https://clinicaltrials.gov/search",
    "maxItems": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("parseforge/clinicaltrials-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 '{
  "startUrl": "https://clinicaltrials.gov/search",
  "maxItems": 10
}' |
apify call parseforge/clinicaltrials-scraper --silent --output-dataset

```

## MCP server setup

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