Agent skill

Clinicaltrials API V2

by wentorai in wentorai/research-plugins

Search and analyze clinical trials via the ClinicalTrials.gov v2 API

MITAuto-check passedResearch & Science

Install Clinicaltrials API V2

skills CLI
$ npx skills add wentorai/research-plugins --skill clinicaltrials-api-v2 -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install wentorai/research-plugins clinicaltrials-api-v2 --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/wentorai/research-plugins.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/domains/biomedical/clinicaltrials-api-v2 .claude/skills/clinicaltrials-api-v2 && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
clinicaltrials-api-v2
GitHub stars
298
Used in
1 other repo
Token cost
~2k tokens
SKILL.md length
427 words
Files
1
Skills in repo
405
Repo updated
First seen
Licence
MIT

At a glance

Search and analyze clinical trials via the ClinicalTrials.gov v2 API

  • Tasks that involve Clinical and healthcare research
  • SKILL.md covers Overview, Authentication, Core Endpoints and Rate Limits, plus 3 more sections
  • Calls curl; reaches clinicaltrials.gov

What it does

Clinicaltrials API V2 is an agent skill from wentorai/research-plugins. Search and analyze clinical trials via the ClinicalTrials.gov v2 API

Its SKILL.md is about 2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Research & Science, covering Clinical and healthcare research. The repository describes itself as: 350+ academic research skills, MCP configs, and plugins for Research-Claw and AI agents. The licence is MIT.

When your agent uses it

  • Tasks that involve Clinical and healthcare research

Example prompts

  • “/clinicaltrials-api-v2”

Requirements

  • Python 3

What it can do on your machine

Read from SKILL.md and the folder at commit bf44b3c. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • curl

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • clinicaltrials.gov

    Also links to:

    • aact.ctti-clinicaltrials.org
    • trialsearch.who.int
    • ncbi.nlm.nih.gov

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Clinicaltrials API V2 loads about 2k tokens when it runs. Until then it costs about 23 tokens; SKILL.md has 427 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~23
When it runs · the whole SKILL.md, loaded when a task matches
~2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from wentorai/research-plugins at commit bf44b3c, republished under its MIT licence (© wentorai). 427 words, ~2,043 tokens.

Download SKILL.mdSave it as .claude/skills/clinicaltrials-api-v2/SKILL.md (or your agent's skills folder).
name
clinicaltrials-api-v2
description
Search and analyze clinical trials via the ClinicalTrials.gov v2 API

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:
ParameterTypeRequiredDescription
query.termstringNoFree-text search across all fields
query.condstringNoCondition or disease filter
query.intrstringNoIntervention or treatment filter
query.sponsstringNoSponsor or collaborator filter
filter.overallStatusstringNoRECRUITING, COMPLETED, ACTIVE_NOT_RECRUITING, etc.
filter.phasestringNoEARLY_PHASE1, PHASE1, PHASE2, PHASE3, PHASE4, NA
filter.geostringNoGeographic filter (distance(lat,lng,dist))
fieldsstringNoComma-separated fields for sparse response
sortstringNoSort field and direction (e.g., LastUpdatePostDate:desc)
pageSizeintNoResults per page (default 10, max 1000)
pageTokenstringNoCursor token for next page
formatstringNojson (default) or csv
  • Example:
bash
curl "https://clinicaltrials.gov/api/v2/studies?query.cond=diabetes&query.intr=metformin&pageSize=1&fields=NCTId,BriefTitle,OverallStatus"
  • Response:
json
{
  "studies": [{
    "protocolSection": {
      "identificationModule": {
        "nctId": "NCT06649773",
        "briefTitle": "The Experiment of Noiiglutide Injection in Type 2 Diabetes Patients"
      },
      "statusModule": { "overallStatus": "ACTIVE_NOT_RECRUITING" }
    }
  }],
  "nextPageToken": "ZVNj7o2Elu8o3lpo..."
}

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}
bash
curl "https://clinicaltrials.gov/api/v2/studies/NCT04280705?fields=NCTId,BriefTitle,OverallStatus,Phase,LeadSponsorName,EnrollmentCount,Condition,InterventionName"
json
{
  "protocolSection": {
    "identificationModule": {
      "nctId": "NCT04280705",
      "briefTitle": "Adaptive COVID-19 Treatment Trial (ACTT)"
    },
    "statusModule": {
      "overallStatus": "COMPLETED",
      "startDateStruct": { "date": "2020-02-21" },
      "completionDateStruct": { "date": "2020-05-21" }
    },
    "sponsorCollaboratorsModule": {
      "leadSponsor": { "name": "National Institute of Allergy and Infectious Diseases (NIAID)" }
    },
    "conditionsModule": { "conditions": ["COVID-19"] },
    "designModule": { "phases": ["PHASE3"], "enrollmentInfo": { "count": 1062 } },
    "armsInterventionsModule": {
      "interventions": [{ "name": "Placebo" }, { "name": "Remdesivir" }]
    }
  }
}
Show full SKILL.md (171 more words)Show less
Database Statistics
  • URL: GET https://clinicaltrials.gov/api/v2/stats/size
