SNPedia APIsnpedia.com ↗
Access SNPedia's human genetics database via API. Retrieve SNPs, genotypes, genes, medical conditions, and medicines with 5 structured endpoints.
What is the SNPedia API?
The SNPedia API exposes 5 endpoints covering the full breadth of SNPedia's human genetics wiki, from paginated SNP listings to per-variant detail pages. The get_snp endpoint returns genomic coordinates, associated genes, chromosome orientation, and all known genotypes for a given rsID. Other endpoints cover genotype-level properties, category browsing across genes and medical conditions, and full-text search across all SNPedia content.
curl -X GET 'https://api.parse.bot/scraper/8273ceb4-f6c9-4d1c-8218-1204790dd5f5/list_snps?limit=5' \ -H 'X-API-Key: $PARSE_API_KEY'
Typed, relational, agent-ready
A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.
- Fully typed · autocompletes
- Objects link to objects
- Typed errors & pagination
Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:
uv add parse-sdk uv run parse init uv run parse add --marketplace snpedia-com-api
uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.
from parse_apis.snpedia_api import SNPedia, Snp, SnpSummary, GenotypeInfo, Genotype, CategoryMember, Hit, ResourceNotFound
snpedia = SNPedia()
# Search for pages related to a genetic condition
for hit in snpedia.hits.search(query="sickle cell", limit=5):
print(hit.title, hit.pageid, hit.wordcount)
# Get detailed SNP data by RSID
snp = snpedia.snps.get(rsid="rs334")
print(snp.title, snp.gene, snp.chromosome, snp.position, snp.orientation)
# Navigate from SNP to its genotypes and get full details
for geno_info in snp.genotypes:
print(geno_info.title, geno_info.magnitude, geno_info.repute)
full_genotype = geno_info.details()
print(full_genotype.allele1, full_genotype.allele2, full_genotype.rsnum)
# List SNPs from the catalog with pagination
for snp_summary in snpedia.snpsummaries.list(limit=10):
print(snp_summary.title, snp_summary.pageid)
detail = snp_summary.details()
print(detail.url, detail.gene)
# List members of a specific category
for member in snpedia.categorymembers.list(category="Is_a_gene", limit=5):
print(member.title, member.pageid)
# Direct genotype lookup
genotype = snpedia.genotypes.get(title="Rs334(A;A)")
print(genotype.title, genotype.allele1, genotype.allele2, genotype.summary)
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.
| Param | Type | Description |
|---|---|---|
| limit | integer | Max results per page. |
| continue | string | Continue token for pagination, obtained from a previous response's continue field. |
{
"type": "object",
"fields": {
"snps": "array of objects with pageid (integer), ns (integer), and title (string) fields",
"continue": "string pagination token or null if no more results"
},
"sample": {
"data": {
"snps": [
{
"ns": 0,
"title": "I1000001",
"pageid": 10244
},
{
"ns": 0,
"title": "I1000003",
"pageid": 13450
}
],
"continue": "page|4933303030303037|19671"
},
"status": "success"
}
}About the SNPedia API
SNP and Genotype Data
The get_snp endpoint accepts an rsID (case-insensitive, e.g. rs334 or Rs334) and returns the canonical SNP title, chromosome identifiers, numeric chromosome positions, strand orientation, associated gene names, and a genotypes array. Each genotype object in that array includes the genotype string, magnitude score, repute classification, and a human-readable summary. The get_genotype endpoint goes one level deeper, accepting a full genotype page title like Rs334(A;A) and returning individual alleles (allele1, allele2), magnitude, repute, summary, and the parent rsID.
Listing and Browsing Categories
list_snps paginates the full Is_a_snp category, returning pageid, ns, and title for each SNP page. Pagination is cursor-based: each response includes a continue token that you pass back to retrieve the next page, or null when the list is exhausted. The list_category endpoint generalizes this pattern to any SNPedia category — pass Is_a_gene, Is_a_medical_condition, Is_a_medicine, or Is_a_genoset in the category parameter to enumerate those collections with the same paginated response shape.
Full-Text Search
The search endpoint accepts a query string and returns a hits array of matching pages. Each hit includes title, pageid, snippet (a text excerpt), size, wordcount, and timestamp. The total field indicates the overall result count; pagination uses a numeric offset parameter drawn from the previous response's continue field rather than an opaque token, making it straightforward to page through large result sets programmatically.
The SNPedia API is a managed, monitored endpoint for snpedia.com — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when snpedia.com changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.
This isn't an official snpedia.com API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.
Will this API break when the source site changes?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- Build a variant annotation tool that maps rsIDs to chromosome positions, genes, and strand orientation using
get_snp. - Enumerate all SNPedia gene pages via
list_categorywithIs_a_geneto build a reference index of covered loci. - Retrieve magnitude and repute scores for specific genotypes via
get_genotypeto power a personal genomics interpretation layer. - Cross-reference medical conditions from
Is_a_medical_conditioncategory members against SNP summaries for a disease-variant lookup. - Search SNPedia content by keyword using the
searchendpoint to surface relevant variant pages for a given trait or condition name. - Page through the complete SNP catalog with
list_snpsand cursor-based pagination to seed a local genetics database. - Map medicine names from
Is_a_medicinecategory listings to associated SNPs for pharmacogenomics research workflows.
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 100 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does SNPedia have an official developer API?+
genotypes, magnitude, repute, and chromosome without that overhead.What does `get_snp` return beyond basic rsID metadata?+
genotypes array for the SNP, where each object includes the genotype string, a numeric magnitude value, a repute label (e.g. Good, Bad), and a plain-text summary. It also returns chromosome, position, orientation, gene, and a direct url to the SNP page.Does the API return genoset or haplotype data beyond individual SNPs?+
list_category endpoint can enumerate pages in the Is_a_genoset category, returning page titles and IDs. Detailed structured data for genosets (e.g. combined SNP rules, genoset summaries) is not returned by a dedicated endpoint currently. You can fork the API on Parse and revise it to add a get_genoset endpoint covering those fields.How does pagination work across the listing and search endpoints?+
list_snps and list_category use an opaque cursor string: pass the continue value from one response as the continue input on the next call. The search endpoint uses a numeric offset instead. All three return null in the continue field when no further results exist.Does the API cover population frequency data or clinical significance scores for variants?+
magnitude and repute fields, plus free-text summary values. You can fork the API on Parse and revise it to integrate a population frequency source as an additional endpoint.