Clinical Trials Dataset in CSV: ClinicalTrials.gov Downloads, the API, and Linking to FDA Approvals
Published 2026-08-04 · DataForge team
ClinicalTrials.gov registers essentially every serious interventional study on earth — sponsors, conditions, interventions, phases, enrollment, outcomes. It’s free, public, and the API is actually good. So why does “clinical trials dataset csv” remain such a common search? Because the registry gives you records, not a research-ready table: nested JSON, free-text sponsor names, and — for the questions pharma analysts care most about — no link to what happened after the trial: did the drug get approved? This guide covers the free routes and the joins that make the data valuable.
Getting the raw data
ClinicalTrials.gov API v2. Modern REST, JSON, no key required:
import requests
import pandas as pd
rows, token = [], None
while True:
params = {
"query.cond": "melanoma",
"filter.overallStatus": "RECRUITING",
"pageSize": 1000,
"fields": "NCTId,BriefTitle,Phase,LeadSponsorName,EnrollmentCount,StartDate,OverallStatus",
}
if token:
params["pageToken"] = token
js = requests.get("https://clinicaltrials.gov/api/v2/studies", params=params).json()
for s in js["studies"]:
p = s["protocolSection"]
rows.append(
{
"nct_id": p["identificationModule"]["nctId"],
"title": p["identificationModule"]["briefTitle"],
"phase": (p.get("designModule", {}).get("phases") or [None])[0],
"sponsor": p["sponsorCollaboratorsModule"]["leadSponsor"]["name"],
}
)
token = js.get("nextPageToken")
if not token:
break
pd.DataFrame(rows).to_csv("melanoma_trials.csv", index=False)
For the entire registry (~540k+ studies) the API supports full pagination, and bulk JSON downloads exist. Budget for the nested-JSON flattening: a study record has 20+ modules, repeating groups for arms, outcomes, locations and IDs.
Other registries. EU CTR/CTIS (European trials), WHO ICTRP (global aggregation). Cross-registry deduplication is its own project — the same trial registers in multiple places with different IDs.
FDA sources. Drugs@FDA (approval history, CSV zip), the NDC directory (marketed products), and the Orange Book (patents/exclusivity). All free downloads, all keyed differently.
The joins that create the value
Raw trials answer “what studies exist for condition X”. The commercial questions — which sponsors’ pipelines convert to approvals? what’s the average phase-3-to-approval lag by therapeutic area? which approved drugs’ exclusivity expires next year, and what trials threaten them? — require joining trials to regulatory outcomes. That join is genuinely hard:
- No shared key. Trials key on NCT ID; Drugs@FDA keys on application numbers; the link runs through drug names — brand vs generic vs research codes (“MK-3475” → pembrolizumab → Keytruda).
- Sponsor name mess. “Merck Sharp & Dohme LLC”, “MSD”, “Merck & Co., Inc.” — subsidiary and alias resolution again.
- Date semantics. Approval dates in Drugs@FDA are per-application-supplement; picking “the” approval date needs a documented convention.
Our M-tier pack does this work: 1,058,262 rows linking 635,666 registered trials to Drugs@FDA approvals, NDC products and Orange Book patent/exclusivity records, with normalized sponsor names. Once it’s tabular:
-- Sponsors with the most phase-3 oncology trials that reached FDA approval
SELECT t.sponsor_norm,
COUNT(DISTINCT t.nct_id) AS p3_trials,
COUNT(DISTINCT a.appl_no) AS linked_approvals
FROM trials t
LEFT JOIN trial_drug_links l USING (nct_id)
LEFT JOIN fda_approvals a USING (appl_no)
WHERE t.phase = 'PHASE3'
AND t.condition_area = 'oncology'
GROUP BY t.sponsor_norm
ORDER BY linked_approvals DESC
LIMIT 20;
Fields that matter more than they look
A few registry fields punch far above their weight once you know how analysts read them. whyStopped (free text on terminated trials) is the closest thing to a public post-mortem: “lack of efficacy” vs “enrollment difficulties” vs “business decision” are completely different investment signals for the sponsor’s pipeline. primaryCompletionDate vs completionDate — the former is when primary-endpoint data collection ends, i.e. the earliest plausible readout window; equity analysts build catalyst calendars from the gap between the two and the study’s last-update date. enrollmentType (ACTUAL vs ESTIMATED) tells you whether the enrollment number is a plan or a fact; comparing estimated-at-registration against actual-at-completion per sponsor measures chronic over-optimism, which itself predicts timeline slippage. leadSponsorClass (INDUSTRY, NIH, OTHER) is the cleanest first-cut segmentation — industry trials behave differently on every metric, from registration timeliness to results reporting.
And one field to distrust: overallStatus. Registry updates lag reality — sponsors are required to update within 30 days of status changes, but enforcement is soft, and “Recruiting” studies that quietly died are common. Cross-check against lastUpdatePostDate: a “Recruiting” study untouched for two years is a zombie, and any pipeline analysis that counts zombies overstates activity. Our flattened table carries all of these fields with consistent naming so the hygiene checks are one WHERE clause, not a JSON path expedition.
What people build with this
- Pipeline intelligence. Biotech BD and competitive-intelligence teams track competitor trials by phase, indication and expected readout windows.
- Investment research. Trial starts, enrollments and terminations are public leading indicators for biotech equities.
- Site selection and feasibility. CROs analyze where trials for an indication actually recruit.
- Patent-cliff analysis. Orange Book exclusivity + trial activity = generics/biosimilar timing.
- Meta-research. Publication bias, completion rates, enrollment realism — a whole academic field runs on this registry.
One more practical note on scale: the full registry flattened lands around a few GB as Parquet, which means the right tooling is DuckDB or Polars on a laptop, not a cluster and not raw pandas over JSON. A sensible layout is one wide trials table plus narrow child tables (conditions, interventions, locations, sponsors) keyed on NCT ID — mirroring the registry’s module structure but relational. If you’re building this yourself, resist the urge to denormalize everything into one table: the repeating groups (a trial can have 40 sites and 6 conditions) explode row counts and make every count query subtly wrong. This schema decision, made early, is the difference between a corpus you trust and one you keep re-deriving.
Free sources vs. the linked dataset
| Free official sources | DataForge dataset | |
|---|---|---|
| Cost | Free | From $299 |
| Trials | Full registry, nested JSON | 635,666 trials, flattened analysis-ready table |
| FDA link | None — DIY name matching | Trials↔Drugs@FDA↔NDC↔Orange Book linked (1.06M rows, M tier) |
| Sponsors | Free text | Normalized sponsor names |
| Format | JSON/API | CSV/Parquet, data dictionary + QA report |
Honest guidance: for a single condition or a class project, the API snippet above genuinely suffices — ClinicalTrials.gov is one of the best free health data sources anywhere. The dataset earns its keep on the regulatory join and the flattening, which together are weeks of specialist work. Preview the free 500-row sample.
FAQ
Is this patient data? No. Registry records describe studies (protocol metadata, aggregate enrollment), not individual participants. Patient-level data is never public.
Legal for commercial use? Yes — ClinicalTrials.gov and FDA data are US government public information.
How fresh? The registry updates continuously; our editions are dated snapshots (current: 2026-08). For daily monitoring of a handful of trials, use the API alongside the dataset.
How do I build a catalyst calendar from this data? The standard biotech-analyst workflow: filter to industry-sponsored phase 2/3 trials for the companies or indications you cover; take primaryCompletionDate as the earliest plausible data-readout anchor; adjust for the sponsor’s historical slippage (compare originally-posted vs final completion dates across their past trials — chronic optimists are identifiable); then watch for the tell-tale registry activity that precedes announcements — status flips to “Active, not recruiting”, enrollment numbers switching from estimated to actual, and results sections appearing. None of this requires paid pharma-intelligence platforms; it requires the registry history flattened into queryable tables, which is exactly the transformation this guide describes.
What’s the difference between registered trials and results reporting? Registration (protocol metadata, before/at study start) and results submission (outcome data, due within a year of completion for applicable trials) are separate obligations, and compliance with the second is famously incomplete — a substantial fraction of applicable trials report late or never, an ongoing policy controversy. Practically: presence in the registry is near-complete for serious interventional studies; presence of results is not, and outcome analyses must handle that missingness explicitly or inherit its bias.
Can I use this data to find trial sites or investigators? Yes — the locations module lists every recruiting site with facility, city and status, and the officials module lists investigators. CROs mine exactly this for feasibility (which sites run oncology trials with which sponsors), and site-selection consultancies exist on the margin between this free data and clean tables of it. Names are messy free text — the usual normalization story — but the information is all there.
What formats do the packages ship in? CSV and Parquet with a full data dictionary, datasheet and QA report. The trials table loads directly into DuckDB/Polars/pandas; child tables (conditions, interventions, sponsors) key on NCT ID for straightforward joins.
Do you cover EU/WHO registries? The current product centers on ClinicalTrials.gov (which includes most global industry trials) plus EU registry rows in the trials table; the datasheet details per-source coverage.