bash
curl "https://clinicaltrials.gov/api/v2/stats/size"
json
{
  "totalStudies": 576554,
  "averageSizeBytes": 17186,
  "largestStudies": [
    { "id": "NCT02723955", "sizeBytes": 3596689 },
    { "id": "NCT03688620", "sizeBytes": 2865033 }
  ]
}
Field Value Statistics
  • URL: GET https://clinicaltrials.gov/api/v2/stats/fieldValues/{fieldName}
bash
curl "https://clinicaltrials.gov/api/v2/stats/fieldValues/Phase"
json
{
  "type": "ENUM",
  "piece": "Phase",
  "field": "protocolSection.designModule.phases",
  "missingStudiesCount": 136632,
  "topValues": [
    { "value": "NA", "studiesCount": 222829 },
    { "value": "PHASE2", "studiesCount": 87478 },
    { "value": "PHASE1", "studiesCount": 63716 },
    { "value": "PHASE3", "studiesCount": 48700 },
    { "value": "PHASE4", "studiesCount": 34911 },
    { "value": "EARLY_PHASE1", "studiesCount": 6179 }
  ]
}

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=COMPLETED to build PRISMA-compliant trial inventories. Paginate with nextPageToken to collect all records, then extract outcomes and enrollment for quantitative synthesis.
  • Landscape mapping: Combine search with stats/fieldValues to map phase distributions, sponsor concentration, and geographic spread for a therapeutic area -- useful for identifying evidence gaps in grant proposals.
  • Recruitment tracking: Filter by RECRUITING status and filter.geo to find active enrollment opportunities. Automate periodic queries for new trials in your domain.

Code Examples

Paginated Collection for Systematic Review
python
import requests, time

def collect_trials(condition, intervention, status="COMPLETED"):
    base = "https://clinicaltrials.gov/api/v2/studies"
    studies, token = [], None
    while True:
        params = {
            "query.cond": condition, "query.intr": intervention,
            "filter.overallStatus": status, "pageSize": 100,
            "fields": "NCTId,BriefTitle,Phase,EnrollmentCount,CompletionDate",
        }
        if token:
            params["pageToken"] = token
        data = requests.get(base, params=params).json()
        studies.extend(data.get("studies", []))
        token = data.get("nextPageToken")
        if not token:
            break
        time.sleep(0.34)
    return studies

trials = collect_trials("type 2 diabetes", "metformin")
print(f"Collected {len(trials)} completed metformin T2D trials")
Sponsor and Phase Analysis
python
import requests
from collections import Counter

params = {"query.cond": "Alzheimer's Disease", "pageSize": 100,
          "fields": "NCTId,Phase,LeadSponsorName"}
data = requests.get("https://clinicaltrials.gov/api/v2/studies", params=params).json()

phases, sponsors = Counter(), Counter()
for s in data["studies"]:
    p = s["protocolSection"]
    for ph in p.get("designModule", {}).get("phases", []):
        phases[ph] += 1
    sponsors[p.get("sponsorCollaboratorsModule", {})
              .get("leadSponsor", {}).get("name", "Unknown")] += 1

for ph, n in phases.most_common():
    print(f"{ph}: {n}")

References

© wentorai, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/domains/biomedical/clinicaltrials-api-v2 of wentorai/research-plugins.

Open the folder on GitHubat commit bf44b3c

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in wentorai/research-plugins, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Clinicaltrials API V2 next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Clinicaltrials API V2 compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Clinicaltrials API V2 this skillwentorai/research-plugins2981 repos~2kAutomated safety check: PassMIT
Clinical Trials Databasegoogle-deepmind/science-skills3.2k2 repos~3.2kAutomated safety check: PassApache-2.0
CHARLS Paper Reproduction Guidexjtulyc/MedgeClaw6171 repos~1.8kAutomated safety check: PassNone
Biomedical Analysis Dispatchxjtulyc/MedgeClaw6171 repos~2kAutomated safety check: PassNone
Research Paperluwill/research-skills860—~1.9kAutomated safety check: PassNone
Research Proposalluwill/research-skills860—~4.5kAutomated safety check: NotesNone

