# ClinicalTrials.gov Trial Search

> ClinicalTrials.gov Trial Search is a paid API for AI agents from payai.agentstools.dev, paid per call via x402, $0.015/call, status unknown (last checked 2026-09-14).

Search ClinicalTrials.gov by indication, molecule, sponsor, or free text and return a ranked, normalized list of matching clinical trial records with facet summary and total count.

## Facts

- Endpoint: GET https://payai.agentstools.dev/trials/search
- Price: $0.015/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/clinicaltrials-gov-trial-search-c214e43d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_gtYhzrprJyLDh4bUJxck4

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability clinicaltrials-gov-trial-search-c214e43d
```

Example prompt: Can you search ClinicalTrials.gov for recruiting Phase 3 interventional trials studying pembrolizumab for non-small cell lung cancer in the United States, and show me the top 10 results?

## When to prefer this

Use this endpoint as the first step in any clinical-trial research workflow when you need to discover and shortlist relevant trials from ClinicalTrials.gov. It is the right choice when you have a condition, molecule, or sponsor name and want a broad ranked list before investing in detailed per-study lookups (e.g. /trials/study) or pipeline analyses (e.g. /trials/pipeline). Prefer this over manual ClinicalTrials.gov browsing when you need structured, normalized, filterable output programmatically. It is a low-cost ($0.015) way to validate whether a topic has any trial coverage before running more expensive downstream queries.

## Known failure modes

- No results returned if query terms are too specific or misspelled — agent should broaden or correct input
- Missing required 'input' wrapper causes 400 validation error
- Phase enum must be '0','1','2','3', or '4' — numeric strings only, not 'Phase 2'
- Status enum uses snake_case values (e.g. 'not_yet_recruiting') — freeform text will be rejected
- page_size must be between 1 and 50 — values outside range cause validation failure
- Country must match ClinicalTrials.gov accepted country names; ambiguous abbreviations may return zero results
- Service may return stale data if ClinicalTrials.gov upstream is delayed

## How this service works

Search ClinicalTrials.gov by indication, company, molecule or free text and get a ranked list of normalized trial records with total count and on-page facet summary. Optional phase, status, study-type and country filters. A cheap first step before /trials/study or /trials/pipeline.

## Output

A ranked list of normalized clinical trial records (up to page_size, default 10), each containing core metadata such as NCT identifier, official title, overall status, phase, sponsor, conditions, interventions, and locations. Also includes a total matching-record count and an on-page facet summary (e.g. phase distribution, status breakdown) to help the agent decide whether to refine the query or drill into individual study records.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [],
     "properties": {
      "cond": {
       "type": "string",
       "description": "Condition, indication or disease"
      },
      "intr": {
       "type": "string",
       "description": "Intervention, drug or molecule name"
      },
      "lead": {
       "type": "string",
       "description": "Lead sponsor name"
      },
      "term": {
       "type": "string",
       "description": "Free-text other terms"
      },
      "phase": {
       "enum": [
        "0",
        "1",
        "2",
        "3",
        "4"
       ],
       "type": "string",
       "description": "Trial phase to filter by, where 0 is Early Phase 1"
      },
      "spons": {
       "type": "string",
       "description": "Sponsor or collaborator name"
      },
      "status": {
       "enum": [
        "recruiting",
        "not_yet_recruiting",
        "active_not_recruiting",
        "completed",
        "terminated",
        "withdrawn",
        "suspended"
       ],
       "type": "string",
       "description": "Overall recruitment status to filter by"
      },
      "titles": {
       "type": "string",
       "description": "Title or acronym terms"
      },
      "country": {
       "type": "string",
       "description": "Country to narrow trial sites"
      },
      "page_size": {
       "type": "integer",
       "maximum": 50,
       "minimum": 1,
       "description": "Max records to return, default 10"
      },
      "study_type": {
       "enum": [
        "int",
        "obs",
        "exp"
       ],
       "type": "string",
       "description": "Study type: int interventional, obs observational, exp expanded access"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/clinicaltrials-gov-trial-search-c214e43d/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from payai.agentstools.dev](https://www.zero.xyz/host/payai.agentstools.dev/llms.txt)
