Agent skill · Backend & API

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

maziyarpanahigithub.com/maziyarpanahiGitHub ↗
claude-codeApache-2.0
Install
npx skills add maziyarpanahi/openmed --skill searching-clinicaltrials --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 8 KB
Bundled scripts: none
Version: 1.0
Path: skills/searching-clinicaltrials/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 4,851
Language: Python
Read our review of the source →

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# 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

What's inside
Steps it walks through
  1. When to use
  2. Quick start (real v2 API call)
  3. Response shape
  4. Cursor pagination
  5. Trimming payloads
  6. Workflow
  7. Hand-off to / from OpenMed
  8. Edge cases & gotchas
  9. Standards & references
Commands it runs
curl "https://clinicaltrials.gov/api/v2/studies?query.cond=breast+cancer\
More from openmed
All skills →
About this skill
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.

Keep going