# ClinicalTrials.gov Scraper \[$1.50/1K 💰] | Trial Data (`ahmed_jasarevic/clinicaltrials-scraper`) Actor

Scrape ClinicalTrials.gov studies: NCT IDs, conditions, sponsors, locations, eligibility, outcomes, references and posted results. Export JSON or CSV. $1.50 per 1,000 studies.

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

## Pricing

from $1.40 / 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 Scraper – Clinical Study & Results Data

Collect clinical trial records from **ClinicalTrials.gov**, the world's largest registry of clinical studies. Get NCT IDs, titles, statuses, phases, enrollment, conditions, interventions, sponsors, locations, eligibility criteria, outcomes, publications, posted results and oversight details. **$1.50 per 1,000 studies.**

### Clinical Trial Data For Research And Intelligence

ClinicalTrials.gov publishes study records from sponsors and investigators around the world. This Actor turns those public records into clean, structured data for pharmaceutical teams, contract research organizations, investors, hospitals, universities, patient-recruitment platforms and AI dataset builders.

- **Pipeline intelligence** — track competitor trials by condition, phase and status.
- **Patient recruitment** — find recruiting studies by disease, age and location.
- **Systematic reviews** — assemble trial landscapes with outcomes and references.
- **Investor research** — monitor enrollment, milestones and posted results.
- **AI datasets** — build structured clinical-research corpora.

### How It Works

