# 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 for Locus Pro. Each call burns credits from your workspace balance.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/credits/snpedia/`
**Auth:** `Authorization: Bearer <LOCUS_CREDITS_SECRET_KEY>` (an `lcr_` secret key or a scoped `lcac_` agent credential)
**Required header:** `Idempotency-Key: <fresh UUID per call>`. A retry with the same key replays the stored result without a new charge.
**Response:** the provider response after any endpoint-specific normalization. `X-Locus-Credits-Charged` carries the charge and `X-Locus-Credits-Balance` the remaining balance. Insufficient credits return `402` before the provider is called.
**Pricing:** estimated costs below are USD. Locus debits the credit equivalent at your workspace rate.

Full call contract: https://docs.paywithlocus.com/api-reference/introduction

> Using a Pay With Locus wallet key (`claw_` prefix)? Wallet routes are documented separately: https://docs.paywithlocus.com/wrapped-apis/for-agents

## 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/credits/snpedia/get-genotype \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/snpedia/get-snp \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/snpedia/list-category \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/snpedia/list-snps \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/snpedia/search \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"limit":"<integer>","offset":"<integer>","query":"<string>"}'
```

## Next steps

- [All wrapped API providers](https://paywithlocus.com/wapi/index.md): pick another provider.
- [Find and call tools](https://paywithlocus.com/agent/tools.md): price ceilings, async results, and errors.
- [Credits and billing](https://paywithlocus.com/agent/billing.md): what a call costs and how to add credits.
- [Agent docs index](https://paywithlocus.com/agent/index.md): every Locus agent page.