# Agent Data API – Clinical Trials Search

> Agent Data API – Clinical Trials Search is a paid API for AI agents from x402-agent-api-production.up.railway.app, paid per call via x402, $0.005/call, status unknown (last checked 2026-11-13).

Searches ClinicalTrials.gov data by drug, sponsor, condition, or keyword and returns trial counts, phase breakdowns, and upcoming primary completion dates

## Facts

- Endpoint: GET https://x402-agent-api-production.up.railway.app/trials/%7Bquery%7D?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent-data-api-clinical-trials-search-0c8ea6f0
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_3FhYPtu_baXyt3Jfi5A1p

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 agent-data-api-clinical-trials-search-0c8ea6f0
```

Example prompt: Search clinical trials for tirzepatide by drug name and show me up to 20 results, including how many are in Phase 3 and which ones have primary completion dates coming up in the next year.

## When to prefer this

Use this endpoint when an agent needs structured, aggregated clinical trial data searchable by drug, condition, sponsor, or keyword — especially when phase breakdowns and upcoming completion timelines are needed. Prefer this over raw ClinicalTrials.gov API calls when pay-per-call USDC micropayment billing is acceptable and a simple GET interface is preferred. Best suited for pharmaceutical research, investment due diligence, competitive intelligence, and health research workflows.

## Known failure modes

- Invalid or misspelled query returns zero results
- Unsupported 'by' enum value causes a validation error
- Limit parameter outside 1-50 range causes rejection
- Missing required 'query' path parameter returns 400 or 402
- Payment failure via x402 protocol blocks access
- Intermittent Railway.app hosting downtime causes 502 errors

## How this service works

SEC and supplement safety data, pay per call in USDC via x402.

## Output

Returns a JSON object containing the search query term, total number of matching trials, a breakdown of trial counts by phase (e.g. PHASE1, PHASE2, PHASE3), and a list of trials with upcoming primary completion dates within the next 12 months including NCT ID, phases, sponsor name, and projected completion month.

## 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"
     ],
     "type": "string"
    },
    "pathParams": {
     "type": "object",
     "required": [
      "query"
     ],
     "properties": {
      "query": {
       "type": "string",
       "description": "Drug, company, condition or keyword, e.g. tirzepatide"
      }
     }
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "by": {
       "enum": [
        "term",
        "drug",
        "sponsor",
        "condition"
       ],
       "type": "string"
      },
      "limit": {
       "type": "integer",
       "maximum": 50,
       "minimum": 1
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "query": "tirzepatide",
  "by_phase": {
   "PHASE3": 12
  },
  "total_matches": 150,
  "upcoming_primary_completions_12mo": [
   {
    "nct_id": "NCT05000000",
    "phases": [
     "PHASE3"
    ],
    "sponsor": "Eli Lilly and Company",
    "primary_completion_date": "2027-03"
   }
  ]
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent-data-api-clinical-trials-search-0c8ea6f0/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-agent-api-production.up.railway.app](https://www.zero.xyz/host/x402-agent-api-production.up.railway.app/llms.txt)
