# Search ClinVar

Search and read ClinVar records through the Assyro API: human genetic variants: ClinVar's aggregate germline classification (pathogenic to benign…

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

`GET https://api.assyro.com/v1/sources/clinvar/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 ClinVar records from your own code: human genetic variants: ClinVar's aggregate germline classification (pathogenic to benign, conflicting), review status stars, date last evaluated, genes, conditions, dbSNP ids, RCV accessions, somatic clinical impact and oncogenicity. Published by National Center for Biotechnology Information (NLM, NIH) ([www.ncbi.nlm.nih.gov/clinvar](https://www.ncbi.nlm.nih.gov/clinvar/)); answered from Assyro's copy, refreshed weekly Tuesday 07:20 UTC.

> **Warning:** Attribution required: every record carries `attribution`. Show it wherever you show the data: "Source: ClinVar, National Center for Biotechnology Information (NCBI), U.S. National Library of Medicine (https://www.ncbi.nlm.nih.gov/clinvar/)." See the [terms](https://www.ncbi.nlm.nih.gov/home/about/policies/).

Example: "Which BRCA1 variants has an expert panel classified as pathogenic?"

## Search

`GET https://api.assyro.com/v1/sources/clinvar/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 | Words in the variant name, gene, conditions or identifiers, e.g. "CFTR cystic fibrosis". |
| `gene` | string | no | An HGNC gene symbol, e.g. "BRCA1". |
| `condition` | string | no | A condition name or part of one, e.g. "Lynch syndrome". |
| `variant` | string | no | Part of the variant's HGVS name, in order, e.g. "c.68_69del" or "p.Arg1699Trp". |
| `clinicalSignificance` | string | no | Keep variants whose aggregate germline classification includes this term. |
| `minReviewStars` | integer | no | Keep variants with at least this many review status stars (2: multiple submitters, no conflicts). |
| `rsId` | string | no | A dbSNP id, e.g. "rs80357914". |
| `evaluatedFrom` | string | no | Last evaluated on or after this date (YYYY-MM-DD). |
| `evaluatedTo` | string | no | Last evaluated on or before this date (YYYY-MM-DD). |
| `limit` | integer | no | Variants 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/clinvar/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/clinvar/search?gene=BRCA1&clinicalSignificance=pathogenic&minReviewStars=3"
```

Python:

```python
import requests

response = requests.get(
    "https://api.assyro.com/v1/sources/clinvar/search",
    params={
        "gene": "BRCA1",
        "clinicalSignificance": "pathogenic",
        "minReviewStars": 3
    },
)
response.raise_for_status()
print(response.json())
```

JavaScript:

```javascript
const response = await fetch("https://api.assyro.com/v1/sources/clinvar/search?gene=BRCA1&clinicalSignificance=pathogenic&minReviewStars=3");
const result = await response.json();
```
