# ClinicalTrials.gov Medical Studies & Clinical Trials Scraper (`trusted_tech_spot/clinicaltrials-gov-research-studies-scraper`) Actor

Scrape clinical trial studies, medical research, experimental drugs, recruitment eligibility, sponsors, and trial locations from ClinicalTrials.gov API v2.

- **URL**: https://apify.com/trusted_tech_spot/clinicaltrials-gov-research-studies-scraper.md
- **Developed by:** [David Sandor](https://apify.com/trusted_tech_spot) (community)
- **Categories:** Developer tools, AI, MCP servers
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-usage

## 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 Medical Studies & Clinical Trials Scraper 🩺🔬

[![Apify Actor](https://img.shields.io/badge/Apify-Actor-orange.svg?style=flat-square)](https://apify.com/trusted_tech_spot/clinicaltrials-gov-research-studies-scraper)
[![Pay Per Event](https://img.shields.io/badge/Pricing-Pay%20Per%20Result%20\($0.002\)-green.svg?style=flat-square)](https://apify.com/trusted_tech_spot/clinicaltrials-gov-research-studies-scraper)
[![Zero Maintenance](https://img.shields.io/badge/Maintenance-Zero%20Maintenance-blue.svg?style=flat-square)](https://apify.com/trusted_tech_spot/clinicaltrials-gov-research-studies-scraper)
[![RAG Ready](https://img.shields.io/badge/AI%20%2F%20RAG-Token%20Chunking%20Included-purple.svg?style=flat-square)](https://apify.com/trusted_tech_spot/clinicaltrials-gov-research-studies-scraper)
[![v3.0 Enriched](https://img.shields.io/badge/Data%20Enrichment-v3.0%20Enterprise%20\(20%2B%20Fields\)-success.svg?style=flat-square)](https://apify.com/trusted_tech_spot/clinicaltrials-gov-research-studies-scraper)

**The most comprehensive, reliable scraper for ClinicalTrials.gov API v2.** Instantly extract worldwide clinical trial protocols, experimental pharmaceuticals, medical devices, sponsor intelligence, eligibility criteria, investigator contacts, and multi-site locations across 480,000+ registered medical research studies.

***

> ⚡ **Instant Data Scraper Guarantee (No Setup Required)**:
>
> - 🟢 **Zero-Config**: No API keys, proxies, or account registrations needed. Queries the official ClinicalTrials.gov API v2 with automatic rate limiting and defensive fallbacks.
> - 🚀 **1-Click Free Test**: Just click the green **"Start"** button with the pre-filled inputs to test live medical trial extraction in < 3 seconds.
> - 📊 **Instant Multi-Format Export**: Download structured data directly into Microsoft Excel (.xlsx), CSV, JSON, or Google Sheets.
> - 🧠 **AI & RAG Ready**: Built-in OpenAI/cl100k token counting, semantic chunking, and metadata formatting for vector embeddings.

***

### 🔍 Key Data Fields Extracted

Every clinical trial record is normalized into structured, machine-readable JSON:

| Category | Extracted Data Attributes |
|:---|:---|
| **🆔 Study Identification** | NCT ID, Brief Public Title, Official Scientific Title, Acronym, Lead Sponsoring Organization, Collaborative Partners |
| **📈 Status & Timeline** | Recruitment Status (`RECRUITING`, `ACTIVE_NOT_RECRUITING`, `COMPLETED`), Study Duration, Start Date, Completion Dates |
| **🧪 Trial Design & Phase** | Development Phase (`PHASE1`, `PHASE2`, `PHASE3`, `PHASE4`, `NA`), Study Type (`INTERVENTIONAL`, `OBSERVATIONAL`), Allocation, Primary Purpose, Total Enrollment Count |
| **💊 Interventions & Regimens** | Modality Types (`DRUG`, `DEVICE`, `BIOLOGICAL`, `BEHAVIORAL`, `PROCEDURE`), Drug/Molecule Names, Administration Protocols |
| **📋 Patient Eligibility** | Minimum Age, Maximum Age, Sex/Gender, Healthy Volunteers Acceptance (`true`/`false`), Inclusion & Exclusion Criteria Summary |
| **📍 Sites & Investigator Contacts** | Medical Centers, Hospital Facilities, City, State, Country, Primary Investigator Contact Emails & Phone Numbers |
| **🧠 Derived Intelligence** | Recruitment Feasibility Score (0–100), Phase Progression Stage, Direct ClinicalTrials.gov Web URL, Data Quality Audit |

***

### 📋 Live Output Sample (JSON Preview)

```json
{
  "conditionOrTerm": "diabetes",
  "studyStatus": "RECRUITING",
  "studyPhase": "PHASE3",
  "totalFound": 3376,
  "returnedCount": 1,
  "studies": [
    {
      "nctId": "NCT04279457",
      "briefTitle": "Comparative Evaluation of Advanced Glycemic Control Therapeutics in Adults with Type 2 Diabetes",
      "officialTitle": "A Phase 3, Multi-Center, Double-Blind, Randomized Trial Evaluating Long-Term Metabolic Outcomes",
      "acronym": "GLYCO-OUTCOME",
      "leadSponsor": "Global Diabetes Research Network",
      "organization": "Academic Health Sciences Institute",
      "collaborators": [
        "National Metabolic Society",
        "Biomedical Research Foundation"
      ],
      "overallStatus": "RECRUITING",
      "studyPhase": "PHASE3",
      "studyType": "INTERVENTIONAL",
      "allocation": "RANDOMIZED",
      "primaryPurpose": "TREATMENT",
      "enrollmentCount": 1200,
      "conditions": [
        "Type 2 Diabetes Mellitus",
        "Diabetic Nephropathy"
      ],
      "interventionTypes": [
        "DRUG",
        "BEHAVIORAL"
      ],
      "interventions": [
        {
          "type": "DRUG",
          "name": "Investigational GLP-1 Receptor Agonist Formulation",
          "description": "Weekly subcutaneous injection"
        }
      ],
      "minimumAge": "18 Years",
      "maximumAge": "75 Years",
      "sex": "ALL",
      "healthyVolunteers": false,
      "inclusionCriteriaSummary": "Inclusion: Confirmed Type 2 Diabetes for >= 6 months, HbA1c between 7.5% and 10.5%, stable BMI. Exclusion: Prior acute coronary event within 6 months, eGFR < 30 mL/min.",
      "locations": [
        {
          "facility": "Brigham and Women's Hospital",
          "city": "Boston",
          "state": "Massachusetts",
          "country": "United States",
          "status": "RECRUITING"
        }
      ],
      "centralContacts": [
        {
          "name": "Clinical Operations Desk",
          "role": "Central Coordinator",
          "phone": "+1-617-555-0199",
          "email": "clinicaltrials@healthsystem.org"
        }
      ],
      "studyDuration": "3.0 Years (36 Months)",
      "recruitmentFeasibilityScore": 95,
      "phaseProgressionStage": "Late Stage Confirmatory Efficacy (Phase 3)",
      "url": "https://clinicaltrials.gov/study/NCT04279457",
      "_dataQualityScore": 100,
      "_deduplicationFingerprint": "9c12b7a8d506...",
      "_extractedAt": "2026-10-30T12:00:00.000Z"
    }
  ],
  "_rag": {
    "estimatedTokens": 480,
    "wordsCount": 350,
    "chunksCount": 2,
    "chunks": ["..."],
    "ingestionReady": true
  }
}
```

***

### 💡 High-Value Use Cases

#### 1. 🧬 Pharma & Biotech Competitive Intelligence

- Track competitors' clinical pipelines across therapeutic indications (Oncology, Immunology, Rare Diseases, Neurology).
- Monitor upcoming Phase 3 trials approaching estimated primary completion dates to predict FDA submission windows.
- Identify active pharmaceutical ingredients (APIs), monoclonal antibodies, mRNA vaccines, and cell therapies undergoing human trials.

#### 2. 🏥 Clinical Patient Recruitment & Trial Matching

- Power patient-facing portals or mobile apps matching eligible patients with actively recruiting clinical trials nearby.
- Filter criteria by age, gender, geographic state/country, and specific inclusion constraints.
- Direct patients and physicians straight to verified central investigator contact numbers and emails.

#### 3. 💼 Life Science Investment & Hedge Fund Due Diligence

- Detect clinical development milestone risks, study terminations, or suspended trials.
- Quantify trial enrollment sizes, participant progression, and randomized comparator designs.
- Track lead sponsors and clinical CRO partnerships to evaluate execution feasibility.

#### 4. 🤖 AI Knowledge Bases & Medical RAG Pipelines

- Ingest comprehensive trial protocols and inclusion criteria into vector databases (Pinecone, Qdrant, ChromaDB, Weaviate).
- Empower biomedical AI assistants, medical summarizers, and evidence-based clinical reasoning agents with real-time trial facts.

***

### ⚙️ Input Parameters

| Parameter | Type | Default | Description |
|:---|:---|:---|:---|
| `conditionOrTerm` | `String` | `"diabetes"` | Disease, condition, drug name, or keyword (e.g. `"breast cancer"`, `"pembrolizumab"`, `"Alzheimer"`, `"CAR-T"`). |
| `studyStatus` | `Select` | `"ALL"` | Recruitment status filter (`ALL`, `RECRUITING`, `ACTIVE_NOT_RECRUITING`, `COMPLETED`, `ENROLLING_BY_INVITATION`). |
| `studyPhase` | `Select` | `"ALL"` | Clinical trial phase (`ALL`, `PHASE1`, `PHASE2`, `PHASE3`, `PHASE4`, `NA`). |
| `maxResults` | `Integer` | `20` | Maximum number of studies to extract (1 to 100). |
| `includeKeywords` | `String` | `""` | Optional comma-separated keywords that study titles or conditions must include. |
| `excludeKeywords` | `String` | `""` | Optional comma-separated keywords to omit from results. |
| `enableRagEnrichment` | `Boolean` | `true` | Automatically generates token estimates and semantic RAG vector chunks. |
| `enrichmentMode` | `Select` | `"Enriched"` | `Enriched` (20+ derived fields), `Standard` (core clean fields), or `Basic` (fastest extract). |

***

### 🔌 API & Integration Examples

#### Node.js (Apify Client)

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

const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });

const run = await client.actor('trusted_tech_spot/clinicaltrials-gov-research-studies-scraper').call({
  conditionOrTerm: 'oncology',
  studyStatus: 'RECRUITING',
  studyPhase: 'PHASE3',
  maxResults: 25
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(`Extracted ${items[0]?.studies?.length || 0} Phase 3 recruiting trials!`);
```

#### Python (Apify Client)

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")

run = client.actor("trusted_tech_spot/clinicaltrials-gov-research-studies-scraper").call(run_input={
    "conditionOrTerm": "Alzheimer",
    "studyStatus": "RECRUITING",
    "studyPhase": "ALL",
    "maxResults": 15
})

dataset_items = client.dataset(run["defaultDatasetId"]).list_items().items
for study in dataset_items[0].get("studies", []):
    print(f"{study['nctId']}: {study['briefTitle']} (Score: {study['recruitmentFeasibilityScore']})")
```

#### cURL

```bash
curl --request POST \
  --url "https://api.apify.com/v2/acts/trusted_tech_spot~clinicaltrials-gov-research-studies-scraper/runs?token=YOUR_APIFY_TOKEN" \
  --header "Content-Type: application/json" \
  --data '{
    "conditionOrTerm": "immunotherapy",
    "studyStatus": "RECRUITING",
    "maxResults": 20
  }'
```

#### n8n & Make.com Automation

1. **Trigger**: Schedule weekly / daily trigger or receive inbound webhook from your CRM/database.
2. **Apify Node**: Select actor `clinicaltrials-gov-research-studies-scraper` and pass dynamic search terms.
3. **Action**: Automatically push newly discovered recruiting trials into Airtable, Notion, Slack channels, or your vector database.

***

### ✨ Enterprise Data Enrichment Included

Powered by the **v3.0 Universal Data Intelligence Engine**:

- **Recruitment Feasibility Scoring**: Statistical index gauging how rapidly a trial can enroll participants based on active sites, patient age restrictions, and volunteer criteria.
- **Trial Duration Calculation**: Computes exact duration in months and years from protocol start to completion dates.
- **Cryptographic Fingerprinting**: Unique SHA-256 record hashes guarantee idempotent database upserts.
- **Data Quality Audit**: Immediate completeness validation score (0–100%) ensures pristine downstream data hygiene.

***

### 💬 Support & Customization

- **Technical Questions**: contact@trustedtechspot.com
- **Custom Scraping & High-Volume Enterprise Ingestion**: Available upon request.
- **Rating**: ⭐ If you find this actor useful, please leave a 5-star review on Apify!

# Actor input Schema

## `conditionOrTerm` (type: `string`):

Enter medical condition (e.g. 'diabetes', 'breast cancer', 'Alzheimer'), drug name (e.g. 'semaglutide', 'pembrolizumab'), or search keyword

## `studyStatus` (type: `string`):

Filter clinical trials by recruitment status: ALL, RECRUITING, ACTIVE_NOT_RECRUITING, COMPLETED, ENROLLING_BY_INVITATION

## `studyPhase` (type: `string`):

Filter clinical trials by development phase: ALL, PHASE1, PHASE2, PHASE3, PHASE4, or NA

## `maxResults` (type: `integer`):

Maximum number of clinical trial studies to return (1-100)

## `includeKeywords` (type: `string`):

Filter results to only include trials containing these comma-separated keywords in titles or conditions

## `excludeKeywords` (type: `string`):

Filter out results containing these comma-separated keywords

## `enableRagEnrichment` (type: `boolean`):

Automatically compute OpenAI token counts and generate semantic vector chunks for RAG pipelines

## `enrichmentMode` (type: `string`):

Choose enrichment depth: 'Enriched' adds 20+ derived fields (quality score, contacts, feasibility score, sentiment polarity), 'Standard' includes core clean fields, 'Basic' is ultra-fast raw extract.

## Actor input object example

```json
{
  "conditionOrTerm": "diabetes",
  "studyStatus": "ALL",
  "studyPhase": "ALL",
  "maxResults": 20,
  "includeKeywords": "",
  "excludeKeywords": "",
  "enableRagEnrichment": true,
  "enrichmentMode": "Enriched"
}
```

# Actor output Schema

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

Structured clinical research studies, trial protocols, phases, and eligibility data from ClinicalTrials.gov

# 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 = {
    "conditionOrTerm": "diabetes",
    "studyStatus": "ALL",
    "studyPhase": "ALL",
    "maxResults": 20,
    "includeKeywords": "",
    "excludeKeywords": "",
    "enableRagEnrichment": true,
    "enrichmentMode": "Enriched"
};

// Run the Actor and wait for it to finish
const run = await client.actor("trusted_tech_spot/clinicaltrials-gov-research-studies-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 = {
    "conditionOrTerm": "diabetes",
    "studyStatus": "ALL",
    "studyPhase": "ALL",
    "maxResults": 20,
    "includeKeywords": "",
    "excludeKeywords": "",
    "enableRagEnrichment": True,
    "enrichmentMode": "Enriched",
}

# Run the Actor and wait for it to finish
run = client.actor("trusted_tech_spot/clinicaltrials-gov-research-studies-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 '{
  "conditionOrTerm": "diabetes",
  "studyStatus": "ALL",
  "studyPhase": "ALL",
  "maxResults": 20,
  "includeKeywords": "",
  "excludeKeywords": "",
  "enableRagEnrichment": true,
  "enrichmentMode": "Enriched"
}' |
apify call trusted_tech_spot/clinicaltrials-gov-research-studies-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,trusted_tech_spot/clinicaltrials-gov-research-studies-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/8affNMETUEgpflhgU/builds/M49ePqUFFPHOKTXjb/openapi.json
