searching-clinicaltrials
यह क्या करती है
यह स्किल एजेंट को सिखाती है कि अमेरिका के क्लिनिकल ट्रायल रजिस्ट्री में अध्ययन कैसे खोजें। यह उन लोगों के लिए है जिन्हें किसी निदान या दवा के लिए ट्रायल चाहिए, या ट्रायल रिकॉर्ड का सेट चाहिए।
कब इस्तेमाल करें
- ✓जब उपयोगकर्ता किसी खास बीमारी के लिए भर्ती हो रहे क्लिनिकल ट्रायल खोजना चाहता है।
- ✓जब उपयोगकर्ता के पास NCT नंबर है और उसे उस एक अध्ययन का विवरण चाहिए।
- ✓जब कोई टीम ट्रायल मिलान बना रही है और पात्रता जाँचने से पहले उम्मीदवार अध्ययन चाहिए।
Skill का लिंक
https://github.com/maziyarpanahi/openmed/blob/master/skills/searching-clinicaltrials/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“क्या आप टाइप 2 मधुमेह के लिए भर्ती हो रहे क्लिनिकल ट्रायल खोज सकते हैं, जिन्हें मैं अपनी टीम के साथ देख सकूँ?”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
एजेंट बीमारी, हस्तक्षेप और स्थिति के साथ सार्वजनिक ClinicalTrials.gov API को अनुरोध भेजता है। वह कर्सर से नतीजे पेज-दर-पेज पढ़ता है, और लॉगिन की ज़रूरत नहीं होती।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
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_textfor 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.
import requests
BASE = "https://clinicaltrials.gov/api/v2"
def search_trials(condition: str, intervention: str | None = None,
status: str = "RECRUITING", page_size: int = 50) -> dict:
"""One page of studies for a condition (+ optional intervention)."""
params = {
"query.cond": condition, # condition / disease search
"filter.overallStatus": status, # comma-separated enum values
"pageSize": min(page_size, 1000), # max 1000; default 10
"countTotal": "true", # include totalCount on first page
"format": "json",
}
if intervention:
params["query.intr"] = intervention # drug / intervention search
r = requests.get(f"{BASE}/studies", params=params, timeout=30)
r.raise_for_status()
return r.json()
data = search_trials("breast cancer", intervention="trastuzumab")
print(data["totalCount"]) # total matches (first page only)
for study in data["studies"]:
ps = study["protocolSection"]
nct = ps["identificationModule"]["nctId"]
title = ps["identificationModule"]["briefTitle"]
print(nct, "-", title)
Equivalent cURL:
curl "https://clinicaltrials.gov/api/v2/studies?query.cond=breast+cancer\
&query.intr=trastuzumab&filter.overallStatus=RECRUITING&pageSize=50&format=json"
Response shape
Top level: studies (array), nextPageToken (present only if more results),
and totalCount (only when countTotal=true, on the first page). Each study is
a protocolSection of typed modules:
| Field path | Meaning |
|---|---|
identificationModule.nctId |
NCT........ study id |
identificationModule.briefTitle |
short title |
statusModule.overallStatus |
RECRUITING, COMPLETED, … |
conditionsModule.conditions |
list of condition strings |
armsInterventionsModule.interventions |
drugs / procedures |
eligibilityModule.eligibilityCriteria |
free-text inclusion/exclusion |
eligibilityModule.sex / minimumAge / maximumAge |
demographic gates |
contactsLocationsModule.locations |
recruiting sites |
Cursor pagination
There are no page numbers. Loop until nextPageToken is absent. The token is
opaque — pass it back verbatim. Do not re-send countTotal after page 1.
def iter_all(condition: str, status: str = "RECRUITING"):
params = {"query.cond": condition, "filter.overallStatus": status,
"pageSize": 1000, "format": "json"}
while True:
r = requests.get(f"{BASE}/studies", params=params, timeout=30)
r.raise_for_status()
page = r.json()
yield from page.get("studies", [])
token = page.get("nextPageToken")
if not token:
break
params["pageToken"] = token # cursor for the next page
Trimming payloads
Default responses are large. Restrict to the fields you need with fields (dotted
paths or module names) to cut bandwidth:
params["fields"] = ("NCTId,BriefTitle,OverallStatus,"
"Condition,EligibilityCriteria")
Workflow
- Build the query from OpenMed facts. Map extracted Disease spans →
query.cond; Pharmaceutical spans →query.intr. Free-text keywords go inquery.term. Combine stat
अक्सर पूछे जाने वाले सवाल
क्या मुझे API कुंजी चाहिए?
नहीं। स्किल कहती है कि v2 API पूरी तरह सार्वजनिक है और इसके लिए कुंजी या पंजीकरण नहीं चाहिए।
API का कौन-सा वर्शन इस्तेमाल करना चाहिए?
स्किल आधुनिक v2 API इस्तेमाल करने को कहती है, और पुराने v1 व क्लासिक एंडपॉइंट को अप्रचलित बताती है।
कोई एक खास अध्ययन कैसे लूँ?
उसका NCT नंबर इस्तेमाल करके उस एक अध्ययन को सीधे लाएँ।
जानकारी
लेखक का मूल विवरण
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
repo: maziyarpanahi/openmed
लोकप्रियता
- GitHub स्टार
- 5.8k
- रैंकिंग में स्थान
- #14731
- लाइसेंस
- Apache-2.0
- अपडेट की गई
- 2/11/2026
कमेंट
- …
इस repository की और skills
annotating-variants
5.8kआपके एजेंट को मुफ़्त सार्वजनिक एनोटेटर से जेनेटिक वेरिएंट का असर बताने, HGVS नामों को जीनोम पोज़िशन में बदलने और जनसंख्या आवृत्ति जोड़ने में मदद करती है।
ask-openmed
5.8kआपके एजेंट को क्लिनिकल टेक्स्ट अनुरोध के लिए सही OpenMed वर्कफ़्लो चुनने में मदद करती है, जहाँ मरीज़ का डेटा हो सकता है वहाँ पहले गोपनीयता जाँच से शुरू करके।
assembling-fhir-bundles
5.8kकई FHIR स्वास्थ्य रिकॉर्ड को एक ट्रांज़ैक्शन Bundle में पैक करती है, जो EHR को भेजने के लिए तैयार हो और आंतरिक संदर्भ सही जुड़े हों।
auditing-deid-leakage
5.8kडी-आइडेंटिफ़ाइड क्लिनिकल टेक्स्ट में बचे पहचानकर्ता जैसे SSN, कार्ड नंबर, ईमेल और तारीखें खोजती है, और कुछ बचा हो तो रिलीज़ रोक देती है।
मिलती-जुलती skills
tavily
394kयह आपके एजेंट को Tavily से वेब पर खोजने और खास वेब पेजों से टेक्स्ट निकालने देती है, गहराई, डोमेन और तारीख के विकल्पों के साथ।
blogwatcher
394kयह आपके एजेंट को ब्लॉग और RSS या Atom फ़ीड फ़ॉलो करने, उनमें नए लेख जांचने और जो लेख आपने पढ़ लिए हों उन्हें चिह्नित करने देती है।
data-scraper-agent
280kएजेंट को किसी भी public स्रोत से अपने-आप डेटा इकट्ठा करने में मदद करता है। इसे schedule किया जा सकता है, जानकारी को और बेहतर बनाया जा सकता है और नतीजे सेव किए जा सकते हैं। ऑनलाइन डेटा पर नज़र रखने के लिए उपयोगी है।