# Snpedia — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Search and retrieve detailed genetic information including SNPs, genotypes, genes, medical conditions, and medicines from SNPedia's human genetics database. Look up specific genetic variants, explore how different gene combinations affect health outcomes, and discover connections between genetic data and medical treatments.

**Category:** Healthcare | **Website:** [snpedia.com/](https://snpedia.com/) | **Docs:** [parse.bot/marketplace/ad229b45-28d9-4cf6-801b-03ae435d5d00/snpedia-com-api](https://parse.bot/marketplace/ad229b45-28d9-4cf6-801b-03ae435d5d00/snpedia-com-api)

Pay-per-use API proxy. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-snpedia-com-api-ad229b45/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_genotype

Get detailed properties for a specific genotype page, including alleles, magnitude, repute, summary, and associated SNP. Genotype titles follow the format Rs<number>(<allele1>;<allele2>). Returns stale_input if the genotype page does not exist.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `title` | string | Yes | The title of the genotype page (e.g. Rs334(A;A)). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-snpedia-com-api-ad229b45/get_genotype \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"title":"<string>"}'
```

### get_snp

Retrieve detailed data for a specific SNP, including its genomic location, associated gene, orientation, and list of possible genotypes with their summaries. The rsid is case-insensitive (e.g. rs334 or Rs334). Returns stale_input if the SNP does not exist.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `rsid` | string | Yes | The RSID of the SNP (e.g. rs334 or Rs334). Case-insensitive prefix. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-snpedia-com-api-ad229b45/get_snp \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"rsid":"<string>"}'
```

### list_category

List members of any SNPedia category. Common categories include Is_a_gene, Is_a_medical_condition, Is_a_medicine, and Is_a_genoset. Each page returns up to `limit` results; use the returned continue token to fetch subsequent pages.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `category` | string | Yes | The category name (e.g. Is_a_gene, Is_a_medical_condition, Is_a_medicine, Is_a_genoset). |
| `continue` | string | No | Continue token for pagination, obtained from a previous response's continue field. |
| `limit` | integer | No | Max results per page. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-snpedia-com-api-ad229b45/list_category \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"category":"<string>","continue":"<string>","limit":"<integer>"}'
```

### list_snps

List all SNPs in SNPedia using pagination. Returns a list of page titles and IDs from the Is_a_snp category. Each page returns up to `limit` results; use the returned continue token to fetch subsequent pages.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `continue` | string | No | Continue token for pagination, obtained from a previous response's continue field. |
| `limit` | integer | No | Max results per page. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-snpedia-com-api-ad229b45/list_snps \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"continue":"<string>","limit":"<integer>"}'
```

### search

Full-text search across all SNPedia content. Returns matching pages with snippets and metadata. The offset parameter controls pagination; total indicates how many matching results exist overall.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `limit` | integer | No | Max results per page. |
| `offset` | integer | No | Offset for pagination, obtained from a previous response's continue field. |
| `query` | string | Yes | Search keywords. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-snpedia-com-api-ad229b45/search \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"limit":"<integer>","offset":"<integer>","query":"<string>"}'
```
