searching-clinicaltrials
Searches ClinicalTrials.gov for studies by condition, intervention, and recruitment status using the modern v2 REST API with cursor (pageToken) pagination. Use when the user wants to find trials for a diagnosis or drug, screen patients against open studies, build a trial-matching feature, or pull a trial corpus for analysis. Trigger keywords: clinical trial, ClinicalTrials.gov, NCT number, trial search, recruiting studies, eligibility, query.cond, query.intr, pageToken, v2 API. Pairs adjacent to OpenMed: take Disease/Pharmaceutical entities from openmed.analyze_text and turn them into query.co
npx skills add maziyarpanahi/openmed --skill searching-clinicaltrials --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Searching ClinicalTrials.gov (v2 REST API) Query **ClinicalTrials.gov** — the U.S. registry of clinical studies — for trials matching a condition, intervention, and recruitment status. This skill uses the **modern v2 REST API** (`/api/v2/studies`), which returns structured JSON and paginates with an opaque cursor (`pageToken`), not page numbers. The v2 API is **fully public**: no API key, no registration, no license barrier. The legacy v1/classic API and the older `query_term`-style endpoints are deprecated — do not build on them. ## When to use - OpenMed extracted a diagnosis ("metastatic colorectal cancer") or a drug ("pembrolizumab") and you want open trials for it. - You are building a patient-to-trial matching feature and need candidate studies before applying eligibility logic (`parsing-trial-eligibility`). - You need a corpus of trial records (eligibility text, outcomes) to feed back into `openmed.analyze_text` for biomedical NER. If you already have an NCT number, fetch the single study directly (`/api/v2/studies/NCT01234567`) instead of searching. ## Quick start (real v2 API call) Base URL: `https://clinicaltrials.gov/api/v2`. No auth. JSON by default. ```python import r
- When to use
- Quick start (real v2 API call)
- Response shape
- Cursor pagination
- Trimming payloads
- Workflow
- Hand-off to / from OpenMed
- Edge cases & gotchas
- Standards & references
curl "https://clinicaltrials.gov/api/v2/studies?query.cond=breast+cancer\
What does the searching-clinicaltrials skill do?
Searches ClinicalTrials.gov for studies by condition, intervention, and recruitment status using the modern v2 REST API with cursor (pageToken) pagination. Use when the user wants to find trials for a diagnosis or drug, screen patients against open studies, build a trial-matching feature, or pull a trial corpus for analysis. Trigger keywords: clinical trial, ClinicalTrials.gov, NCT number, trial search, recruiting studies, eligibility, query.cond, query.intr, pageToken, v2 API. Pairs adjacent to OpenMed: take Disease/Pharmaceutical entities from openmed.analyze_text and turn them into query.co
How do I install it?
Run `npx skills add maziyarpanahi/openmed --skill searching-clinicaltrials --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From maziyarpanahi/openmed, a repository with 4,851 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
