ClinicalTrials.gov Scraper — Pharma Trials & Sponsors API
Pricing
from $3.50 / 1,000 clinical trial records
ClinicalTrials.gov Scraper — Pharma Trials & Sponsors API
Official ClinicalTrials.gov v2 API scraper extracting recruiting studies, Phase 1-4 drug pipelines, sponsors, conditions, enrollment & NCT IDs. Clean JSON for biotech intelligence & AI agents. No API key.
Pricing
from $3.50 / 1,000 clinical trial records
Rating
0.0
(0)
Developer
fall Rainy
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
14 hours ago
Last modified
Categories
Features
Share
Free Integration Kits: Download ready-to-use Google Sheets, Excel Power Query, Postman/Bruno, n8n CSV workflows, Python/JS SDKs & MCP configs in Open Data Kits · Prefer a direct REST API? Try ClinicalTrials.gov API on RapidAPI · Need 4-source cross-linked drug intelligence (ClinicalTrials + openFDA + ChEMBL + Europe PMC)? Check our Pharma and Biotech Pipeline Intelligence Actor!
Extract structured clinical study records from ClinicalTrials.gov — the world's largest registry of clinical trials — using the official REST API v2 (https://clinicaltrials.gov/api/v2/studies). No browser, no Playwright, no proxies required.
Overview
This Actor talks directly to the ClinicalTrials.gov REST API v2 and normalizes each study into a flat, 17-field record that is ready for analytics, enrichment, or retrieval-augmented generation (RAG) pipelines.
- Zero-Playwright, direct REST API v2 extraction — every run is a handful of plain HTTPS calls to
https://clinicaltrials.gov/api/v2/studies. No headless browser, no DOM parsing, no fingerprinting risk. - Fast — typical runs finish in sub-second to a few seconds, even when paging through results. Compute cost is negligible; you pay for the records you keep.
- Zero PII — the dataset contains institutional study metadata only (titles, sponsors, phases, conditions, countries, dates). No patient-level data, no investigator contact details, no personal information of any kind.
- US Government Public Domain — ClinicalTrials.gov content is published by the U.S. National Library of Medicine (NIH) and is in the public domain. Reuse it freely in commercial and non-commercial products.
- Normalized output — raw API responses are flattened into a stable, typed schema (
nctId,phases,enrollmentCount, …) so downstream code never has to walk nested protocol modules.
Input Parameters
All parameters are optional; an empty input returns the 10 most recently updated studies.
| Parameter | Type | Default | Description |
|---|---|---|---|
condition | string | — | Disease / condition search term (疾病 / 适应症关键词). Maps to the API query.cond field. Example: "type 2 diabetes" |
intervention | string | — | Drug, device, biologic or procedure name (干预措施关键词). Maps to query.intr. Example: "semaglutide" |
status | string | — | Overall recruitment status (招募状态). Accepts a single status enum string or empty "" for any status (NOT comma-separated): RECRUITING, NOT_YET_RECRUITING, ACTIVE_NOT_RECRUITING, COMPLETED, ENROLLING_BY_INVITATION, SUSPENDED, TERMINATED, WITHDRAWN, UNKNOWN. Example: "RECRUITING" |
sponsor | string | — | Lead sponsor / institution name (申办方 / 机构名称). Maps to query.spons. Example: "Novo Nordisk" |
queryTerm | string | — | Free-text search across the whole study record (全文关键词检索). Maps to query.term. Example: "GLP-1" |
maxItems | integer | 10 | Maximum number of study records to save to the dataset (最大抓取条数). Integer range 1 to 5000. |
Example input
{"condition": "type 2 diabetes","intervention": "semaglutide","status": "RECRUITING","sponsor": "Novo Nordisk","queryTerm": "GLP-1","maxItems": 25}
Output
Each run saves one dataset item per study, flattened into the following 17 normalized fields:
| Field | Type | Description |
|---|---|---|
nctId | string | Unique ClinicalTrials.gov identifier (NCT 编号), e.g. NCT05912345 |
briefTitle | string | Short public title (简短标题) |
officialTitle | string | null | Full official study title (正式标题) |
overallStatus | string | null | Current overall recruitment status (总体招募状态) |
phases | array[string] | Study phases, e.g. ["PHASE2", "PHASE3"] (试验分期) |
studyType | string | null | INTERVENTIONAL, OBSERVATIONAL, or EXPANDED_ACCESS (研究类型) |
conditions | array[string] | Conditions / diseases studied (适应症) |
interventions | array[string] | Intervention names (干预措施), e.g. ["Semaglutide", "Placebo"] |
sponsorName | string | null | Lead sponsor name (申办方名称) |
sponsorClass | string | null | Sponsor class, e.g. INDUSTRY, NIH, OTHER (申办方类型) |
enrollmentCount | integer | null | Target or actual enrollment (计划/实际入组人数) |
startDate | string | null | Study start date, YYYY-MM-DD (开始日期) |
primaryCompletionDate | string | null | Primary completion date, YYYY-MM-DD (主要完成日期) |
lastUpdatePostDate | string | null | Last update post date, YYYY-MM-DD (最后更新日期) |
locationsCountries | array[string] | Unique countries of study sites (试验国家/地区) |
studyUrl | string | Canonical record URL on ClinicalTrials.gov (官方详情页链接) |
attribution | string | Source & license string in the exact format "Source: ClinicalTrials.gov (U.S. National Library of Medicine, NIH) — US Government Public Domain, accessed YYYY-MM-DD (https://clinicaltrials.gov/study/NCT...)." |
Sample output item
{"nctId": "NCT05912345","briefTitle": "A Study of Semaglutide in Adults With Type 2 Diabetes","officialTitle": "A Randomised, Double-blind, Placebo-controlled Trial of Once-weekly Semaglutide in Adults With Type 2 Diabetes Mellitus","overallStatus": "RECRUITING","phases": ["PHASE2", "PHASE3"],"studyType": "INTERVENTIONAL","conditions": ["Type 2 Diabetes Mellitus"],"interventions": ["Semaglutide", "Placebo"],"sponsorName": "Novo Nordisk A/S","sponsorClass": "INDUSTRY","enrollmentCount": 480,"startDate": "2024-03-11","primaryCompletionDate": "2026-09-30","lastUpdatePostDate": "2025-01-17","locationsCountries": ["United States", "Denmark", "Japan"],"studyUrl": "https://clinicaltrials.gov/study/NCT05912345","attribution": "Source: ClinicalTrials.gov (U.S. National Library of Medicine, NIH) — US Government Public Domain, accessed 2025-01-17 (https://clinicaltrials.gov/study/NCT05912345)."}
Pricing — Pay-per-event (PPE)
This Actor uses Apify's pay-per-event model. You are charged only for what the run actually uses — there is no monthly rental.
| Event | Key | Price | Notes |
|---|---|---|---|
| Actor start | apify-actor-start | $0.00005 | Charged once per run; includes the first 5 seconds of compute |
| Saved clinical trial record | apify-default-dataset-item | $0.0035 per record | $3.50 per 1,000 records — charged per item pushed to the default dataset |
Cost examples
- 10 records →
$0.00005 + 10 × $0.0035= $0.03505 - 1,000 records →
$0.00005 + 1,000 × $0.0035= $3.50005 - 10,000 records → ≈ $35.00
Because extraction is pure REST API (no browser overhead), the compute portion stays inside the free 5 seconds for virtually every run — you essentially pay only for records.
MCP Quick Start
AI agents can call this Actor over the Apify MCP server at https://mcp.apify.com — no SDK, no custom integration.
1. Connect your client
{"mcpServers": {"apify": {"url": "https://mcp.apify.com","headers": {"Authorization": "Bearer <YOUR_APIFY_API_TOKEN>"}}}}
2. Let the agent invoke the Actor
The agent discovers the call-actor tool and passes the Actor ID plus a standard input object:
{"actorId": "YOUR_USERNAME/clinical-trials-scraper","input": {"condition": "melanoma","status": "RECRUITING","maxItems": 10}}
The tool returns the run ID and dataset ID; the agent can then read the normalized records straight from the dataset and cite each studyUrl.
Example prompts
- "Find recruiting melanoma trials sponsored by Merck and summarize the phases."
- "List the last 20 completed semaglutide studies with enrollment above 100."
- "Which countries host recruiting GLP-1 trials for type 2 diabetes?"
Source & Public Domain Attribution
Data is retrieved live from ClinicalTrials.gov, a service of the U.S. National Library of Medicine (NLM) at the National Institutes of Health (NIH).
- API endpoint:
https://clinicaltrials.gov/api/v2/studies - Content is a work of the U.S. Federal Government and is therefore in the public domain — no license restrictions on reuse.
- Every output record carries an
attributionfield identifying the source, so downstream consumers retain provenance automatically. - This Actor is an independent client of the public API and is not endorsed by or affiliated with NLM/NIH.
Verify locally
Run the bundled test suite (live API smoke test + unit tests):
$python tests/test_live_and_unit.py
Probe the live API from the client module:
$python src/client.py --probe
中文说明
ClinicalTrials.gov Scraper(美国临床试验数据库) 直接调用 ClinicalTrials.gov 官方 REST API v2(https://clinicaltrials.gov/api/v2/studies)抓取临床试验数据,完全不使用 Playwright 或无头浏览器,因此运行速度极快,通常在不到一秒到数秒内完成;成本极低。
数据特性
- 零个人隐私(Zero PII):仅包含机构级研究元数据,不包含任何患者、受试者或研究者个人信息。
- 美国政府公有领域数据:由美国国家医学图书馆(NLM)/ 美国国立卫生研究院(NIH)发布,属 Public Domain,可自由商用与二次分发。
输入参数:condition(适应症)、intervention(干预措施)、status(招募状态)、sponsor(申办方)、queryTerm(全文关键词)、maxItems(最大条数,默认 10)。
输出字段:共 17 个标准化字段,包括 nctId、briefTitle、officialTitle、overallStatus、phases、studyType、conditions、interventions、sponsorName、sponsorClass、enrollmentCount、startDate、primaryCompletionDate、lastUpdatePostDate、locationsCountries、studyUrl、attribution。
计费(按事件付费 PPE)
| 事件 | 价格 |
|---|---|
Actor 启动 apify-actor-start | $0.00005(含前 5 秒计算资源) |
每条保存的试验记录 apify-default-dataset-item | $0.0035 / 条(即 $3.50 / 1,000 条) |
智能体调用:通过 Apify MCP 服务器 https://mcp.apify.com,AI Agent 可直接以标准输入 JSON 调用本 Actor,读取数据集并引用 studyUrl 溯源。
本地验证:python tests/test_live_and_unit.py 运行测试,python src/client.py --probe 探测实时 API。