Similar skills

  • Clinical Trials Database

    google-deepmind/science-skills

    Query ClinicalTrials.gov via APIv2. An agent skill from google-deepmind/science-skills.

    3.2k GitHub starsUsed in 2 repos~3.2k tokens
    Research & ScienceAuto-check passed
  • Guides an agent through reproducing papers built on the CHARLS health and retirement survey, from variable mapping to cognition, depression and isolation scores.

    617 GitHub starsUsed in 1 repo~1.8k tokens
    Research & ScienceAuto-check passed
  • Routes bioinformatics, drug discovery, clinical and multi-omics tasks from a chat interface to Claude Code sessions running K-Dense scientific skills, with a live dashboard per task.

    617 GitHub starsUsed in 1 repo~2k tokens
    Research & ScienceAuto-check passed
  • Research Paper

    luwill/research-skills

    A skill your agent uses when the user asks to write or draft an ORIGINAL RESEARCH ARTICLE — IMRaD paper, conference paper, short/workshop paper, 研究论文/期刊论文/会议论文 — reporting their own completed…

    860 GitHub stars~1.9k tokensUpdated today
    Research & ScienceAuto-check passed
  • Research Proposal

    luwill/research-skills

    A skill your agent uses when the user asks to write or draft a PhD / doctoral research proposal, research plan, 研究计划书, or 开题报告 — a forward-looking plan of background, gap, research questions…

    860 GitHub stars~4.5k tokensUpdated today
    Research & ScienceAuto-check: notes
  • Medical Imaging Review

    LeonChaoX/qinyan-academic-skills

    Write comprehensive literature reviews for medical imaging AI research.

    944 GitHub starsUsed in 3 repos~1.1k tokens
    Research & ScienceAuto-check: notes

More from wentorai/research-plugins

All 405 skills in this repo
  • Abstract Writing Guide

    wentorai/research-plugins

    Craft structured research abstracts that maximize clarity and journal acceptance

    298 GitHub starsUsed in 1 repo~1.7k tokens
    Auto-check passed
  • Academic Citation Manager

    wentorai/research-plugins

    Manage academic citations across BibTeX, APA, MLA, and Chicago formats

    298 GitHub starsUsed in 1 repo~2.7k tokens
    Auto-check passed
  • Academic Paper Summarizer

    wentorai/research-plugins

    Summarize academic papers with structured extraction of key elements

    298 GitHub starsUsed in 1 repo~1.4k tokens
    Auto-check passed
  • Academic Study Methods

    wentorai/research-plugins

    Evidence-based study techniques for academic learning and retention

    298 GitHub starsUsed in 1 repo~1.8k tokens
    Auto-check passed
  • Academic Tone Guide

    wentorai/research-plugins

    Adjust writing tone and register for academic audiences and venues

    298 GitHub starsUsed in 1 repo~1.9k tokens
    Auto-check passed
  • Academic Translation Guide

    wentorai/research-plugins

    Academic translation, post-editing, and Chinglish correction guide

    298 GitHub starsUsed in 1 repo~1.6k tokens
    Auto-check passed

Questions about Clinicaltrials API V2

What does Clinicaltrials API V2 do?

Search and analyze clinical trials via the ClinicalTrials.gov v2 API. Clinicaltrials API V2 is an agent skill from wentorai/research-plugins.

When should I use Clinicaltrials API V2?

Clinicaltrials API V2 fits situations like: tasks that involve Clinical and healthcare research.

How do I install Clinicaltrials API V2 in Claude Code?

Run `npx skills add wentorai/research-plugins --skill clinicaltrials-api-v2 -a claude-code`. Or copy the skill folder (skills/domains/biomedical/clinicaltrials-api-v2 in wentorai/research-plugins) into .claude/skills/clinicaltrials-api-v2 in your project. Claude Code loads it when a task matches its description.

How do I install Clinicaltrials API V2 in Codex?

Run `npx skills add wentorai/research-plugins --skill clinicaltrials-api-v2 -a codex`. Or copy the skill folder (skills/domains/biomedical/clinicaltrials-api-v2 in wentorai/research-plugins) into .agents/skills/clinicaltrials-api-v2 in your project. Codex loads it when a task matches its description.

Can I use Clinicaltrials API V2 in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add wentorai/research-plugins --skill clinicaltrials-api-v2 -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/clinicaltrials-api-v2, .gemini/skills/clinicaltrials-api-v2, .github/skills/clinicaltrials-api-v2 and .opencode/skills/clinicaltrials-api-v2 in your project.

What does Clinicaltrials API V2 need to run?

Going by SKILL.md and its folder, Clinicaltrials API V2 needs the command-line tools its instructions call (curl). Our summary lists: Python 3.

Does Clinicaltrials API V2 access the network?

SKILL.md names 4 domains. In commands or code: clinicaltrials.gov; the agent is likely to contact it when it follows the instructions. As links in the text: aact.ctti-clinicaltrials.org, trialsearch.who.int and ncbi.nlm.nih.gov. This is read from the text; nothing was executed.

Is Clinicaltrials API V2 safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Clinicaltrials API V2 use?

Clinicaltrials API V2 is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Clinicaltrials API V2 use?

About 2k tokens (SKILL.md is roughly 8.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Clinicaltrials API V2?

Skills that share tags, products or a category with Clinicaltrials API V2: Clinical Trials Database (google-deepmind/science-skills, 3.2k stars), CHARLS Paper Reproduction Guide (xjtulyc/MedgeClaw, 617 stars), Biomedical Analysis Dispatch (xjtulyc/MedgeClaw, 617 stars) and Research Paper (luwill/research-skills, 860 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Clinicaltrials API V2?

wentorai (a GitHub user) maintains it in wentorai/research-plugins, which has 298 GitHub stars. The repository holds 405 skills in this directory. The repository was last updated on June 19, 2026.

Source: wentorai/research-plugins on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.