The Mine Works
ClinicalTrials Bulk Exporter: 575K Trials Filtered by Condition, Phase, and Status
← All posts
tutorial June 23, 2026 · 2 min read

ClinicalTrials Bulk Exporter: 575K Trials Filtered by Condition, Phase, and Status

Download structured records from ClinicalTrials.gov filtered by disease condition, trial phase, enrollment status, intervention type, or country. No API key required.

Try the scraper

The actor referenced in this article. Pay only for results delivered.

View the scraper →

ClinicalTrials.gov holds over 575,000 registered trials from 221 countries. The official API returns data in a format that requires multiple round-trips to navigate pagination and nested structures. Bulk downloads exist but arrive as a multi-gigabyte zip.

The ClinicalTrials Bulk Exporter filters the registry by condition, phase, status, intervention, or country and returns flat structured JSON you can load directly into a dataframe or database.

What you get per trial

Each record includes:

  • nct_id — ClinicalTrials.gov identifier
  • title — official study title
  • overall_status — RECRUITING, COMPLETED, TERMINATED, etc.
  • phase — Phase 1, 2, 3, 4, or N/A
  • start_date and completion_date
  • conditions — list of target conditions
  • interventions — drug names, device names, or behavioral interventions

Python example

import requests, time

run = requests.post(
    "https://api.apify.com/v2/acts/themineworks~clinicaltrials-bulk-exporter/runs",
    headers={"Authorization": f"Bearer {APIFY_TOKEN}"},
    json={
        "condition": "non-small cell lung cancer",
        "phase": "PHASE3",
        "status": "RECRUITING",
        "maxResults": 200
    }
)

run_id = run.json()["data"]["id"]

while True:
    r = requests.get(
        f"https://api.apify.com/v2/actor-runs/{run_id}",
        headers={"Authorization": f"Bearer {APIFY_TOKEN}"}
    )
    if r.json()["data"]["status"] in ("SUCCEEDED", "FAILED"):
        break
    time.sleep(5)

trials = requests.get(
    f"https://api.apify.com/v2/actor-runs/{run_id}/dataset/items",
    headers={"Authorization": f"Bearer {APIFY_TOKEN}"}
).json()

for t in trials:
    print(t["nct_id"], t["phase"], t["overall_status"])
    print("  ", t["title"])

Filter parameters

ParameterExampleNotes
condition"diabetes"Disease or condition keyword
intervention"semaglutide"Drug name or intervention type
status"RECRUITING"RECRUITING, COMPLETED, TERMINATED, WITHDRAWN
phase"PHASE3"PHASE1, PHASE2, PHASE3, PHASE4
country"IN"ISO 3166-1 alpha-2 country code
maxResults500Maximum records to return

All parameters are optional. Running with just maxResults returns the most recently updated trials regardless of condition or phase.

Load into pandas

import pandas as pd

df = pd.DataFrame(trials)
df["start_date"] = pd.to_datetime(df["start_date"], errors="coerce")

# Trials by phase
print(df.groupby("phase").size())

# Active recruiting trials
recruiting = df[df["overall_status"] == "RECRUITING"]
print(recruiting[["nct_id", "title", "start_date"]].head(20))

Use cases

Competitive intelligence. Map which companies are running trials in a given indication and at which phase.

Drug pipeline analysis. Filter by intervention name to trace all trials for a compound across phases and indications.

Academic research. Export the full COMPLETED cohort for a condition to analyze completion rates, timelines, and dropout patterns.

Market sizing. Count RECRUITING trials by country to assess where clinical activity is concentrated.

Pricing

$0.003 per trial. Empty runs are not charged.

Available on Apify.

Related Actor

Explore the scraper referenced in this article — see inputs, outputs, and pricing, then run it on Apify.