ClinicalTrials.gov API: Search clinical trials
Finds ClinicalTrials.gov studies for a condition or medicine. You can filter by location, distance, recruitment status and phase. With a location, results are ordered by distance to the closest eligible site.
Unofficial. Not affiliated with or endorsed by ClinicalTrials.gov.
Inputs
Values from the run on Oct 23, 2026, shown under Output.
- Phase optional
phase Study phase, for example phase_3 or any.
phase_3
One of
any,early_phase_1,phase_1,phase_2,phase_3,phase_4. Defaultany.- Location optional
location City, state, or country for nearby trials, for example Boston, MA.
Boston, MA
Default
.- Condition, required
condition Condition or medicine to search, for example breast cancer or semaglutide.
breast cancer
- Max Results optional
max_results Maximum number of trials to return (up to 100).
5
Whole number from 1 to 100. Default
20.- Distance (miles) optional
distance_miles Search radius in miles when a location is given, for example 50.
50
Number 0.1 or more. Default
50.- Recruiting Only optional
recruiting_only Include only studies that are recruiting or preparing to recruit.
true
True or false. Default
true.
Input as JSON
{ "phase": "phase_3", "location": "Boston, MA", "condition": "breast cancer", "max_results": 5, "distance_miles": 50, "recruiting_only": true}Output
{ "trials": [ { "sex": "All", "phase": "Phase 3", "status": "Recruiting", "sponsor": "Hoffmann-La Roche", "age_range": "18 Years and older", "conditions": [ "Breast Cancer" ], "start_date": "2023-06-07", "trial_link": "https://clinicaltrials.gov/study/NCT05646862" , "trial_title": "A Study Evaluating the Efficacy and Safety of Inavolisib Plus Fulvestrant Compared With Alpelisib Plus Fulvestrant in Participants With HR-Positive, HER2-Negative, PIK3CA Mutated, Locally Advanced or Metastatic Breast Cancer Post CDK4/6i and Endocrine Combination Therapy" , "contact_name": "Reference Study ID Number: WO43919 https://forpatients.roche.com/ No attachments to email below" , "trial_number": "NCT05646862", "contact_email": "global-roche-genentech-trials@gene.com", "contact_phone": "888-662-6728 (U.S. and Canada)", "distance_miles": 0.1, "nearest_site_city": "Boston", "healthy_volunteers": false, "nearest_site_state": "Massachusetts", "nearest_site_country": "United States", "nearest_site_facility": "Massachusetts General Hospital" }, { "sex": "All", "phase": "Phase 3", "status": "Recruiting", "sponsor": "ECOG-ACRIN Cancer Research Group", "age_range": "18 Years and older", "conditions": [ "Plasma Cell Myeloma", "RISS Stage I Plasma Cell Myeloma", "RISS Stage II Plasma Cell Myeloma" ], "start_date": "2021-02-24", "trial_link": "https://clinicaltrials.gov/study/NCT04566328" , "trial_title": "Testing the Use of Combination Therapy in Adult Patients With Newly Diagnosed Multiple Myeloma, the EQUATE Trial", "contact_name": "Site Public Contact", "trial_number": "NCT04566328", "contact_email": "ContactUsCancerCenter@TuftsMedicalCenter.org", "contact_phone": "617-636-5000", "distance_miles": 0.1, "nearest_site_city": "Boston", "healthy_volunteers": false, "nearest_site_state": "Massachusetts", "nearest_site_country": "United States", "nearest_site_facility": "Tufts Medical Center" }, { "sex": "All", "phase": "Phase 3", "status": "Recruiting", "sponsor": "NRG Oncology", "age_range": "18 Years and older", "conditions": [ "Muscle Invasive Bladder Urothelial Carcinoma", "Stage II Bladder Cancer AJCC v8", "Stage IIIA Bladder Cancer AJCC v8" ], "start_date": "2025-10-07", "trial_link": "https://clinicaltrials.gov/study/NCT07097142" , "trial_title": "Testing Shorter Duration Radiation Therapy Versus the Usual Radiation Therapy in Patients Receiving the Usual Chemotherapy Treatment for Bladder Cancer, ARCHER Study", "contact_name": "Site Public Contact", "trial_number": "NCT07097142", "contact_email": null, "contact_phone": "877-726-5130", "distance_miles": 0.1, "nearest_site_city": "Boston", "healthy_volunteers": false, "nearest_site_state": "Massachusetts", "nearest_site_country": "United States", "nearest_site_facility": "Massachusetts General Hospital Cancer Center" } ]}Code
curl https://api.fous.com/v1/runs \ -H "Authorization: Bearer $FOUS_API_KEY" \ -H "Content-Type: application/json" \ -d '{"method":"clinicaltrials.gov/search_trials","input":{"phase":"phase_3","location":"Boston, MA","condition":"breast cancer","max_results":5,"distance_miles":50,"recruiting_only":true}}' # Save as fous.py, then run: python3 fous.pyimport json, os, timefrom urllib.error import HTTPErrorfrom urllib.request import Request, urlopenAPI = "https://api.fous.com/v1/runs" KEY = os.environ["FOUS_API_KEY"]HEADERS = { "Authorization": f"Bearer {KEY}", "Content-Type": "application/json" ,}def call(url, body=None): data = json.dumps(body).encode() if body else None request = Request(url, data, HEADERS) try: with urlopen(request, timeout=120) as r: return r.status, json.load(r) except HTTPError as error: message = json.load(error)["error"]["message"] raise RuntimeError(message) from errorstatus, run = call(API, { "method": "clinicaltrials.gov/search_trials" , "input": { "phase": "phase_3", "location": "Boston, MA", "condition": "breast cancer", "max_results": 5, "distance_miles": 50, "recruiting_only": True }})# 202: still going after 30 s. Ask again until it ends.while status == 202: time.sleep(2) status, run = call(f"{API}/{run['id']}")print(json.dumps(run["data"], indent=2))// Save as fous.mjs, then run: node fous.mjsconst api = "https://api.fous.com/v1/runs" ;const headers = { Authorization: `Bearer ${process.env.FOUS_API_KEY}`, "Content-Type": "application/json" ,};let response = await fetch(api, { method: "POST", headers, body: JSON.stringify({ "method": "clinicaltrials.gov/search_trials" , "input": { "phase": "phase_3", "location": "Boston, MA", "condition": "breast cancer", "max_results": 5, "distance_miles": 50, "recruiting_only": true } }), signal: AbortSignal.timeout(120_000),});let run = await response.json();// 202: still going after 30 s. Ask again until it ends.while (response.status === 202) { await new Promise((done) => setTimeout(done, 2_000)); response = await fetch(`${api}/${run.id}`, { headers }); run = await response.json();}if (!response.ok) throw new Error(run.error.message);console.log(run.data);# Connect your agent to Fous once, over MCP (Streamable HTTP):# https://api.fous.com/mcp# Set FOUS_API_KEY first: create a key at https://app.fous.com/keys.# Claude Codeclaude mcp add \ --scope user \ --transport http fous https://api.fous.com/mcp \ --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"# Codexcodex mcp add fous \ --url https://api.fous.com/mcp \ --bearer-token-env-var FOUS_API_KEY# Cursor, VS Code, Windsurf, Cline and morenpx -y add-mcp https://api.fous.com/mcp -g -n fous \ --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"# Then ask your agent:# "Use Fous to run clinicaltrials.gov/search_trials# with {"phase":"phase_3","location":"Boston, MA","condition":"breast cancer","max_results":5,"distance_miles":50,"recruiting_only":true}"Over HTTP, the answer’s data holds the output. A run still going after 30 seconds answers 202 with its id: ask GET /v1/runs/{id} until it ends.
Schema
Input schema
{ "type": "object", "required": [ "condition" ], "properties": { "phase": { "enum": [ "any", "early_phase_1", "phase_1", "phase_2", "phase_3", "phase_4" ], "type": "string", "default": "any", "description": "Study phase, for example phase_3 or any." }, "location": { "type": "string", "default": "", "description": "City, state, or country for nearby trials, for example Boston, MA." }, "condition": { "type": "string", "minLength": 1, "description": "Condition or medicine to search, for example breast cancer or semaglutide." }, "max_results": { "type": "integer", "default": 20, "maximum": 100, "minimum": 1, "description": "Maximum number of trials to return (up to 100)." }, "distance_miles": { "type": "number", "default": 50, "minimum": 0.1, "description": "Search radius in miles when a location is given, for example 50." }, "recruiting_only": { "type": "boolean", "default": true, "description": "Include only studies that are recruiting or preparing to recruit." } }}Output schema
{ "type": "object", "required": [ "trials" ], "properties": { "trials": { "type": "array", "items": { "type": "object", "properties": { "sex": { "type": [ "string", "null" ] }, "phase": { "type": [ "string", "null" ] }, "status": { "type": [ "string", "null" ] }, "sponsor": { "type": [ "string", "null" ] }, "age_range": { "type": [ "string", "null" ] }, "conditions": { "type": "array", "items": { "type": "string" } }, "start_date": { "type": [ "string", "null" ] }, "trial_link": { "type": "string" }, "trial_title": { "type": [ "string", "null" ] }, "contact_name": { "type": [ "string", "null" ] }, "trial_number": { "type": "string" }, "contact_email": { "type": [ "string", "null" ] }, "contact_phone": { "type": [ "string", "null" ] }, "distance_miles": { "type": [ "number", "null" ] }, "nearest_site_city": { "type": [ "string", "null" ] }, "healthy_volunteers": { "type": [ "boolean", "null" ] }, "nearest_site_state": { "type": [ "string", "null" ] }, "nearest_site_country": { "type": [ "string", "null" ] }, "nearest_site_facility": { "type": [ "string", "null" ] } } } } }}- Price
- 1 credit per completed run (1¢ with pay as you go); failed runs are free.
- Method
clinicaltrials.gov/search_trials- Returns
- trial title, status, phase, sponsor, conditions, nearest site, distance, eligibility, contact, trial number, start date, link
Use it from your agent
Give your agent this line. It reads SKILL.md, gets a Fous API key and connects the Fous MCP server. Its run then takes the method clinicaltrials.gov/search_trials with the inputs above.
Ask your agent
- Find recruiting phase 3 trials for type 2 diabetes near Chicago, IL within 30 miles
- Are there any open phase 2 studies testing pembrolizumab for lung cancer?
- Show me early phase 1 trials for Alzheimer's disease in Austin, TX, sorted by closest site
- I need phase 4 studies on semaglutide for obesity that are still enrolling, within 100 miles of Denver
- List trials for asthma in Toronto, Canada, including eligibility and contact details, limited to 10 results
See more
All ClinicalTrials.gov methodsLists ClinicalTrials.gov studies run or funded by a sponsor, newest start date first, with optional phase, status and condition filters.
clinicaltrials.gov/list_company_trialsReturns the full public record of a ClinicalTrials.gov study, looked up by NCT number or by title (closest registered title for ambiguous titles).
clinicaltrials.gov/get_trialFinds PubMed medical and life-science articles by topic, with publication details and free full-text links when PubMed confirms them.
pubmed.ncbi.nlm.nih.gov/search_articlesFinds FDA drug enforcement recalls by medicine or company name, newest first, with status, class, reason and quantity. Recent recalls may not yet appear.
open.fda.gov/search_drug_recallsFinds NIH research grants by topic, organisation, or researcher name. Searches the last five fiscal years by default.
reporter.nih.gov/search_grantsFinds U.S. federal grant opportunities by topic, agency, applicant type and status, with funding and eligibility details. Open results exclude opportunities whose closing date has passed.
grants.gov/search_grantsFinds FDA medical device recalls whose product description or recalling company matches a phrase, newest first, with the recall class and its health-risk meaning from each FDA recall page. An optional start date limits recalls to those initiated on or after it.
fda.gov/search_device_recallsFinds U.S. hospitals by name, city and state, or ZIP code, with Medicare overall and patient survey star ratings, contact details, and Care Compare links. Ratings may be unavailable for some hospitals.
medicare.gov/search_hospitals