# Clinical Trials Scraper - ClinicalTrials.gov Data API (`deanko/clinicaltrials-scraper`) Actor

Clinical trials API for ClinicalTrials.gov: export studies by condition, drug, sponsor, phase, status or date to CSV, Excel or JSON. $1 per 1,000 trials.

- **URL**: https://apify.com/deanko/clinicaltrials-scraper.md
- **Developed by:** [dean ko](https://apify.com/deanko) (community)
- **Categories:** Business, Lead generation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.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.

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

## Clinical Trials Scraper: ClinicalTrials.gov data API and export

Export clinical trials from **ClinicalTrials.gov**, the US National Library of Medicine registry of 500,000+ studies from 200+ countries. You get clean, flat rows ready for Excel, Google Sheets, BI tools or your database. Search by **condition, drug or intervention, sponsor, location, recruitment status, phase, study type, start date and last-update date**, or look up studies by **NCT ID**.

Use it as a no-code **clinical trials API**. It runs on the official ClinicalTrials.gov API v2, so you need no API key, no proxies and no browser, and it returns **$1 per 1,000 trials**.

### What does the Clinical Trials Scraper do?

It turns a ClinicalTrials.gov search into a dataset with **one row per study**. Each row includes:

- NCT ID, study link, brief title and official title
- overall status, phases and study type
- conditions, and interventions (name and type)
- lead sponsor, sponsor class (`INDUSTRY`, `NIH`, `OTHER`...) and collaborators
- enrollment (count, and whether it is estimated or actual)
- start, primary completion, completion, first-posted and last-update dates
- number of sites and the list of countries
- primary outcome measures, the brief summary, and whether results have been posted

#### Who is it for?

- **Pharma and biotech competitive intelligence.** Track every trial a competitor sponsors and see which indications and phases they are moving into. Catch trials that start, complete or are terminated.
- **Investors and equity analysts.** Map the pipeline for a drug class (GLP-1, ADCs, CAR-T...). Count Phase 3 readouts by expected primary completion date. Compare sponsors by enrollment and geography.
- **CROs, site networks and patient recruitment vendors.** Find recruiting trials by condition and country, see how many sites each one runs and where, and build prospect lists of industry sponsors.
- **Researchers, librarians and data journalists.** Build datasets for trial landscape reviews, meta-research and results-reporting audits (`hasResults`).
- **Monitoring and alerts.** Schedule a daily run with `lastUpdateFrom` set to yesterday to get only the studies that changed.

### Why use this ClinicalTrials.gov scraper?

- **Low price.** $1 per 1,000 studies. You pay only for rows saved, and you can set a maximum charge per run.
- **Official API, not HTML scraping.** It runs on ClinicalTrials.gov API v2, so it doesn't break when the website layout changes and nothing gets blocked. It fetches up to 1,000 studies per request.
- **Incremental monitoring built in.** The `lastUpdateFrom` / `lastUpdateTo` and `startDateFrom` / `startDateTo` filters let you pull only what is new or changed.
- **Multi-value filters.** Enter several conditions, drugs, sponsors or countries in one run. Values in one field are OR-ed, and different fields are AND-ed.
- **Analysis-ready rows.** Fields are flat, `countries` is de-duplicated, `locationsCount` is pre-computed, and the Overview table view opens straight in the Console.
- **No personal data.** Investigator and contact names, emails and phone numbers are deliberately left out. Only organization and facility-level data is returned.
- **Fast and light.** It requests only the modules it outputs and skips the heavy results section. A 20-study run finishes in a few seconds.

### How to scrape clinical trial data

1. Click **Try for free** (or **Start**) on this page.
2. Fill in one or more filters, such as `conditions: obesity` and `overallStatus: RECRUITING`.
3. Set **Max studies** to cap the number of rows, and with it your cost.
4. Click **Start** and wait a few seconds.
5. Download the results as **CSV, Excel, JSON, XML or HTML**, or read them via the API.

#### Input example

Recruiting or not-yet-recruiting Phase 3 obesity trials of semaglutide or tirzepatide that started in 2024 or later:

```json
{
  "conditions": ["obesity"],
  "interventions": ["semaglutide", "tirzepatide"],
  "overallStatus": ["RECRUITING", "NOT_YET_RECRUITING"],
  "phases": ["PHASE3"],
  "startDateFrom": "2024-01-01",
  "maxItems": 500
}
```

| Field | What it does | Example |
|---|---|---|
| `conditions` | Disease or condition | `obesity`, `breast cancer` |
| `searchTerms` | Free text across all fields (supports ClinicalTrials.gov search syntax) | `GLP-1`, `"cell therapy"` |
| `interventions` | Drug, biologic, device or procedure | `semaglutide`, `pembrolizumab` |
| `sponsors` | Lead sponsor or collaborator | `Novo Nordisk`, `Pfizer` |
| `locations` | Country, state, city or facility | `Germany`, `Boston` |
| `overallStatus` | Recruitment status | `RECRUITING`, `COMPLETED`, `TERMINATED` |
| `phases` | Trial phase | `EARLY_PHASE1`, `PHASE1` ... `PHASE4`, `NA` |
| `studyType` | Study type | `INTERVENTIONAL`, `OBSERVATIONAL`, `EXPANDED_ACCESS` |
| `startDateFrom` / `startDateTo` | Study start date range | `2024`, `2024-06`, `2024-06-30` |
| `lastUpdateFrom` / `lastUpdateTo` | Last update range, for incremental runs | `2026-10-01` |
| `nctIds` | Direct lookup by NCT number or study URL | `NCT04368728` |
| `maxItems` | Maximum studies to save (default 20) | `1000` |

With an empty input, the Actor returns the 20 most relevant studies across the whole registry.

### Output sample

```json
{
  "nctId": "NCT07777575",
  "url": "https://clinicaltrials.gov/study/NCT07777575",
  "briefTitle": "Resistance Training to Prevent Muscle Loss During Treatment With Tirzepatide",
  "officialTitle": "A Phase IV, Randomized Controlled Trial to Evaluate the Effects of Resistance Training Ver...",
  "overallStatus": "RECRUITING",
  "phases": ["PHASE4"],
  "studyType": "INTERVENTIONAL",
  "conditions": ["Obesity (BMI>30)"],
  "interventions": [
    { "name": "Dual GIP/GLP-1 Receptor Agonist Tirzepatide", "type": "DRUG" },
    { "name": "Resistance Training", "type": "BEHAVIORAL" }
  ],
  "leadSponsor": "Technical University of Munich",
  "leadSponsorClass": "OTHER",
  "collaborators": ["EGYM SE"],
  "enrollmentCount": 150,
  "enrollmentType": "ESTIMATED",
  "startDate": "2026-09-07",
  "primaryCompletionDate": "2027-05-31",
  "completionDate": "2027-05-31",
  "firstPostDate": "2026-08-20",
  "lastUpdateDate": "2026-09-17",
  "locationsCount": 1,
  "countries": ["Germany"],
  "primaryOutcomes": ["Change in contractile thigh muscle volume (mL), as assessed by magnetic resonance imaging (MRI)"],
  "briefSummary": "Incretin-based pharmacotherapies induce significant weight loss and represent a paradigm shift in obesity treatment. How...",
  "hasResults": false,
  "scrapedAt": "2026-10-19T08:23:06.554Z"
}
```

| Field | Type | Description |
|---|---|---|
| `nctId` | string | ClinicalTrials.gov identifier |
| `url` | string | Link to the study page |
| `briefTitle`, `officialTitle` | string | Study titles |
| `overallStatus` | string | Recruitment status (`RECRUITING`, `COMPLETED`, ...) |
| `phases` | array | Trial phases (`PHASE1` ... `PHASE4`, `NA`) |
| `studyType` | string | `INTERVENTIONAL`, `OBSERVATIONAL` or `EXPANDED_ACCESS` |
| `conditions` | array | Conditions studied |
| `interventions` | array | `{ name, type }` for each drug, device, procedure... |
| `leadSponsor`, `leadSponsorClass` | string | Lead sponsor and its class (`INDUSTRY`, `NIH`, `FED`, `OTHER`...) |
| `collaborators` | array | Collaborator organizations |
| `enrollmentCount`, `enrollmentType` | number, string | Planned (`ESTIMATED`) or real (`ACTUAL`) enrollment |
| `startDate`, `primaryCompletionDate`, `completionDate` | string | Key study dates (some are month-only, e.g. `2025-01`) |
| `firstPostDate`, `lastUpdateDate` | string | Registry posting dates |
| `locationsCount`, `countries` | number, array | Number of sites and the de-duplicated country list |
| `primaryOutcomes` | array | Primary outcome measures |
| `briefSummary` | string | Plain-language summary |
| `hasResults` | boolean | Whether results have been posted |
| `scrapedAt` | string | When the row was collected (ISO 8601) |

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

This Actor uses **pay-per-event** pricing:

- **$0.001 per study saved** ($1 per 1,000 studies)
- **$0.00005 per run start** (per GB of memory, a fraction of a cent)

**Worked example:** exporting all ~1,500 recruiting obesity trials costs about 1,500 × $0.001 = **$1.50**, plus well under a cent for the run start. The default 20-study run costs about **$0.02**, so the $5 of monthly free credit on the Apify Free plan covers thousands of studies.

Set **Max studies** or a maximum charge per run, and the Actor stops as soon as it reaches the limit.

### Integrations and API

Call the Actor from your own code with the official `apify-client`, or connect it to Make, Zapier, n8n, Google Sheets, Slack, webhooks and more from the **Integrations** tab.

**Python**

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("deanko/clinicaltrials-scraper").call(run_input={
    "conditions": ["breast cancer"],
    "overallStatus": ["RECRUITING"],
    "phases": ["PHASE3"],
    "maxItems": 200,
})
for study in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(study["nctId"], study["leadSponsor"], study["enrollmentCount"])
```

**JavaScript / Node.js**

```js
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: '<YOUR_APIFY_TOKEN>' });
const run = await client.actor('deanko/clinicaltrials-scraper').call({
    sponsors: ['Novo Nordisk'],
    lastUpdateFrom: '2026-10-01',
    maxItems: 500,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items.length, 'studies updated since Oct 1');
```

You can also run it with one HTTP request through the `run-sync-get-dataset-items` endpoint and get the rows back in the response.

### FAQ

**Where does the data come from?**
It comes from the official, public [ClinicalTrials.gov API v2](https://clinicaltrials.gov/data-api/api), run by the US National Library of Medicine (NIH). The data is the same as on the website.

**Do I need a ClinicalTrials.gov API key?**
No. The API is free and open, and the Actor handles paging, retries and output formatting.

**Are there rate limits?**
ClinicalTrials.gov asks clients to keep request rates moderate (roughly 50 requests per minute per IP). The Actor fetches pages one at a time, up to 1,000 studies per page, with a short pause between them. Even a 10,000-study export needs only about 10 requests, so you won't hit the limit.

**How do I get only new or updated trials every day?**
Schedule the Actor (Console → Schedules) with `lastUpdateFrom` set to the previous day, and add a webhook or Slack/Sheets integration to receive the changes.

**How do multiple values work?**
Values in one field are combined with OR (`semaglutide` OR `tirzepatide`). Different fields are combined with AND (condition AND status AND phase).

**Can I look up one specific trial?**
Yes. Put its NCT number or study URL in `nctIds` and clear the other filters.

**Why are some dates only a month?**
That is how the sponsor registered them, and the Actor keeps them as is (e.g. `2025-01`).

### Limitations

- Eligibility criteria (age, sex, healthy volunteers), arms, secondary outcomes and the posted results data are **not** included in the output. Only the `hasResults` flag is.
- Investigator and contact details are deliberately excluded.
- Only ClinicalTrials.gov is covered, not EU CTR, ISRCTN, WHO ICTRP or other registries.
- Results come in ClinicalTrials.gov relevance order, with no custom sort option.
- Data is only as fresh and complete as the registry itself. Sponsors update their records on their own schedule.

### Legal and privacy

The data comes from the public ClinicalTrials.gov registry. This Actor is not affiliated with or endorsed by the US National Library of Medicine or NIH. You are responsible for using the data in line with the ClinicalTrials.gov terms and the laws that apply to you.

### Support and feedback

Missing a field or filter you need, or found a bug? Open an issue in the **Issues** tab on this page. If the Actor saves you time, a short review helps other people find it.

# Actor input Schema

## `conditions` (type: `array`):

Disease or condition to search for (ClinicalTrials.gov condition field). Add several to match any of them. Examples: obesity, breast cancer, Alzheimer disease.

## `searchTerms` (type: `array`):

Free-text search across all study fields, like the 'Other terms' box on ClinicalTrials.gov. Supports their search syntax (AND, OR, NOT, quotes). Examples: GLP-1, CRISPR, "cell therapy".

## `interventions` (type: `array`):

Drug, biologic, device or procedure being tested. Add several to match any of them. Examples: semaglutide, pembrolizumab, CAR-T.

## `sponsors` (type: `array`):

Lead sponsor or collaborator organization. Add several to match any of them. Examples: Novo Nordisk, Pfizer, National Cancer Institute.

## `locations` (type: `array`):

Where the study runs: country, state, city or facility name. Add several to match any of them. Examples: United States, Germany, Boston, Mayo Clinic.

## `overallStatus` (type: `array`):

Recruitment status. Pick RECRUITING and NOT_YET_RECRUITING to find open trials. Leave empty for all statuses.

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

Only return studies in one of these phases. NA = not applicable (e.g. device or behavioral studies). Leave empty for all phases.

## `studyType` (type: `string`):

Restrict to one study type.

## `startDateFrom` (type: `string`):

Only studies starting on or after this date. Format YYYY, YYYY-MM or YYYY-MM-DD.

## `startDateTo` (type: `string`):

Only studies starting on or before this date. Format YYYY, YYYY-MM or YYYY-MM-DD.

## `lastUpdateFrom` (type: `string`):

Only studies whose record was last updated on or after this date. Useful for daily/weekly monitoring. Format YYYY, YYYY-MM or YYYY-MM-DD.

## `lastUpdateTo` (type: `string`):

Only studies whose record was last updated on or before this date. Format YYYY, YYYY-MM or YYYY-MM-DD.

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

Look up specific studies by NCT number (e.g. NCT04368728) or full study URL. This is combined with the other filters (AND), so clear them if you only want these IDs.

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

Maximum number of studies to save. You are charged per study saved, so this caps your cost (20 studies is about $0.03; 1,000 studies is about $1.50).

## Actor input object example

```json
{
  "conditions": [
    "obesity"
  ],
  "searchTerms": [],
  "interventions": [],
  "sponsors": [],
  "locations": [],
  "overallStatus": [
    "RECRUITING"
  ],
  "phases": [],
  "studyType": "",
  "startDateFrom": "",
  "startDateTo": "",
  "lastUpdateFrom": "",
  "lastUpdateTo": "",
  "nctIds": [],
  "maxItems": 20
}
```

# Actor output Schema

## `results` (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 = {
    "conditions": [
        "obesity"
    ],
    "searchTerms": [],
    "interventions": [],
    "sponsors": [],
    "locations": [],
    "overallStatus": [
        "RECRUITING"
    ],
    "phases": [],
    "startDateFrom": "",
    "startDateTo": "",
    "lastUpdateFrom": "",
    "lastUpdateTo": "",
    "nctIds": [],
    "maxItems": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("deanko/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 = {
    "conditions": ["obesity"],
    "searchTerms": [],
    "interventions": [],
    "sponsors": [],
    "locations": [],
    "overallStatus": ["RECRUITING"],
    "phases": [],
    "startDateFrom": "",
    "startDateTo": "",
    "lastUpdateFrom": "",
    "lastUpdateTo": "",
    "nctIds": [],
    "maxItems": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("deanko/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 '{
  "conditions": [
    "obesity"
  ],
  "searchTerms": [],
  "interventions": [],
  "sponsors": [],
  "locations": [],
  "overallStatus": [
    "RECRUITING"
  ],
  "phases": [],
  "startDateFrom": "",
  "startDateTo": "",
  "lastUpdateFrom": "",
  "lastUpdateTo": "",
  "nctIds": [],
  "maxItems": 20
}' |
apify call deanko/clinicaltrials-scraper --silent --output-dataset

```

## MCP server setup

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