[Integrations](https://spiral.ai/integrations) › [Codex](https://spiral.ai/integrations/codex) › [ClinicalTrials.gov field statistics](https://spiral.ai/integrations/codex/clinicaltrials-gov-field-statistics)

# How to Use ClinicalTrials.gov field statistics in Codex

Returns registry-wide field statistics, including study counts for phase and overall-status values. Use it to understand registry terminology and distributions before interpreting a narrower trial search.

|  |  |
| --- | --- |
| Model | ClinicalTrials.gov field statistics |
| Available through | Alexandria |
| Category | Health |
| Price | $0.00873 per call. |
| Returns | json |
| Runs | In the background |
| Setup | About 2 minutes, no API key |

## Prompts to try with ClinicalTrials.gov field statistics in Codex

- Use ClinicalTrials.gov field statistics to retrieve phase and overall-status counts, then add a registry overview table to this project's research page.
- Use ClinicalTrials.gov field statistics to look this up and give me the result as a table. Save the result in ./assets.
- Pull the latest numbers from ClinicalTrials.gov field statistics and tell me what changed since last week.
- Check ClinicalTrials.gov field statistics and summarize what you find in three bullet points.
- Pull the newest data from ClinicalTrials.gov field statistics and give me the result as a table.

## How to set up ClinicalTrials.gov field statistics in Codex

Pick the way that suits you. Each takes about two minutes.

### Use Spiral's MCP server

1. **Add the hosted server**

```bash
codex mcp add spiral --url https://api.spiral.ai/mcp
```

2. **Sign in**: Codex opens the browser: sign in to Spiral and click Authorize. No API key. `codex mcp list` then shows Spiral.

```bash
codex mcp login spiral
```

### Use the Spiral skill

1. **Send Codex this message**: Your agent reads Spiral's skill and sets itself up.

```
set up https://spiral.ai/SKILL.md
```

2. **Sign in or paste a key**: Approve Spiral in the browser, or give the agent a key from the console.

### Use the Spiral CLI

1. **Install and sign in**: Installs the Spiral CLI, signs you in and adds its skill to your coding agents.

```bash
npx -y spiral-cli@latest init
```

### Call the Spiral API

1. **Create an API key**: In the console, under API keys.

2. **Run ClinicalTrials.gov field statistics**: One request; the result comes back by polling or a webhook.

```bash
curl https://api.spiral.ai/v1/runs \
  -H "Authorization: Bearer $SPIRAL_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "provider": "alexandria",
    "model": "clinicaltrials-gov/clinical-trials/field_values",
    "input": {
      "fields": [
        "<fields>"
      ]
    }
  }'
```

Then paste one of the prompts above: Codex finds ClinicalTrials.gov field statistics on Spiral, shows the price and runs it.

Setup guide in the docs: https://spiral.ai/docs/quickstarts/codex

## ClinicalTrials.gov field statistics tools and prices

- [ClinicalTrials.gov · Field values](https://spiral.ai/tools/alexandria/clinicaltrials-gov/clinical-trials/field_values) (Alexandria): $0.00873 per call.

## What can you do with ClinicalTrials.gov field statistics in Codex?

Build a trial research interface around ClinicalTrials.gov's registered terminology and public study evidence. Use the returned data to populate search controls, comparison tables, and explanations of registry categories.

### Build a public trial explorer

Provide registry autocomplete, explain phase and status categories with registry-wide counts, display matching trials, open their protocols, and compare milestones with actual or estimated labels.

### Compare a disease portfolio with registry activity

Resolve the registry's condition wording, collect matching trials, and summarize their phases, designs, and milestones. Present registry-wide phase and status counts separately as context for the selected disease portfolio.

### Teach clinical registry analysis

Build an exercise around registry terminology, overall phase and status distributions, a reproducible trial search, protocol interpretation, and the difference between actual and estimated milestones.

### Create a registry terminology reference

Combine phase and status counts with condition, intervention, sponsor, and facility suggestions. Link terminology explanations to example trial records so analysts can see how the terms appear in practice.

## Overview

- [Alexandria](https://spiral.ai/providers/alexandria)
- [All Codex guides](https://spiral.ai/integrations/codex)

## ClinicalTrials.gov field statistics in other agents

- [Amp](https://spiral.ai/integrations/amp/clinicaltrials-gov-field-statistics)
- [ChatGPT](https://spiral.ai/integrations/chatgpt/clinicaltrials-gov-field-statistics)
- [Claude](https://spiral.ai/integrations/claude-desktop/clinicaltrials-gov-field-statistics)
- [Claude Code](https://spiral.ai/integrations/claude-code/clinicaltrials-gov-field-statistics)
- [Cline](https://spiral.ai/integrations/cline/clinicaltrials-gov-field-statistics)
- [Cursor](https://spiral.ai/integrations/cursor/clinicaltrials-gov-field-statistics)
- [Devin](https://spiral.ai/integrations/devin/clinicaltrials-gov-field-statistics)
- [dots](https://spiral.ai/integrations/dots/clinicaltrials-gov-field-statistics)
- [Factory Droid](https://spiral.ai/integrations/factory-droid/clinicaltrials-gov-field-statistics)
- [Gemini](https://spiral.ai/integrations/gemini/clinicaltrials-gov-field-statistics)
- [Gemini CLI](https://spiral.ai/integrations/gemini-cli/clinicaltrials-gov-field-statistics)
- [Google Antigravity](https://spiral.ai/integrations/antigravity/clinicaltrials-gov-field-statistics)
- [goose](https://spiral.ai/integrations/goose/clinicaltrials-gov-field-statistics)
- [Grok](https://spiral.ai/integrations/grok/clinicaltrials-gov-field-statistics)
- [Grok Build](https://spiral.ai/integrations/grok-build/clinicaltrials-gov-field-statistics)
- [Hermes](https://spiral.ai/integrations/hermes/clinicaltrials-gov-field-statistics)
- [Instinct](https://spiral.ai/integrations/instinct/clinicaltrials-gov-field-statistics)
- [Manus](https://spiral.ai/integrations/manus/clinicaltrials-gov-field-statistics)
- [Muse](https://spiral.ai/integrations/muse/clinicaltrials-gov-field-statistics)
- [Muse Code](https://spiral.ai/integrations/muse-code/clinicaltrials-gov-field-statistics)
- [n8n](https://spiral.ai/integrations/n8n/clinicaltrials-gov-field-statistics)
- [Notion](https://spiral.ai/integrations/notion/clinicaltrials-gov-field-statistics)
- [OpenClaw](https://spiral.ai/integrations/openclaw/clinicaltrials-gov-field-statistics)
- [opencode](https://spiral.ai/integrations/opencode/clinicaltrials-gov-field-statistics)
- [Perplexity](https://spiral.ai/integrations/perplexity/clinicaltrials-gov-field-statistics)
- [Raycast](https://spiral.ai/integrations/raycast/clinicaltrials-gov-field-statistics)
- [VS Code](https://spiral.ai/integrations/vscode/clinicaltrials-gov-field-statistics)
- [Windsurf](https://spiral.ai/integrations/windsurf/clinicaltrials-gov-field-statistics)
- [Zapier](https://spiral.ai/integrations/zapier/clinicaltrials-gov-field-statistics)

## More Codex guides

- [ClinVar genetic change search](https://spiral.ai/integrations/codex/clinvar-genetic-change-search)
- [ClinicalTrials.gov search suggestions](https://spiral.ai/integrations/codex/clinicaltrials-gov-search-suggestions)
- [ClinVar genetic change details](https://spiral.ai/integrations/codex/clinvar-genetic-change-details)
- [ClinicalTrials.gov study dates](https://spiral.ai/integrations/codex/clinicaltrials-gov-study-dates)
- [ChEMBL target search](https://spiral.ai/integrations/codex/chembl-target-search)
- [ClinicalTrials.gov study details](https://spiral.ai/integrations/codex/clinicaltrials-gov-study-details)

## Questions about ClinicalTrials.gov field statistics in Codex

**Can Codex use ClinicalTrials.gov field statistics?**

Yes. Add Spiral to Codex as an MCP server, and Codex can find and run ClinicalTrials.gov field statistics like any built-in tool.

**How much does ClinicalTrials.gov field statistics cost in Codex?**

$0.00873 per call. You pay from your Spiral balance as you go, with no subscription, and a failed run is not charged. Your Codex plan is separate.

**Do I need an Alexandria account to use ClinicalTrials.gov field statistics in Codex?**

No. Spiral runs ClinicalTrials.gov field statistics on its own Alexandria account. You sign in to Spiral once and never paste a key.

**How long does it take to set up ClinicalTrials.gov field statistics in Codex?**

About two minutes: add the hosted server, then sign in.

**Does Codex wait while ClinicalTrials.gov field statistics runs?**

ClinicalTrials.gov field statistics runs in the background. Codex starts the run, checks on it and gives you the json when it's ready.

**Does ClinicalTrials.gov cover every clinical study?**

It includes studies in the United States and many other countries, but coverage is incomplete. Not every study is legally required to register, including some observational studies.

**How current is a study's information?**

Updates depend on submissions from the organizations conducting the studies. For applicable trials covered by the final rule, recruitment-status changes must be submitted within 30 calendar days, so the registry is not a live enrollment feed.

**What does an unknown study status mean?**

ClinicalTrials.gov uses unknown status when certain previously ongoing studies have passed their completion date and their status has not been verified within the past two years. It does not establish that the study is still recruiting.

**Are individual participants' results available?**

ClinicalTrials.gov provides summary-level study results rather than raw data or individual participant-level data. Posted results can include participant flow, baseline characteristics, outcome measures, and adverse events.

**Are completion dates confirmed milestones?**

Only dates labeled actual represent reported events. Estimated completion dates are researchers' projections; primary completion concerns collection of primary-outcome data and can differ from overall study completion.

