# ClinicalTrialMatch

> Patient-friendly search across an aggregated clinical-trials database: every study from
> ClinicalTrials.gov plus records from the EU Clinical Trials Information System (CTIS) and the
> WHO ICTRP network registries, deduplicated under stable identifiers and enriched with
> LLM-structured eligibility criteria (biomarkers, prior-therapy requirements, participation
> details like placebo possibility and visit burden).

Stable identifiers: `trial_id` is the NCT number (e.g. `NCT01234567`) when the trial exists on
ClinicalTrials.gov, otherwise the native registry id (EUCT number, ISRCTN, ACTRN, ...).
Any known registry id resolves in lookups.

Website URL patterns for humans: https://clinicaltrialmatch.com/trial/{trial_id},
https://clinicaltrialmatch.com/condition/{condition-slug} (e.g. /condition/breast-cancer), and
https://clinicaltrialmatch.com/city/{city-slug} (e.g. /city/boston-massachusetts).

## API (no authentication, JSON, CORS-open)

- [Capabilities catalog](https://clinicaltrialmatch.com/api/v1/capabilities): machine-readable list of every
  search filter with types, enum values, and examples. Start here.
- [OpenAPI 3.1 spec](https://clinicaltrialmatch.com/openapi.json): full schema for all endpoints.
- [Interactive docs](https://clinicaltrialmatch.com/docs): Swagger UI.

### Endpoints

- `GET /api/v1/trials` — search. Key filters: `q` (full text), `condition`, `biomarker`,
  `status` (e.g. RECRUITING), `phase` (0-4), `sex` (m|f), `age_years`, `healthy_volunteers`,
  `study_type`, `sponsor`, `registry`, `lat`+`lng`+`radius_miles` (geographic),
  `updated_since`, `has_results`, `sort` (relevance|updated|distance|enrollment),
  cursor pagination via `page_token`.
- `GET /api/v1/trials/{trial_id}` — full record: sites with coordinates, structured
  eligibility, cross-registry ids.
- `GET /api/v1/trials/{trial_id}/eligibility` — structured eligibility only, including
  participation details (placebo possibility, visit frequency, time commitment).
- `GET /api/v1/conditions/suggest?q=` — condition-name autocomplete with trial counts.
- `GET /api/v1/conditions/{slug}` / `GET /api/v1/cities/{slug}` — landing-page stats.
- `GET /api/v1/stats` — database counts by source registry.

### MCP

A Model Context Protocol server is available at `https://clinicaltrialmatch.com/mcp` (streamable HTTP)
exposing `search_trials`, `get_trial`, and `get_eligibility` tools.

### Example

`GET https://clinicaltrialmatch.com/api/v1/trials?condition=breast%20cancer&status=RECRUITING&lat=40.71&lng=-74.01&radius_miles=50`

## Data sources and freshness

- ClinicalTrials.gov v2 API: daily incremental sync (all statuses).
- EU CTIS: weekly sweep, records linked to NCT ids where cross-referenced.
- WHO ICTRP export: manual import of registries not covered directly.
- Eligibility structuring: LLM extraction with a versioned prompt/schema, run continuously on
  new and changed trials; original registry text is always included alongside.

Data is public registry information; verify eligibility with the study team before acting on it.
Rate limit: 120 requests/minute per IP.
