wentorai/research-plugins/clinicaltrials-api-v2
Claude Code and agent skill by wentorai/research-plugins
- community
Checking that the SKILL.md file is still in the repository.
Search and analyze clinical trials via the ClinicalTrials.gov v2 API
Install
npx vskill@latest install wentorai/research-plugins/clinicaltrials-api-v2SKILL.md
ClinicalTrials.gov v2 API Guide
Overview
ClinicalTrials.gov is the world's largest clinical trial registry, maintained by the U.S. National Library of Medicine (NLM) at NIH. It contains over 576,000 study records from 220+ countries covering interventional trials, observational studies, and expanded access programs. The v2 API provides structured JSON access with field-level filtering, cursor-based pagination, and statistics endpoints.
Key v2 improvements over the legacy API: JSON-native responses, sparse field selection via the fields parameter, nextPageToken pagination, and dedicated statistics endpoints. Study data is organized into protocolSection (sponsor-submitted) and derivedSection (NLM-computed).
Authentication
No authentication required. All endpoints are publicly accessible without API keys or registration. Users should comply with NCBI usage policies and maintain reasonable request rates.
Core Endpoints
Search Studies
- URL:
GET https://clinicaltrials.gov/api/v2/studies - Parameters:
| Parameter | Type | Required | Description | |
|---|---|---|---|---|
| query.term | string | No | Free-text search across all fields | |
| query.cond | string | No | Condition or disease filter | |
| query.intr | string | No | Intervention or treatment filter | |
| query.spons | string | No | Sponsor or collaborator filter | |
| filter.overallStatus | string | No | RECRUITING, COMPLETED, ACTIVE_NOT_RECRUITING, etc. | |
| filter.phase | string | No | EARLY_PHASE1, PHASE1, PHASE2, PHASE3, PHASE4, NA | |
| filter.geo | string | No | Geographic filter (distance(lat,lng,dist)) | |
| fields | string | No | Comma-separated fields for sparse response | |
| sort | string | No | Sort field and direction (e.g., LastUpdatePostDate:desc) | |
| pageSize | int | No | Results per page (default 10, max 1000) | |
| pageToken | string | No | Cursor token for next page | |
| format | string | No | json (default) or csv |
- Example:
- Response:
Full responses include protocolSection with: identificationModule (NCT ID, titles, organization), statusModule (status, dates), descriptionModule (summary), conditionsModule, designModule (type, phases, enrollment), armsInterventionsModule, eligibilityModule (criteria, sex, age), outcomesModule, and contactsLocationsModule.
Get Single Study
- URL:
GET https://clinicaltrials.gov/api/v2/studies/{nctId}
Database Statistics
- URL:
GET https://clinicaltrials.gov/api/v2/stats/size
Field Value Statistics
- URL:
GET https://clinicaltrials.gov/api/v2/stats/fieldValues/{fieldName}
Rate Limits
No formal rate limits are published for the v2 API. Follow NCBI usage guidelines: stay under 3 requests/second without an API key, up to 10/second with one. For bulk data access, use the AACT relational database (https://aact.ctti-clinicaltrials.org/) or downloadable flat files rather than paginating through the full API.
Academic Use Cases
- Systematic reviews: Use
query.cond+query.intr+filter.overallStatus=COMPLETEDto build PRISMA-compliant trial inventories. Paginate withnextPageTokento collect all records, then extract outcomes and enrollment for quantitative synthesis. - Landscape mapping: Combine search with
stats/fieldValuesto map phase distributions, sponsor concentration, and geographic spread for a therapeutic area -- useful for identifying evidence gaps in grant proposals. - Recruitment tracking: Filter by
RECRUITINGstatus andfilter.geoto find active enrollment opportunities. Automate periodic queries for new trials in your domain.
Code Examples
Paginated Collection for Systematic Review
Sponsor and Phase Analysis
References
- v2 API reference: https://clinicaltrials.gov/data-api/api
- About the API: https://clinicaltrials.gov/data-api/about-api
- AACT database (bulk access): https://aact.ctti-clinicaltrials.org/
- WHO ICTRP: https://trialsearch.who.int/
- NCBI usage policies: https://www.ncbi.nlm.nih.gov/home/about/policies/
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/domains/biomedical/clinicaltrials-api-v2/SKILL.md
Popularity
- Repository stars
- 244
- Repository forks
- 41
- Repository npm downloads, 7 days
- 768
- 7-day trend score
- 42
Stars and forks are for the whole GitHub repository, not this skill alone. Downloads are for the repository's npm package. Refreshed 24 Mar 2026, 7 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/wentorai/research-plugins/clinicaltrials-api-v2)