You need to agree to share your contact information to access this dataset
This repository is publicly accessible, but you have to accept the conditions to access its files and content.
This dataset is free for academic and non-commercial research use under
CC-BY-NC-4.0. By accessing it you agree to:
- Cite this dataset in any publication or derivative work.
- Not use the data for commercial purposes — including ML training data for
commercial models, redistribution as part of a commercial product/service,
incorporation into proprietary databases offered for sale, or quantitative
trading / commercial market analysis — without first obtaining a separate
commercial license.
For commercial licensing inquiries, contact bret.gaulin@gmail.com.
Log in or Sign Up to review the conditions and access this dataset content.
ClinicalTrials.gov Version History
A longitudinal, per-version snapshot of every protocol amendment ever submitted to ClinicalTrials.gov, normalized into a relational schema. Unlike most ClinicalTrials.gov mirrors that publish only the latest snapshot of each trial, this dataset preserves every version of every trial — making it suitable for event studies, change-tracking, and any analysis where the dynamics of protocol amendments matter.
What's in the core config
The core config is one row per (nct_id, nct_version) containing the scalar
fields from each trial's protocol-section snapshot. 4,333,631 rows covering
~583K trials across their full version histories from 1999 to today.
from datasets import load_dataset
ds = load_dataset("brbk/clinical_trials_history", "core")
print(ds["train"][0])
# {'nct_id': 'NCT00000125', 'nct_version': 0, 'overall_status': 'ACTIVE_NOT_RECRUITING', ...}
The dataset is sourced directly from ct_norm.nct_core — 96 protocol-section
scalar columns. The full column list is in the parquet schema, viewable via
the HuggingFace Datasets Viewer or ds.features.
Key columns
Trial identification and version:
| Column | Type | Description |
|---|---|---|
nct_id |
string | ClinicalTrials.gov identifier |
nct_version |
int32 | Per-trial version number, aligned 1:1 with CT.gov's 0-based version index. Sorting by (nct_id, nct_version) walks each trial's history chronologically. |
ct_gov_version |
int32 | Equals nct_version. Retained as a separate column for backward compatibility with consumers that switched on it during earlier schema versions. |
Status and design:
| Column | Type | Source |
|---|---|---|
overall_status |
string | statusModule.overallStatus |
why_stopped |
string | statusModule.whyStopped |
study_type |
string | designModule.studyType |
allocation |
string | designModule.designInfo.allocation |
intervention_model |
string | designModule.designInfo.interventionModel |
primary_purpose |
string | designModule.designInfo.primaryPurpose |
masking |
string | designModule.designInfo.maskingInfo.masking |
enrollment_count |
int32 | designModule.enrollmentInfo.count |
enrollment_type |
string | designModule.enrollmentInfo.type |
has_results |
bool | TRUE if this version exposes a resultsSection |
Sponsorship:
| Column | Type | Source |
|---|---|---|
lead_sponsor_name |
string | sponsorCollaboratorsModule.leadSponsor.name |
lead_sponsor_class |
string | INDUSTRY / FED / NIH / OTHER_GOV / NETWORK / AMBIG / OTHER / INDIV / UNKNOWN |
responsible_party_type |
string | sponsorCollaboratorsModule.responsibleParty.type |
organization_name |
string | identificationModule.organization.fullName |
organization_class |
string | identificationModule.organization.class |
Dates (read the Date Field Semantics section below):
| Column | Type | Description |
|---|---|---|
start_date |
date | Trial start; start_date_precision indicates day/month/year |
completion_date |
date | Overall completion |
primary_completion_date |
date | Primary endpoint completion |
study_first_submit_date |
date | First-ever submission to CT.gov (constant across versions) |
study_first_post_date |
date | First-ever public posting (constant across versions) |
last_update_submit_date |
date | Date THIS version was submitted by registrant |
last_update_post_date |
date | Date THIS version was posted publicly. Use this for event-study / public-visibility timing. |
last_update_post_date_type |
string | ACTUAL (precise) vs ESTIMATED (approximate, common pre-2018) |
The remaining ~70 columns cover titles, brief/detailed descriptions,
eligibility criteria, age ranges, design-info detail, results-disclosure
dates, IPD-sharing fields, and other protocol-section scalars. See
ds.features for the full list with parquet-native types.
How versions work
Every time a registrant amends a trial's protocol or status on
ClinicalTrials.gov, CT.gov assigns a new version. This dataset captures each
chronological version as its own row keyed on (nct_id, nct_version). The
nct_version index is 0-based and aligns directly with CT.gov's own version
numbering — nct_version=0 is the trial's first submission, and the highest
nct_version per trial is the latest amendment we've captured.
For each trial, sorting by nct_version produces the chronological version
sequence. No special filtering is needed.
Cumulative-history payload (
history.changes[],history.originalData.*, etc.) is not incore— it lives in a separate per-trial config (history_metadata) keyed onnct_id. See Planned future configs for the shape; the data is in our normalized pipeline but not yet published to HuggingFace.
Date Field Semantics
This is the most important thing to know about the dataset. Verified directly
against the CT.gov API on 2026-05-07 against NCT00000125:
last_update_post_dateis per-version, not stale. Each version's row carries the post date for that version, not a value carried forward from a prior version.last_update_submit_date≠last_update_post_date. Submit is when the registrant uploaded the change; post is when CT.gov published it. The gap ranges from 1 day (auto-estimated) to ~30 days (review queue). For event studies tied to market reactions,last_update_post_dateis what the public could see.last_update_post_date_typematters. Older versions (pre-~2018) carryESTIMATEDpost dates that are mechanical (often submit+1 day). Newer versions areACTUAL. TreatESTIMATEDas approximate when timing precision matters.
| Question | Field |
|---|---|
| When did the registrant submit this version? | last_update_submit_date |
| When did the public first see this version? | last_update_post_date |
| How precise is that post date? | last_update_post_date_type |
| When was the trial first registered? | study_first_post_date |
Why this exists
Existing public ClinicalTrials.gov datasets — including AACT, the OpenFDA mirror, and HuggingFace's flat snapshot mirrors — publish only the current state of each trial. Anything that requires historical version data (event studies on protocol amendments, longitudinal modeling of trial trajectories, change-frequency analyses) requires reconstructing the full version history from CT.gov's undocumented internal API.
This dataset publishes the reconstructed history directly. Companion configs (planned, see below) will publish the JSON Patch operations between versions and the leaf-level scalar changes they describe.
Example queries
Find all trials whose status changed within the last 30 days
import polars as pl
from datasets import load_dataset
ds = load_dataset("brbk/clinical_trials_history", "core", split="train")
df = pl.from_arrow(ds.data.table)
changes = (
df.sort(["nct_id", "nct_version"])
.with_columns(prev_status=pl.col("overall_status").shift().over("nct_id"))
.filter(
pl.col("overall_status") != pl.col("prev_status"),
pl.col("prev_status").is_not_null(),
pl.col("last_update_post_date") >= pl.date(2026, 4, 8),
)
.select("nct_id", "nct_version", "prev_status", "overall_status",
"last_update_post_date")
)
Completion-date pushes ("trial slipped")
slips = (
df.sort(["nct_id", "nct_version"])
.with_columns(prev_completion=pl.col("completion_date").shift().over("nct_id"))
.filter(pl.col("completion_date") > pl.col("prev_completion"))
.with_columns(slip_days=(pl.col("completion_date") - pl.col("prev_completion")).dt.total_days())
.select("nct_id", "nct_version", "prev_completion", "completion_date",
"slip_days", "last_update_post_date")
)
Update cadence
Refreshed weekly. Each refresh is committed to a Git tag (v2026.05.08,
v2026.05.15, ...) so consumers can pin to a specific snapshot:
ds = load_dataset("brbk/clinical_trials_history", "core",
revision="v2026.05.15")
The most recent commit on main is always the latest snapshot.
Changelog
v2026.05.15 — schema simplification (core config)
- Removed
nct_version = -1rows. These were a transitional artifact of an earlier "ended-trial snapshot" pattern. The cumulative-history data those rows carried (history.changes[],history.originalData.*,history.lastUpdateVersions.*,history.outcomesUpdateCount) is captured in our normalized pipeline on a per-trial basis and will be published as a separatehistory_metadataconfig — see Planned future configs. - Removed
is_ended_snapshotcolumn. It existed solely to discriminate the-1rows from the per-version rows. With-1rows gone, the column is meaningless. - Row count: 4,699,547 → 4,333,631 (-368,751 reflecting the removal of
one
-1row per ended trial). The per-version data for each trial is unchanged; only the synthetic sentinel rows were dropped. - No filter change required. Code that previously used
WHERE nct_version >= 0to exclude the sentinel rows continues to work unchanged (it's now a no-op filter). Code that relied onnct_version = -1rows directly will need to migrate to thehistory_metadataconfig when it ships.
v2026.05.08 — initial release
First public release. 4,699,547 rows across core config; per-version
protocol snapshots plus -1 ended-trial sentinel rows. Pin to this revision
for reproducibility of analyses written before the v2026.05.15 schema
simplification.
Planned future configs
Same dataset URL, joined either on nct_id (per-trial configs) or
(nct_id, nct_version) (per-version configs) — these will be added as
additional configs without disrupting core:
| Config | Grain | Source | Join key |
|---|---|---|---|
history_metadata |
One row per trial (cumulative metadata) | ct_norm.nct_history_metadata — originalData.*, lastUpdateVersions.*, outcomesUpdateCount. 583,902 rows. Covers every trial (active and ended). |
nct_id |
version_history |
One row per CT.gov version-change event | ct_norm.nct_version_history — history.changes[] (change_date, status, study_type, module_labels). 4.3M rows. |
nct_id, ct_gov_version |
history_original_outcomes |
One row per outcome arm, first-submitted state | ct_norm.nct_history_original_{primary,secondary,other}_outcomes — originalData.{primary,secondary,other}Outcomes[] |
nct_id, ord |
version_patches |
One row per JSON Patch op per version transition | ct_norm.nct_version_patches (RFC 6902 ops) |
nct_id, from_version, to_version, op, path |
patch_scalar_values |
One row per leaf scalar change | ct_norm.nct_patch_scalar_values (typed values: value_str/value_num/value_bool) |
nct_id, from_version, path |
interventions |
One row per (nct_id, nct_version, intervention) |
ct_norm.nct_interventions |
nct_id, nct_version, intervention_id |
outcomes |
One row per primary/secondary outcome per version | ct_norm.nct_primary_outcomes, nct_secondary_outcomes |
nct_id, nct_version, ord |
eligibility |
Per-version eligibility text + structured age/sex fields | ct_norm.nct_core (eligibility subset) |
nct_id, nct_version |
locations |
Per-version trial site locations | ct_norm.nct_locations |
nct_id, nct_version, ord |
sponsors |
Per-version lead sponsor + collaborator rows | ct_norm.nct_collaborators |
nct_id, nct_version, name |
results |
Outcome measurements + adverse events for trials with results | ct_norm.nct_results_* family |
varies by sub-table |
The first three rows above (history_metadata, version_history,
history_original_outcomes) are the per-trial cumulative-history configs
introduced as a replacement for the -1 sentinel rows removed in
v2026.05.15. The underlying tables are populated for every trial in our
normalized pipeline (active and ended alike) — a coverage improvement of
~215K trials over the prior sentinel-only state.
The core config will not break — additive changes only (new columns may
appear; no renames or type changes within the published schema). Breaking
changes will be announced and gated behind a major version bump.
Source
Constructed from the ClinicalTrials.gov internal History API
(/api/int/studies/{NCT}?history=true and
/api/int/studies/{NCT}/history/{version}). Note that this is an
undocumented internal endpoint; the public API v2
(/api/v2/studies/{NCT}?history=true) does not return version history.
License
This derivative dataset is published under CC-BY-NC-4.0 (Creative Commons Attribution-NonCommercial 4.0).
You may — for non-commercial purposes — use, copy, redistribute, and build derivative works from this dataset, with attribution.
You may not — without obtaining a separate commercial license — use this dataset, or any derivative of it, for purposes "primarily intended for or directed toward commercial advantage or monetary compensation" (CC-BY-NC's own language). This includes: redistributing it as part of a commercial product or service, using it as training data for commercial machine-learning models, incorporating it into proprietary databases offered for sale, or using it for quantitative trading or commercial market analysis.
For commercial licensing inquiries, contact bret.gaulin@gmail.com.
About the underlying data
The underlying ClinicalTrials.gov data is a U.S. Government work in the public domain — the license here covers the derivative work: the normalization pipeline, version-tracking schema, JSON Patch decomposition, and documentation. Anyone is free to re-derive equivalent data from ClinicalTrials.gov directly and license it however they wish; the NC restriction applies to this particular derivative, not to the raw facts.
Citation
If you use this dataset in research, please cite:
@misc{clinicaltrials_history_2026,
title = {ClinicalTrials.gov Version History: A longitudinal mirror},
author = {Bret Gaulin},
year = {2026},
url = {https://huggingface.co/datasets/brbk/clinical_trials_history}
}
Acknowledgments
ClinicalTrials.gov is operated by the National Library of Medicine at the National Institutes of Health. Schema design references the AACT (Aggregate Analysis of ClinicalTrials.gov) project from the Clinical Trials Transformation Initiative.
- Downloads last month
- 74