---
name: clinical-trials-9ea1997bc23b
description: "ClinicalTrials.gov API client and analysis toolkit. Search, filter, and download trial records. Analyze trial designs, endpoints, enrollment, sponsors, and results. Automate systematic trial discovery."
tags: [clinical-trials, research, api, systematic-review, healthcare, zorai]
---
## Overview

Search, filter, and download clinical trial records from ClinicalTrials.gov. Analyze trial designs, endpoints, enrollment, sponsors, and results. Automate systematic trial discovery.

## Installation

```bash
uv pip install requests
```

## Search Trials

```python
import requests

params = {
    "query.term": "diabetes AND metformin AND phase 3",
    "pageSize": 25,
    "format": "json",
    "sort": "LastUpdateDate",
}

resp = requests.get("https://clinicaltrials.gov/api/v2/studies", params=params)
data = resp.json()

for study in data.get("studies", []):
    p = study["protocolSection"]
    nct = p["identificationModule"]["nctId"]
    title = p["identificationModule"]["briefTitle"]
    status = p["statusModule"].get("overallStatus", "Unknown")
    print(f"{nct}: {title[:60]} [{status}]")
```

## Study Details

```python
resp = requests.get("https://clinicaltrials.gov/api/v2/studies/NCT04251195")
study = resp.json()
design = study["protocolSection"]["designModule"]
print(f"Purpose: {design.get('primaryPurpose')}")
```

## Workflow

1. Search trials via ClinicalTrials.gov API v2
2. Filter by condition, intervention, phase, status
3. Download structured trial data (JSON)
4. Extract PICO: Population, Intervention, Comparison, Outcome
5. Analyze trial designs, enrollment, and results


---
Source attribution: mkurman
Original project: https://github.com/mkurman/zorai/blob/d06ee7597049567dab92db22d41b2764cf89094a/skills/scientific-skills/clinical-trials/SKILL.md
License: MIT
License information: https://opensource.org/license/mit
Original upstream instructions; downloaded from Mega AI Hub.

## Upstream license notice

MIT License

Copyright (c) 2026 zorai contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.



# Mega AI Hub resource metadata

Creator / publisher: mkurman
Original project: https://github.com/mkurman/zorai/blob/d06ee7597049567dab92db22d41b2764cf89094a/skills/scientific-skills/clinical-trials/SKILL.md
Attribution basis: Source repository record

Fields of work: Education & Research, Healthcare & Life Sciences
Roles: Clinical Research, Health Informatics, Researcher
Specialties: API, Cross Platform
Tools: Clinicaltrials.Gov
Country applicability: Country not specified
Classification basis: Source catalog labels
Instruction SHA-256: d0b8866bba564f4a3fef6d23052507c5ef23497f2f9e4d67b57062fcc185f304
