The Short Answer
No. 23andMe switched off third-party access to its API in 2018, and there is no public 23andMe API you can sign up for in 2026. The supported route is the raw data file the customer downloads from their own account, and every tool that reads 23andMe data today, from pandas to PLINK to bcftools to the Python package snps, starts from that file. This page shows how to read it in Python, and how an AncestryDNA file differs.
TL;DR:
- Don't build on
api.23andme.com: it no longer serves the genetic endpoints.- Ask the user for their raw data download (a
.zipwith agenome…txtinside).- Parse four columns: marker, chromosome, position, genotype. In pandas that is
pd.read_csv(path, sep="\t", comment="#", header=None, names=[...], dtype=str). Positions are GRCh37, so remap before joining against GRCh38 data.- Treat
--as "no call", and expect single-letter genotypes on X, Y and MT and marker IDs that start withi.
23andMe told developers in August 2018 that it was turning off third-party access to genetic data. Today the host redirects to the company's main site and the old documentation paths return 404, which you can check yourself:
# 302: the host redirects away
curl -sI https://api.23andme.com/ | head -1
# 404: the old API reference is gone
curl -s -o /dev/null -w "%{http_code}\n" \
https://api.23andme.com/docs/v1_reference/
Checked 14 November 2026: the first command returned HTTP/2 302 with location: https://www.23andme.org/, and the second printed 404.
What Happened to the 23andMe API
23andMe opened its API to developers in September 2012. It was an OAuth 2.0 API: an app asked the customer for permission, then read their data on their behalf. The v1 reference, by then already marked deprecated, listed endpoints such as /1/genotypes, /1/genomes, /1/haplogroups and /1/ancestry. The /genomes endpoint returned the customer's whole genotype as one packed string of roughly 2 MB. A later v3 reorganised this around /3/marker, /3/variant and /3/report.
On 23 August 2018 23andMe told developers it would disable that access within two weeks. From then on, third-party apps could no longer pull a customer's raw genotypes; research partnerships kept their own arrangements. An archived copy of the developer portal from January 2023 says access is granted only through a developer arrangement and points to a business-development address.
Two events since then make it unlikely to come back in its old form:
- The 2023 breach. Attackers used reused passwords to get into about 14,000 accounts and, through the DNA Relatives feature, reached data on about 6.9 million people. The UK Information Commissioner's Office later fined the company £2.31 million.
- The bankruptcy and sale. 23andMe filed for Chapter 11 in March 2025, and in July 2025 the company was sold to TTAM Research Institute, a nonprofit led by co-founder Anne Wojcicki. We found no public developer programme under the new owner.
The open-data side shrank too. openSNP, where people published their own 23andMe files for researchers, shut down on 30 April 2025 and deleted its data, citing the bankruptcy among its reasons.
So if a tutorial, a GitHub repo or an LLM tells you to register an app at api.23andme.com, it is describing something that hasn't existed for years.
The Replacement: the Raw Data File
The customer downloads their own data and hands it to your software. 23andMe's help page describes the route: in the account, Browse Raw Genotyping Data, then Download, with a date-of-birth confirmation. Preparing the file "usually takes about one week but can sometimes take up to thirty days". What arrives is a .zip holding a text file whose name starts with genome.
This changes your product more than your code. With the API, consent was an OAuth screen and the data arrived in seconds. With the file, the user has to request it, wait up to a month, and then upload it to you. Build the wait into the onboarding (the steps are in our guide to 23andMe raw data), and tell the user exactly which file to send you, because people often upload the .zip, a screenshot or a PDF report instead.
It also changes your responsibility. The file is the user's whole genotype, and once they upload it you are the one holding it. Keep only what your feature needs, and delete the upload once you've parsed it.
What's in the File
Each data line has four fields: a marker name, a chromosome, a position and a genotype. Lines starting with # are a comment header to skip. Here is a synthetic example we made with the same shape (the parser below splits on any whitespace, so it doesn't depend on the exact separator):
# This data file generated by 23andMe at: Sun Oct 11 12:00:00 2026
#
# rsid chromosome position genotype
rs4244285 10 96541616 AG
rs1801133 1 11856378 AG
rs429358 19 45411941 TT
rs7412 19 45412079 --
i5000100 X 2700157 A
i5000200 Y 2655180 G
i5000300 MT 16519 C
The i… rows are made up for illustration; the rs rows use real GRCh37 positions. Four details in that file break naive parsers, all of them documented by 23andMe itself:
- Positions are GRCh37 on the plus strand. 23andMe's reference genome page says so. Most current databases and pipelines use GRCh38, where the same variant sits at a different coordinate. rs4244285 is at
10:96541616in GRCh37 and10:94781859in GRCh38. If you join on chromosome and position without remapping, you'll match the wrong variant without any error. - Not every marker has an rsID. Markers without a clear rsID get an internal ID that starts with
i. A filter likestartswith("rs")silently throws them away. --means no call. 23andMe uses it when it couldn't determine the genotype, and also for some insertion and deletion markers. It is not a genotype, and it isn't the reference allele either.- Some genotypes have one letter. Mitochondrial calls, and most X and Y calls in men, are reported with a single allele. Code that assumes every genotype has two characters will either crash or invent a second allele.
Which markers a file contains depends on the chip the customer was genotyped on. 23andMe's own chip documentation lists four generations, from about 560,000 variants on v2 to the current v5, built on Illumina's Global Screening Array with about 654,000 preselected variants plus about 50,000 custom ones. Two customers' files won't contain the same set of markers, so check that a marker is present before you report on it.
Reading It With pandas
If pandas is already in your project, one call reads the file. The file is tab-separated, the header is made of # comment lines, and there is no column-name row outside the comments, so you pass the four names yourself:
import pandas as pd
df = pd.read_csv(
"genome_synthetic.txt",
sep="\t",
comment="#",
header=None,
names=["rsid", "chromosome", "position", "genotype"],
dtype=str,
)
print(len(df)) # 7
print(df["chromosome"].tolist()) # ['10', '1', '19', '19', 'X', 'Y', 'MT']
print(df["genotype"].tolist()) # ['AG', 'AG', 'TT', '--', 'A', 'G', 'C']
print(df[~df["rsid"].str.startswith("rs")]["rsid"].tolist())
# ['i5000100', 'i5000200', 'i5000300']
calls = df[df["genotype"] != "--"].set_index("rsid")
print(len(calls)) # 6
print(calls.loc["rs4244285"].to_dict())
# {'chromosome': '10', 'position': '96541616', 'genotype': 'AG'}
We ran this on 14 November 2026 against the synthetic file above, with Python 3.11.9 and pandas 3.0.1; the comments are the output it printed. dtype=str tells pandas to keep every column as text, so X, Y and MT stay as they are, -- stays a visible no-call until you filter it, and the single-letter calls keep one letter. The price is that position is also a string ('96541616'), so convert it before doing arithmetic or joining on it. In the same run, the same call read a .zip holding that one text file and returned the same seven rows; the pandas documentation says a ZIP must contain only one data file for this to work.
What pandas does not do is check anything. It will read a file from another provider, or a truncated one, without complaint, and the columns can come out shifted and wrong. The reader in the next section is for when you want the wrong file to fail.
Parsing It in Plain Python
This reader has no dependencies and refuses to guess. It keeps the i IDs, stores no-calls as an empty string, keeps haploid calls as they are, and fails loudly on anything that isn't four columns or a known chromosome, which is how you find out a user uploaded the wrong file:
from dataclasses import dataclass
from pathlib import Path
VALID_CHROMS = {str(n) for n in range(1, 23)} | {"X", "Y", "MT"}
@dataclass(frozen=True)
class Call:
marker: str # rsID, or a 23andMe internal ID starting with "i"
chrom: str
pos: int # GRCh37 coordinate
genotype: str # "AG", "T" (haploid) or "" (no-call)
def read_23andme(path: str | Path) -> list[Call]:
calls = []
with open(path, encoding="utf-8") as fh:
for n, line in enumerate(fh, 1):
if line.startswith("#") or not line.strip():
continue
fields = line.split()
if len(fields) != 4:
raise ValueError(f"line {n}: expected 4 columns, got {len(fields)}")
marker, chrom, pos, gt = fields
if chrom not in VALID_CHROMS:
raise ValueError(f"line {n}: unknown chromosome {chrom!r}")
calls.append(Call(marker, chrom, int(pos), "" if gt == "--" else gt))
if not calls:
raise ValueError("no genotype rows: is this really a 23andMe file?")
return calls
On the synthetic file above it returns seven calls. Four are rsIDs, one of them a no-call (rs7412); the other three are the i rows, which are also the three single-letter calls. On the CYP2C19 row it gives Call(marker='rs4244285', chrom='10', pos=96541616, genotype='AG').
If you take uploads, add two more checks before trusting the result: unzip the .zip yourself rather than asking the user to, and look for 23andMe's own first comment line, since an AncestryDNA or MyHeritage file can also have four or five columns.
Reading an AncestryDNA File
An AncestryDNA raw file has the same idea and a different layout: five tab-separated columns instead of four, with the genotype split in two. The columns are rsid, chromosome, position, allele1 and allele2, and after the # comment lines there is a row with those column names. This synthetic file has that shape:
#AncestryDNA raw data download
#Data is formatted as: rsid, chromosome, position, allele1, allele2
rsid chromosome position allele1 allele2
rs4244285 10 96541616 A G
rs1801133 1 11856378 A G
rs429358 19 45411941 T T
rs7412 19 45412079 0 0
rs5000100 23 2700157 A A
rs5000300 26 16519 C C
The rs5000100 and rs5000300 rows are made up for illustration.
Two conventions differ from 23andMe, and we take both from the AncestryDNA reader in the snps source rather than from a real file: that reader treats 0 as a missing allele, and renames chromosomes 23, 24, 25 and 26 to X, Y, PAR and MT. With pandas, the column-name row becomes the header, and you join the two alleles yourself:
import pandas as pd
df = pd.read_csv("ancestry_synthetic.txt", sep="\t", comment="#", dtype=str)
print(df.columns.tolist())
# ['rsid', 'chromosome', 'position', 'allele1', 'allele2']
df["genotype"] = df["allele1"] + df["allele2"]
df["chromosome"] = df["chromosome"].replace(
{"23": "X", "24": "Y", "25": "PAR", "26": "MT"}
)
print(df["chromosome"].tolist()) # ['10', '1', '19', '19', 'X', 'MT']
print(df["genotype"].tolist()) # ['AG', 'AG', 'TT', '00', 'AA', 'CC']
calls = df[~df["genotype"].str.contains("0", na=True)].set_index("rsid") # drop any row with a missing allele
print(len(calls)) # 5
print(calls.loc["rs4244285", "genotype"]) # AG
Also run on 14 November 2026, on the synthetic file above and on a copy with a longer comment header and Windows line endings, with the same output; the comments are what it printed. Note what the output shows: a no-call arrives as 00, not --, and the X-chromosome row comes out with two letters (AA) because the file has two allele columns, where the 23andMe file above had one letter. We tested only this synthetic file, not a real AncestryDNA download, so check the header and the chromosome codes of the file you actually receive. The plain-Python reader above is written for 23andMe and rejected this file at the column-name row with line 3: expected 4 columns, got 5.
Remapping to GRCh38 With snps
For anything beyond reading the file, the open-source snps package (version 2.12.1, actively maintained) already handles the format. It recognises 23andMe files, detects the build, and remaps coordinates using Ensembl's assembly mappings:
from snps import SNPs
s = SNPs("genome_synthetic.txt")
print(s.source, s.build, s.count) # 23andMe 37 7
s.remap(38) # downloads Ensembl mapping data
print(s.snps.loc["rs4244285"].to_dict())
# {'chrom': '10', 'pos': 94781859, 'genotype': 'AG'}
We ran this on 11 October 2026, and the GRCh38 position it returns matches Ensembl's record for rs4244285. The no-call on rs7412 comes back as NaN, so filter it out before you count genotypes. remap needs network access the first time it runs. If your machine sits behind a proxy that rewrites TLS certificates, point SSL_CERT_FILE at a certificate bundle such as certifi's.
snps can also write a VCF, and so can bcftools, whose manual uses a 23andMe file as the example for convert --tsv2vcf. Both need a GRCh37 reference to fill in reference alleles, and neither turns the file into an interpretation. A VCF of 650,000 genotypes still says nothing about what a single one of them means.
Which Tool to Use
Each cell below comes from the tool's own documentation, linked in the first column, and "not described" means that documentation says nothing on the point. The second row is the reader on this page, described from its own code.
| Tool | Install | What it reads | Detects the format or build | VCF export | Remap to GRCh38 |
|---|---|---|---|---|---|
pandas read_csv |
pip install pandas |
Any delimited text file; skips lines that start with the comment character; reads .gz and single-file .zip |
Not described | Not described | Not described |
| The plain reader on this page | Nothing: standard library only | The 23andMe four-column text file | No: raises an error on anything that isn't four columns or a known chromosome | No | No |
snps |
pip install snps (Python 3.9+; needs numpy and pandas) |
23andMe, Ancestry, MyHeritage and other providers' raw files, VCF, and generic CSV and TSV; files, bytes, gzip or zip |
Yes: detects the source and the build (36, 37 or 38) | Yes: to_vcf, which downloads reference sequences |
Yes: remap(38) |
arv |
pip install arv (builds from source; needs a C++11 compiler) |
Raw 23andMe text files, unzipped; lookup by rsID | Not described | Not described | Not described |
bcftools convert --tsv2vcf |
Built from source with git clone and make |
Tab- or space-delimited text "such as generated by 23andMe"; you name the columns with -c |
Not described | Yes: VCF or BCF, given an indexed reference FASTA; SNPs only; insertions and deletions are skipped | Not described |
Two dates help when choosing. PyPI lists snps 2.12.1 as released on 28 January 2026, and the latest arv, 0.9.2, as released on 29 March 2017. And one caveat applies to every row: all of these tools read or convert genotypes, and none of them says what a genotype means.
What the File Doesn't Give You
The old API returned some interpretation alongside the genotypes, such as haplogroups and ancestry composition. The raw file contains only the genotypes, so everything else is now your job.
The file says AG, but whether A is the allele that matters, and on which strand the literature reports it, has to come from ClinVar, dbSNP or a curated source. The call itself is reliable for common variants and much less so for rare ones: a 2021 study in the BMJ compared SNP chip calls with sequencing in about 50,000 UK Biobank participants: for variants rarer than 0.001%, only 16% of the heterozygous calls from the chips were confirmed by sequencing. A rare, alarming call from a consumer chip needs a clinical test before anyone acts on it. And a marker that isn't on the chip is not a negative result.
If your code is an AI agent, this is also where it is most likely to go wrong: asked what rs4244285 AG means, a model will answer from memory. Giving it a lookup tool with cited sources is safer than trusting recall. To turn an rsID into a cited meaning, GET https://deepdna.ai/api/v1/variants/rs4244285 (free, no key) returns the curated record, and the same record is available as an MCP tool at https://deepdna.ai/mcp; the setup steps are on the connect page.
Where DeepDNA Fits
DeepDNA, which is not affiliated with 23andMe, runs free knowledge endpoints with no key. They cover 17 genes today, mostly pharmacogenes plus a few of the most-searched nutrition and risk genes. Each record cites its sources:
curl -s https://deepdna.ai/api/v1/variants/rs4244285
That returns the CYP2C19 *2 record: what the A allele does, a reading block with the reference and variant alleles on the plus strand of GRCh37 (the orientation of the file you just parsed), a short note on population frequency, and links to the CPIC and PharmVar pages it was written from. The same lookups are exposed as a remote MCP server at https://deepdna.ai/mcp, so an agent can call them as tools. The request carries an rsID or a gene name, never a genotype or a file.
Parsing files is a different matter. DeepDNA doesn't parse files on its servers: there is no endpoint to send a raw file to. The reader above and snps are the honest answer, and if your agent speaks MCP, the free local package deepdna-mcp reads a raw file on your own computer and sends DeepDNA nothing from it. The API docs list what is live, and for a worked example that goes from a raw file to marker counts and the CPIC guidance for each phenotype group, see CYP2C19 and SLCO1B1 from a raw DNA file in Python.
Frequently Asked Questions
Does 23andMe have an API in 2026?
No, not one you can use. 23andMe turned off third-party access to genetic data in 2018, by 2023 access required a direct business arrangement, and when we checked on 14 November 2026 api.23andme.com still redirected away from the old developer site. The supported way to get a customer's genotypes is the raw data file they download themselves.
How do I read 23andMe raw data in Python?
Ask the user for their raw data download and parse the text file inside the .zip: skip the # comment lines and read four columns, marker, chromosome, position and genotype. You can do it with pandas, with the dependency-free reader on this page, or with the snps package, which also detects the build and remaps to GRCh38.
Can pandas read a 23andMe file?
Yes. pd.read_csv(path, sep="\t", comment="#", header=None, names=["rsid", "chromosome", "position", "genotype"], dtype=str) read our synthetic file on 14 November 2026 with pandas 3.0.1. dtype=str keeps X, MT, -- and single-letter genotypes as text. pandas does not check that the file really is a 23andMe file, and it knows nothing about builds.
How is an AncestryDNA raw file different?
It has five columns instead of four: rsid, chromosome, position, allele1 and allele2, with a column-name row after the # comments. You join the two alleles to get a genotype. The snps reader treats 0 as a missing allele and maps chromosomes 23, 24, 25 and 26 to X, Y, PAR and MT, so a parser written for 23andMe needs those changes.
When did the 23andMe API shut down?
23andMe told developers on 23 August 2018 that it would disable access within two weeks. The documentation paths that served the API reference now return 404.
What format is the 23andMe raw data file?
A text file with # comment lines, then four whitespace-separated columns per marker: rsID or internal i ID, chromosome, position and genotype. Positions are GRCh37 on the plus strand, -- means no call, and mitochondrial calls, plus most X and Y calls in men, have a single letter.
Is 23andMe raw data GRCh37 or GRCh38?
23andMe documents the raw data as GRCh37 on the plus strand. Its online Browse Raw Data view now also shows GRCh38 genotypes, so check the build of any file you receive. The snps package detects it for you and can remap to GRCh38.
Can I convert a 23andMe file to VCF?
Yes. Both snps and bcftools convert --tsv2vcf can do it, given a GRCh37 reference. A VCF makes the file readable by more tools but doesn't add any interpretation.
This article is for educational purposes only and does not constitute medical advice. Consumer genotyping arrays can miss or miscall variants, especially rare ones; any finding that could affect health decisions should be confirmed by a validated clinical test and discussed with a qualified clinician.
This article was created with AI assistance and reviewed by the DeepDNA editorial team.
Ask your AI agent
DeepDNA is an MCP server and API for AI agents: cited records on genes, variants and drug–gene pairs, free and open, no key. Connect it to Claude, ChatGPT, Cursor or VS Code in one step. A free local package reads the curated positions of a raw DNA file on your own computer.
Connect the MCP server