clinicaltrials-skill

Query the ClinicalTrials.gov API v2 for study search, metadata, enums, and field statistics.

5.3k|765|Updated Mar 4, 2026
One-click install
npx skills add https://github.com/openai/plugins --skill clinicaltrials-skill
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: clinicaltrials-skill
Source: https://github.com/openai/plugins/tree/main/plugins/life-science-research/skills/clinicaltrials-skill
Command: npx skills add https://github.com/openai/plugins --skill clinicaltrials-skill

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires requests, and includes scripts (resource) components.

What problem does it solve?

Researchers and analysts often need quick, compact summaries from ClinicalTrials.gov without writing raw API calls or parsing large JSON payloads. This Skill wraps the ClinicalTrials.gov API v2 in a single script that returns concise, truncated results suitable for conversational analysis.

Core Features & Use Cases

  • Study Search: Query studies with filters like condition and recruitment status, with pagination control via max_pages and max_items.
  • API Introspection: Retrieve metadata, search areas, enums, and field statistics (field values, field sizes, stats size) to understand available data.
  • Raw Output Saving: Optionally persist full API responses to disk with save_raw for deeper offline analysis.
  • Use Case: A clinical researcher asks for recruiting prostate cancer trials; the Skill runs a targeted studies query and returns a compact markdown summary of the first page of results.

Quick Start

Ask the assistant to search ClinicalTrials.gov for recruiting studies on a specific condition, such as prostate cancer, and summarize the first ten results.

Frequently Asked Questions about clinicaltrials-skill

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I search ClinicalTrials.gov for recruiting studies?

Send a JSON request with action set to studies and params containing query.cond for the condition and filter.overallStatus set to RECRUITING. The script returns compact records with pagination metadata like next_page_token and total counts.

What ClinicalTrials.gov API endpoints does this support?

It supports the v2 endpoints for studies, metadata, search areas, enums, stats size, field values, and field sizes, plus a generic request action for custom paths. Each action maps to a predefined API path in the script.

How do I get full ClinicalTrials.gov API responses instead of truncated data?

Set save_raw to true in the JSON input and optionally provide raw_output_path. The full response is written to disk as JSON, and the returned output includes the saved file path.

Why does the ClinicalTrials.gov output show truncated records?

The script compacts output using max_items and max_depth limits to keep responses concise, truncating long strings and nested structures. Increase max_items or max_pages, or use save_raw, when you need complete data.

What Python dependencies are required to run the ClinicalTrials.gov client?

The script requires the requests library for HTTP calls; it returns a missing_dependency error if requests is not installed. All other functionality uses Python standard library modules like json and pathlib.