# TrialBase DB Clinical Trials Search API

> TrialBase DB Clinical Trials Search API is a paid API for AI agents from api.trialbase-db.org, paid per call via x402 or MPP, $0.1/call, status unknown (last checked 2026-09-13).

Search a normalized database of clinical trials by registry, condition, intervention, sponsor, country, status, phase, study type, or free text.

## Facts

- Endpoint: GET https://api.trialbase-db.org/v1/trials
- Price: $0.1/call
- Payment: x402, MPP
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/trialbase-db-clinical-trials-search-api-e1886820
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_LW0fRr7p-1qFgi9z-JM6r

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 trialbase-db-clinical-trials-search-api-e1886820
```

Example prompt: Can you search the TrialBase clinical trials database for Phase 3 trials on Type 2 Diabetes testing semaglutide, sponsored by Novo Nordisk, currently recruiting in the United States? Give me up to 20 results with total count.

## When to prefer this

Use this endpoint when you need to search, filter, or browse clinical trial records across multiple registries in a normalized format. It is especially useful when combining multiple filter dimensions (condition + phase + country + status) or when performing free-text search across trial metadata. Prefer this over registry-specific APIs when you need cross-registry normalization or keyset-paginated bulk retrieval.

## Known failure modes

- Invalid or unsupported query parameter returns a 400 Bad Request
- No trials match the specified filters — returns an empty data array with has_more: false
- Expired or malformed cursor returns a pagination error
- Payment not received or insufficient — 402 Payment Required
- Rate limiting or quota exceeded — 429 Too Many Requests

## How this service works

Search normalized clinical trials by registry, condition, intervention, sponsor, country, status, phase, study type, or free text.

## Output

A paginated list of normalized clinical trial records, each with a unique trial ID and provenance metadata. The response includes a has_more flag, an opaque next_cursor for keyset pagination, and optionally a total matching-record count.

## 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"
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "q": {
       "type": "string",
       "maxLength": 160
      },
      "count": {
       "type": "boolean",
       "description": "Include the total matching-record count."
      },
      "limit": {
       "type": "integer",
       "default": 20,
       "maximum": 100,
       "minimum": 1
      },
      "phase": {
       "type": "string",
       "maxLength": 20
      },
      "cursor": {
       "type": "string",
       "description": "Opaque keyset cursor from a previous response."
      },
      "status": {
       "type": "string",
       "maxLength": 40
      },
      "country": {
       "type": "string",
       "maxLength": 80
      },
      "sponsor": {
       "type": "string",
       "maxLength": 160
      },
      "registry": {
       "type": "string",
       "maxLength": 40
      },
      "condition": {
       "type": "string",
       "maxLength": 160
      },
      "study_type": {
       "type": "string",
       "maxLength": 20
      },
      "intervention": {
       "type": "string",
       "maxLength": 160
      }
     },
     "additionalProperties": false
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "data",
      "has_more",
      "next_cursor"
     ],
     "properties": {
      "data": {
       "type": "array",
       "items": {
        "type": "object",
        "required": [
         "id"
        ],
        "properties": {
         "id": {
          "type": "integer",
          "minimum": 1
         },
         "_provenance": {
          "type": "object",
          "additionalProperties": true
         }
        },
        "additionalProperties": true
       }
      },
      "total": {
       "type": "integer",
       "minimum": 0
      },
      "has_more": {
       "type": "boolean"
      },
      "next_cursor": {
       "type": [
        "string",
        "null"
       ]
      }
     },
     "additionalProper
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/trialbase-db-clinical-trials-search-api-e1886820/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.trialbase-db.org](https://www.zero.xyz/host/api.trialbase-db.org/llms.txt)
