Better Fetch

ClinicalTrials.gov Study Scraper

Search ClinicalTrials.gov studies or fetch one exact NCT record through the public ClinicalTrials.gov v2 API, returning normalized trial metadata, status, sponsors, conditions, interventions, phases, enrollment, dates, eligibility, outcomes, and locations.

Researchv0.1.1~1 credit/runSource on GitHub

Overview

ClinicalTrials.gov Study Scraper gives agents a structured route into the official ClinicalTrials.gov v2 API. Search by condition, intervention, sponsor, location, or free-text term, filter by overall status or supported aggregate filters, or fetch a known NCT record directly. The tool normalizes the nested API response into compact trial rows with NCT IDs, study URLs, titles, current status, result availability, conditions, interventions, phases, study type, enrollment, sponsors, important dates, eligibility criteria, outcome measures, countries, and locations. It is designed for clinical-trial monitoring, pharma pipeline research, patient-recruitment discovery, competitive intelligence, medical literature triage, and research-agent workflows that need reliable public trial metadata without scraping the website.

Last validated: Jul 3, 2026

Playground

Search ClinicalTrials.gov studies or fetch one exact NCT record.

Sort expression for search mode.

General free-text search across ClinicalTrials.gov study fields.

Exact NCT identifier for study mode, e.g. NCT04280705.

Overall status filter. Use API enum values such as RECRUITING, COMPLETED, ACTIVE_NOT_RECRUITING, NOT_YET_RECRUITING, TERMINATED, or comma-separated values.

Sponsor or collaborator query, mapped to query.spons.

Location query such as Boston, Massachusetts or United States, mapped to query.locn.

Disease or condition query, mapped to query.cond.

Maximum studies to return in search mode.

ClinicalTrials.gov nextPageToken from a previous search response.

Optional raw ClinicalTrials.gov aggregate filter expression, e.g. phase:3 or studyType:int.

Drug, device, procedure, or other intervention query, mapped to query.intr.

Include compact facility/city/country location strings.

Include truncated eligibility criteria text when available.

Sign in to run this tool

~1 credit per run · runs against your account

Input

mode"search" | "study"default: "search"

Search ClinicalTrials.gov studies or fetch one exact NCT record.

sort"@relevance" | "LastUpdatePostDate:desc" | "StudyFirstPostDate:desc" | "StartDate:desc" | "EnrollmentCount:desc"default: "@relevance"

Sort expression for search mode.

querystring

General free-text search across ClinicalTrials.gov study fields.

nct_idstring

Exact NCT identifier for study mode, e.g. NCT04280705.

statusstring

Overall status filter. Use API enum values such as RECRUITING, COMPLETED, ACTIVE_NOT_RECRUITING, NOT_YET_RECRUITING, TERMINATED, or comma-separated values.

sponsorstring

Sponsor or collaborator query, mapped to query.spons.

locationstring

Location query such as Boston, Massachusetts or United States, mapped to query.locn.

conditionstring

Disease or condition query, mapped to query.cond.

page_sizeintegerdefault: 10

Maximum studies to return in search mode.

page_tokenstring

ClinicalTrials.gov nextPageToken from a previous search response.

agg_filtersstring

Optional raw ClinicalTrials.gov aggregate filter expression, e.g. phase:3 or studyType:int.

interventionstring

Drug, device, procedure, or other intervention query, mapped to query.intr.

include_locationsbooleandefault: true

Include compact facility/city/country location strings.

include_eligibilitybooleandefault: false

Include truncated eligibility criteria text when available.

Output

modestringrequired

Mode used for this run

countintegerrequired

Number of returned studies

querystring

Search query summary

nct_idstring

Exact NCT ID used

studiesobject[]required

Normalized ClinicalTrials.gov study records

source_urlstringrequired

ClinicalTrials.gov API URL fetched

total_matchesinteger

Total matches reported by ClinicalTrials.gov when requested

next_page_tokenstring

Token for the next search page

Examples

recruiting-diabetes

{
  "mode": "search",
  "status": "RECRUITING",
  "condition": "diabetes",
  "page_size": 2
}

actt-study

{
  "mode": "study",
  "nct_id": "NCT04280705",
  "include_eligibility": true
}

Use cases

Recruiting trial discovery

Find currently recruiting studies for a disease, intervention, sponsor, or location and return normalized trial rows for review.

Pharma pipeline monitoring

Track sponsor, condition, phase, enrollment, result availability, start dates, completion dates, and last update dates from official records.

Patient and site research

Collect eligibility snippets, contacts-ready study URLs, countries, and facility locations before deeper manual screening.

FAQ

Does ClinicalTrials.gov Study Scraper require an API key?

No. Version 0.1 uses the public ClinicalTrials.gov v2 API and keeps each run to one bounded request. Large exports should page through results politely with the returned next_page_token.

Can it filter by clinical-trial phase?

Yes, through the agg_filters input using ClinicalTrials.gov aggregate filter syntax, for example phase:3. The normalized output always includes the phase labels reported by each returned study.

Is this tool affiliated with ClinicalTrials.gov or NIH?

No. This Better Fetch tool uses public ClinicalTrials.gov API data and is not endorsed by or affiliated with ClinicalTrials.gov, NIH, NLM, or the U.S. government.

Use it anywhere

MCP (Claude, Cursor, any client)

# Add the Better Fetch MCP connector (or paste the URL into
# Claude → Settings → Connectors → Add custom connector):
claude mcp add --transport http better-fetch https://betterfetch.co/api/mcp \
  --header "Authorization: Bearer bf_your_key_here"

# Then ask for the tool by name: clinicaltrials_study_scraper

REST

curl -sS -X POST "https://betterfetch.co/api/tools/clinicaltrials_study_scraper/run" \
  -H "Authorization: Bearer bf_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{"input": {"mode":"search","status":"RECRUITING","condition":"diabetes","page_size":2}}'

Run locally

git clone https://github.com/better-fetch/tools/tree/main/tools/clinicaltrials-study-scraper && cd clinicaltrials-study-scraper && npm i
BETTER_FETCH_API_KEY=bf_your_key_here npx bf-tool run --input '{"mode":"search","status":"RECRUITING","condition":"diabetes","page_size":2}'