![How the ClinicalTrials.gov Scraper works: search by keyword, condition or NCT ID and save study, eligibility, location and results data.](https://api.apify.com/v2/key-value-stores/oeuA0kLOyhbRM4fzt/records/how-it-works-clinicaltrials-scraper.webp)

Choose a search mode, enter a keyword, condition or list of NCT IDs, and set filters for status, phase, study type and results availability. The Actor writes one row per study to the default dataset. Enable full results and references when you need outcome tables, adverse events and publication links.

- Search by keyword, condition, term or exact NCT IDs.
- Filter by recruiting status, phase and study type.
- Optional results, references and eligibility details.
- One row per study, ready for JSON, CSV or Excel.
- Free users get a 20-study preview.

### Search Modes

- **Search** — free-text keyword across conditions, interventions and titles.
- **Condition** — disease-focused search such as `breast cancer` or `type 2 diabetes`.
- **Term** — general term search with the same behavior as keyword search.
- **NCT IDs** — scrape exact studies such as `NCT00000419,NCT02562313`.

Status, phase and study type accept comma-separated values. Set `hasResults` to `true` to keep only studies with posted results.

### Study Fields

Each record can include identification, status and dates, study design, conditions, keywords, MeSH terms, interventions, arm groups, sponsors, collaborators, responsible party, locations, contacts, officials, eligibility, outcomes, references, results, IPD sharing, oversight and expanded-access information.

Results data is returned when `includeResults` is on and the study has posted results. References are returned when `includeReferences` is on.

### Input – Configure A Clinical Trial Run

| Field | Type | Default | Notes |
|---|---|---|---|
| `mode` | string | `search` | `search`, `condition`, `term` or `nctIds` |
| `nctIds` | string | — | Comma-separated NCT IDs for `nctIds` mode |
| `searchQuery` | string | — | Keyword for `search` and `term` modes |
| `condition` | string | — | Disease or condition for `condition` mode |
| `status` | string | `ALL` | Overall status filter; comma-separated values allowed |
| `phase` | string | `ALL` | Phase filter; comma-separated values allowed |
| `studyType` | string | `ALL` | Interventional, observational or expanded access |
| `hasResults` | boolean | `false` | Keep only studies with posted results |
| `maxStudies` | integer | `100` | Maximum studies saved; `0` means no limit |
| `pageSize` | integer | `100` | Studies per page, up to 1,000 |
| `includeResults` | boolean | `true` | Add outcome data, adverse events and analyses |
| `includeReferences` | boolean | `true` | Add PMIDs, citations and reference types |
| `proxy` | object | Off | Optional connection settings |

### Output – Study Fields

- **Identification** — `nctId`, `orgStudyId`, `briefTitle`, `officialTitle`, `acronym`
- **Status and dates** — `overallStatus`, `statusVerifiedDate`, `startDate`, `primaryCompletionDate`, `completionDate`, `firstSubmitDate`, `firstPostDate`, `lastUpdateDate`, `lastPostDate`
- **Design** — `studyType`, `phases`, `enrollment`, `enrollmentType`, `designInfo`, `patientRegistry`
- **Conditions** — `conditions`, `keywords`, `derivedConditions`, `derivedInterventions`
- **Interventions** — `interventions`, `armGroups`
- **Sponsors** — `leadSponsor`, `collaborators`, `responsibleParty`
- **Locations and contacts** — `locations`, `centralContacts`, `overallOfficials`
- **Eligibility** — `eligibilityCriteria`, `healthyVolunteers`, `sex`, `minimumAge`, `maximumAge`, `stdAges`
- **Outcomes** — `primaryOutcomes`, `secondaryOutcomes`, `otherOutcomes`
- **References and results** — `references`, `hasResults`, `resultsSection`
- **Sharing and oversight** — `ipdSharing`, `oversightInfo`, `expandedAccessInfo`, `versionHolder`

### Example Input – Recruiting Phase 2 And 3 Diabetes Studies

```json
{
  "mode": "condition",
  "condition": "type 2 diabetes",
  "status": "RECRUITING",
  "phase": "PHASE2,PHASE3",
  "maxStudies": 100,
  "includeResults": true,
  "includeReferences": true
}
```

### Example Output – One Clinical Trial

```json
{
  "nctId": "NCT00000419",
  "orgStudyId": "SELENA",
  "briefTitle": "Safety of Estrogens in Lupus: Hormone Replacement Therapy",
  "officialTitle": "Safety of Estrogens in Lupus Erythematosus - National Assessment (SELENA)",
  "acronym": "SELENA",
  "overallStatus": "TERMINATED",
  "statusVerifiedDate": "2006-01",
  "studyType": "INTERVENTIONAL",
  "phases": ["PHASE3"],
  "enrollment": 350,
  "enrollmentType": "ACTUAL",
  "conditions": ["Systemic Lupus Erythematosus"],
  "keywords": ["Lupus", "Hormone Replacement Therapy"],
  "interventions": [
    {
      "type": "DRUG",
      "name": "Premarin and Provera",
      "description": "Hormone replacement therapy",
      "armGroupLabels": ["HRT"],
      "otherNames": []
    }
  ],
  "leadSponsor": { "name": "NYU Langone Health", "class": "OTHER" },
  "locations": [
    {
      "facility": "Johns Hopkins Hospital",
      "city": "Baltimore",
      "state": "Maryland",
      "zip": "21287",
      "country": "United States",
      "status": "TERMINATED",
      "contacts": []
    }
  ],
  "eligibilityCriteria": "Inclusion Criteria:\n* Female\n* Unequivocal diagnosis of SLE",
  "healthyVolunteers": false,
  "sex": "FEMALE",
  "minimumAge": "18 Years",
  "maximumAge": "70 Years",
  "primaryOutcomes": [
    {
      "measure": "Incidence of severe lupus flare",
      "description": "Time to first severe flare",
      "timeFrame": "Up to 24 months"
    }
  ],
  "hasResults": false
}
```

### Export Studies And Schedule Updates

Download JSON, CSV, Excel or HTML from Apify Console, or send results to Google Sheets, Airtable, BigQuery, Make, Zapier, n8n or a webhook. Schedule daily or weekly runs to follow new trials, status changes and posted results.

### Related Actors

- [EU Clinical Trials Register Scraper](https://apify.com/ahmed_jasarevic/eu-scraper) — add European trial records
- [NIH RePORTER Scraper](https://apify.com/ahmed_jasarevic/nih-scraper) — add funded research grants
- [Medical Scraper](https://apify.com/ahmed_jasarevic/medical-scraper) — add medical reference data
- [ProPublica Nonprofit Scraper](https://apify.com/ahmed_jasarevic/propublica-scraper) — add nonprofit health organizations

### FAQ

#### Which registry is covered?

ClinicalTrials.gov, the public registry maintained by the U.S. National Library of Medicine.

#### Can I scrape exact studies?

Yes. Use `mode: "nctIds"` and pass comma-separated IDs in `nctIds`.

#### Why are outcomes or results missing?

Set `includeResults` to `true` and confirm the study has posted results. Many trials never publish result tables.

#### What is the difference between `search`, `condition` and `term`?

`search` and `term` use a general keyword query. `condition` targets a disease or condition field.

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

`maxStudies` defaults to 100. Set `0` for no limit, subject to registry availability. Free users get a 20-study preview.

#### How much does it cost?

FREE and BRONZE users pay **$0.0015 per study** ($1.50 per 1,000). SILVER pays **$0.00145** and GOLD+ pays **$0.0014** ($1.40 per 1,000), plus a small Actor Start event.

### For AI Agents & LLM Apps

Returns one row per clinical study with identification, status, design, conditions, interventions, sponsors, locations, eligibility, outcomes and optional results.

Minimal working input:

```json
{ "mode": "search", "searchQuery": "breast cancer", "maxStudies": 20, "includeResults": false }
```

Output fields: `nctId, orgStudyId, briefTitle, officialTitle, acronym, overallStatus, statusVerifiedDate, studyType, phases, enrollment, enrollmentType, conditions, keywords, interventions, leadSponsor, collaborators, responsibleParty, locations, centralContacts, overallOfficials, startDate, primaryCompletionDate, completionDate, firstSubmitDate, firstPostDate, lastUpdateDate, lastPostDate, briefSummary, detailedDescription, eligibilityCriteria, healthyVolunteers, sex, minimumAge, maximumAge, stdAges, designInfo, armGroups, primaryOutcomes, secondaryOutcomes, otherOutcomes, references, hasResults, resultsSection, derivedConditions, derivedInterventions, ipdSharing, oversightInfo, expandedAccessInfo, patientRegistry, versionHolder`.

Behaviors an agent should know:

- `resultsSection` is present only when `includeResults` is not `false` and the study has results.
- `hasResults` can be `false` even for completed trials.
- Status, phase and study type are uppercase registry values.
- Free users get a 20-study preview.

Billing: **$0.0015 per study** on FREE/BRONZE ($1.50 per 1,000), $0.00145 on SILVER and $0.0014 on GOLD+ ($1.40 per 1,000), plus a small Actor Start event.

### Legal & Compliance Disclaimer

This Actor is an independent tool. It is not affiliated with, endorsed by or sponsored by ClinicalTrials.gov, the National Library of Medicine or the National Institutes of Health.

It collects publicly posted study records. Trial details, statuses and results can change without notice. The Actor does not collect patient-level or private medical data. Users are responsible for complying with registry terms, research-ethics rules and applicable data-protection laws.

### SEO Keywords

clinicaltrials scraper, clinicaltrials.gov data, clinical trial data, nct id lookup, clinical study data, trial results data, clinical research dataset, drug trial data, biotech pipeline data, clinical trial search, patient eligibility data, trial sponsor data, medical research data, clinical trial api, trial outcomes data, pharma research data, healthcare dataset, clinical trial export

# Actor input Schema

## `mode` (type: `string`):

How to find studies to scrape.

## `nctIds` (type: `string`):

Comma-separated list of NCT IDs to scrape (e.g., NCT00000419,NCT02562313). Used when mode='nctIds'.

## `searchQuery` (type: `string`):

General search term (condition, intervention, keyword). Used when mode='search' or 'term'.

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

Specific condition to filter by (e.g., 'breast cancer', 'diabetes'). Used when mode='condition'.

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

Filter by overall status. Multiple values separated by commas.

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

Filter by study phase. Multiple values separated by commas.

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

Filter by study type.

## `hasResults` (type: `boolean`):

If true, only return studies that have posted results.

## `maxStudies` (type: `integer`):

Maximum number of studies to retrieve (0 = no limit, but capped by API).

## `pageSize` (type: `integer`):

Number of studies per API page (max 1000).

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

Fetch detailed results data (outcome measures, statistical analyses, adverse events). Slower but more complete.

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

Include publication references (PMID, citations).

## `proxy` (type: `object`):

Select proxies to be used by your crawler.

## Actor input object example

```json
{
  "mode": "search",
  "nctIds": "",
  "searchQuery": "cancer",
  "condition": "",
  "status": "ALL",
  "phase": "ALL",
  "studyType": "ALL",
  "hasResults": false,
  "maxStudies": 100,
  "pageSize": 100,
  "includeResults": true,
  "includeReferences": true,
  "proxy": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `dataset` (type: `string`):

Dataset containing scraped study records

# 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 = {
    "nctIds": "",
    "searchQuery": "cancer",
    "condition": "",
    "proxy": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("ahmed_jasarevic/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 = {
    "nctIds": "",
    "searchQuery": "cancer",
    "condition": "",
    "proxy": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("ahmed_jasarevic/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 '{
  "nctIds": "",
  "searchQuery": "cancer",
  "condition": "",
  "proxy": {
    "useApifyProxy": false
  }
}' |
apify call ahmed_jasarevic/clinicaltrials-scraper --silent --output-dataset

```

## MCP server setup

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