# Structural Variants API
> Human genomic structural variation as an API — powered by NCBI dbVar, the archive of structural variants (SVs): copy-number variants (CNVs), large deletions, duplications, insertions, inversions and translocations, typically larger than 50 base pairs. This is the structural counterpart to single-nucleotide variant databases: search structural variants overlapping a gene (or by free text) and get each variant's dbVar accession, the study it came from, its type, the genes it overlaps, its genomic placement on GRCh38 and its clinical significance; then look up any variant for the full record — placements on both GRCh37 and GRCh38 assemblies, variant type, genes, clinical significance, study type, methods and variant counts. From BRCA1 CNVs to Cri-du-chat deletions, it is ideal for genomics, cytogenetics, rare-disease and bioinformatics work. A structural-variation / CNV resource — distinct from clinical single-nucleotide variant interpretation (ClinVar), population allele frequencies (gnomAD) and trait associations (GWAS). Open data from NCBI dbVar (public domain).

## Authentication
All requests require your oanor API key in the `x-oanor-key` header. Get one at https://www.oanor.com/developer/keys.

```bash
curl -H "x-oanor-key: oanor_live_…" "https://api.oanor.com/dbvar-api/..."
```

## Pricing
- **Free** (Free) — 2,280 calls/Mo, 2 req/s
- **Starter** ($6/Mo) — 45,500 calls/Mo, 8 req/s
- **Pro** ($21/Mo) — 228,000 calls/Mo, 20 req/s
- **Mega** ($57/Mo) — 830,000 calls/Mo, 50 req/s

## Endpoints

### Structural Variants

#### `GET /v1/search` — Search structural variants by gene or text

**Parameters:**
- `gene` (query, optional, string) — Gene symbol Example: `BRCA1`
- `q` (query, optional, string) — Free-text query (alternative to gene)
- `limit` (query, optional, string) — Max results (1-100, default 20)

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/dbvar-api/v1/search?gene=BRCA1"
```

#### `GET /v1/variant` — A structural variant's full record

**Parameters:**
- `id` (query, optional, string) — A dbVar accession (from /v1/search) Example: `nsv7897183`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/dbvar-api/v1/variant?id=nsv7897183"
```

### Meta

#### `GET /v1/meta` — Endpoint catalogue & notes

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/dbvar-api/v1/meta"
```


---
Marketplace page: https://www.oanor.com/api/dbvar-api
OpenAPI spec: https://www.oanor.com/api/dbvar-api/openapi.json
