# Search ClinicalTrials.gov

Search and read ClinicalTrials.gov records through the Assyro API: registered studies, cited by NCT number.

Source: https://www.assyro.com/docs/sources/clinicaltrials

`GET https://api.assyro.com/v1/sources/clinicaltrials/search`

> **Note:** Preview: `api.assyro.com` is not serving production data yet. This page follows the API's published description and may change before launch.

Search and read ClinicalTrials.gov records from your own code: registered studies, cited by NCT number. Published by U.S. National Library of Medicine (ClinicalTrials.gov) ([clinicaltrials.gov](https://clinicaltrials.gov/)); answered from Assyro's copy, refreshed daily 13:40 UTC.

> **Warning:** Attribution required: every record carries `attribution`. Show it wherever you show the data: "Source: ClinicalTrials.gov, a service of the U.S. National Library of Medicine; data as processed by ClinicalTrials.gov on the date in `version`. Reformatted by Assyro, content not modified." See the [terms](https://clinicaltrials.gov/about-site/terms-conditions).

Example: "Which phase 3 trials tested tirzepatide in obesity?"

## Search

`GET https://api.assyro.com/v1/sources/clinicaltrials/search` with any of these query parameters. Repeat a parameter for a list (`?phase=PHASE2&phase=PHASE3`). An unknown parameter is refused by name.

### Search parameters

| Field | Type | Required | Description |
|---|---|---|---|
| `query` | string | no | Free text searched across the whole record, e.g. "semaglutide cardiovascular outcomes". |
| `condition` | string | no | Disease or condition, e.g. "obesity", "non-small cell lung cancer". |
| `conditions` | string[] | no | Several conditions at once, up to 5: one search per condition, run together, with every other filter applied to each (e.g. tirzepatide in ["heart failure", "sleep apnea", "MASH"]). Use it instead of searching one condition per step. |
| `intervention` | string | no | Drug, device, biologic or procedure name, e.g. "tirzepatide". |
| `interventions` | string[] | no | Several interventions at once, up to 5: one search per intervention, run together, with every other filter applied to each. |
| `sponsor` | string | no | Lead sponsor or collaborator, e.g. "Novo Nordisk". |
| `phase` | string[] | no | Keep studies in any of these phases. NA means phase not applicable (e.g. device or behavioural). One of: `EARLY_PHASE1`, `PHASE1`, `PHASE2`, `PHASE3`, `PHASE4`, `NA`. |
| `status` | string[] | no | Keep studies with any of these overall recruitment statuses. |
| `studyType` | string | no | Keep one study type. One of: `INTERVENTIONAL`, `OBSERVATIONAL`, `EXPANDED_ACCESS`. |
| `startDateFrom` | string | no | Earliest study start date, YYYY-MM-DD. |
| `startDateTo` | string | no | Latest study start date, YYYY-MM-DD. |
| `hasResults` | boolean | no | true keeps only studies with results posted on ClinicalTrials.gov; false keeps only those without. |
| `sort` | string | no | relevance (default; most recently updated first when no text is given) or newest (most recently updated first, even with text). One of: `relevance`, `newest`. |
| `limit` | integer | no | Number of studies to return (default 8). |
| `offset` | integer | no | Skip this many results (for paging), default 0. |

Each result is a record; read one in full with [Get a record](https://www.assyro.com/docs/sources/clinicaltrials/records).

## What a record holds

- `id`, `title`, `url`: the source's identifier, its title and its page at the source, to verify it.
- `authority`, `publishedDate`, `version`: who published it, when, and the edition read.
- `snippet` and `fields`: the matching text and the source's own fields.
- `asOf`: the day Assyro's copy of the source was read.
- `attribution`: the attribution the licence requires.

## Example request

curl:

```bash
curl "https://api.assyro.com/v1/sources/clinicaltrials/search?intervention=tirzepatide&condition=obesity&phase=PHASE3"
```

Python:

```python
import requests

response = requests.get(
    "https://api.assyro.com/v1/sources/clinicaltrials/search",
    params={
        "intervention": "tirzepatide",
        "condition": "obesity",
        "phase": [
            "PHASE3"
        ]
    },
)
response.raise_for_status()
print(response.json())
```

JavaScript:

```javascript
const response = await fetch("https://api.assyro.com/v1/sources/clinicaltrials/search?intervention=tirzepatide&condition=obesity&phase=PHASE3");
const result = await response.json();
```
