If you're in biotech, pharma, or health research — you need this API.
ClinicalTrials.gov has a free API (v2) that lets you search 500,000+ clinical trials worldwide. No API key needed.
I built a Python toolkit around it.
Quick Search
import requests
resp = requests.get('https://clinicaltrials.gov/api/v2/studies', params={
'query.term': 'cancer immunotherapy',
'filter.overallStatus': 'RECRUITING',
'pageSize': 5,
'format': 'json'
})
for study in resp.json().get('studies', []):
p = study['protocolSection']
nct = p['identificationModule']['nctId']
title = p['identificationModule']['briefTitle']
status = p['statusModule']['overallStatus']
print(f'[{nct}] {title} — {status}')
Output:
[NCT05847283] CAR-T Cell Therapy for Solid Tumors — RECRUITING
[NCT06123456] Pembrolizumab + Novel Agent Phase 3 — RECRUITING
...
Use Cases
- Researchers: Find trials in your area, build meta-analysis datasets
- Investors: Monitor biotech company pipelines
- Patients: Find recruiting trials near you
- Journalists: Track drug development progress
Search by Sponsor
# What is Pfizer testing right now?
resp = requests.get('https://clinicaltrials.gov/api/v2/studies', params={
'query.sponsor': 'Pfizer',
'filter.overallStatus': 'RECRUITING',
'pageSize': 5,
'format': 'json'
})
for s in resp.json().get('studies', []):
print(s['protocolSection']['identificationModule']['briefTitle'])
Export to CSV
import csv
def export_trials(query, filename='trials.csv'):
resp = requests.get('https://clinicaltrials.gov/api/v2/studies', params={
'query.term': query, 'pageSize': 100, 'format': 'json'
})
with open(filename, 'w', newline='') as f:
writer = csv.writer(f)
writer.writerow(['NCT ID', 'Title', 'Status', 'Phase'])
for s in resp.json().get('studies', []):
p = s['protocolSection']
writer.writerow([
p['identificationModule']['nctId'],
p['identificationModule']['briefTitle'],
p['statusModule']['overallStatus'],
', '.join(p.get('designModule', {}).get('phases', []))
])
export_trials('Alzheimer')
Full Toolkit
I built a complete toolkit with CLI support:
python search_trials.py 'diabetes' --status RECRUITING --format csv --output trials.csv
👉 GitHub: clinicaltrials-research-toolkit
Part of My Research API Suite
This is one of 9 free research API toolkits I've built:
- OpenAlex — 250M+ academic works
- PubMed — 36M+ medical papers
- Semantic Scholar — AI paper summaries
- Crossref — 150M+ scholarly articles
- Full collection
What Would You Search For?
Drop a comment — what clinical trial data would be useful for your work?
Need custom data extraction? Check my Apify actors for web scraping tools.
Top comments (0)