MyGene.info API
Free MyGene.info API with no key: query gene annotation aggregated from NCBI, Ensembl, UniProt and more by symbol, Entrez id or Ensembl id. Field selection keeps responses small.
Endpoint tested and returned HTTP 200 on 2026-08-21
What is the MyGene.info API?
MyGene.info is a free, key-free API that aggregates gene annotation from NCBI Gene, Ensembl, UniProt, HGNC and around forty other sources into one document per gene. You can look a gene up by Entrez id, Ensembl id or symbol and select exactly which annotation fields to return.
Gene annotation is scattered across a dozen authorities that all use different identifiers, and reconciling them is the tedious first step of most genomics work. MyGene.info does that reconciliation once, nightly, and serves the merged result. One request with an Entrez id gives you the symbol, the RefSeq summary, Ensembl and UniProt cross-references, GO terms, pathway memberships and homologues, all in a single JSON document.
The `fields` parameter is the whole trick to using it well. A complete gene document for a well-studied human gene runs to tens of kilobytes of nested annotation; naming the three or four fields you need shrinks that to a few hundred bytes and makes the request self-documenting. There is also a POST batch endpoint that accepts up to 1000 identifiers at a time, which is the right way to annotate a gene list — looping over single lookups is what gets clients throttled.
Quick facts
- Base URL
https://mygene.info/v3- Authentication
- No API key or account. MyGene.info is run by the Su and Wu labs at Scripps Research; the aggregation code is open source and the underlying annotation keeps the licence of whichever source it came from.
- Rate limit
- No hard published limit, but the maintainers ask that you keep to a few requests per second and use the POST batch endpoint (up to 1000 ids per call) for bulk work.
- Pricing
- Free, including commercial use of the service. Redistribution of the annotation itself is governed by the upstream sources listed in each document's metadata.
- CORS
- Enabled — callable directly from browser JavaScript
- Official docs
- Read the docs
How to use the MyGene.info API
Every request below was executed against the live API on 2026-08-21, and the response shown is the real body it returned — not an illustration.
1. Fetch selected annotation fields for CDK2 by Entrez gene id
GET https://mygene.info/v3/gene/1017?fields=symbol,name,summary,taxid,entrezgene
curl 'https://mygene.info/v3/gene/1017?fields=symbol,name,summary,taxid,entrezgene'const res = await fetch("https://mygene.info/v3/gene/1017?fields=symbol,name,summary,taxid,entrezgene");
if (!res.ok) throw new Error(`Request failed: ${res.status}`);
const data = await res.json();
console.log(data);import requests
res = requests.get("https://mygene.info/v3/gene/1017?fields=symbol,name,summary,taxid,entrezgene", timeout=20)
res.raise_for_status()
print(res.json()){
"_id": "1017",
"_version": 4,
"entrezgene": "1017",
"name": "cyclin dependent kinase 2",
"summary": "This gene encodes a member of a family of serine/threonine protein kinases that participate in cell cycle regulation. The encoded protein is the catalytic subunit of the cyclin-dependent protein kinase complex, which regulates progression through the cell cycle. Activity of this protein is especially critical during the G1 to S phase transition. This protein associates with and regulated by other subunits of the complex including cyclin A or E, CDK inhibitor p21Cip1 (CDKN1A), and p27Kip1 (CDKN1B). Alternative splicing results in multiple transcript variants. [provided by RefSeq, Mar 2014].",
"symbol": "CDK2",
"taxid": 9606
}Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
geneid | path segment | Required | An Entrez gene id, Ensembl gene id or other recognised gene identifier. 1017 |
fields | query | Optional | Comma-separated annotation fields to return. Without it you get the entire document, which is large. symbol,name,summary,taxid |
species | query | Optional | Restrict a query to one or more species, by name or taxid. human |
q | query | Optional | On the `/query` endpoint, a search string such as a symbol or a Lucene-style expression. symbol:CDK2 |
size | query | Optional | Number of hits to return from `/query`. Defaults to 10, maximum 1000. 5 |
dotfield | query | Optional | Set to `false` to keep nested objects nested rather than flattening keys to dotted paths. false |
Response fields
_idstring- Primary identifier for the document, normally the Entrez gene id as a string.
symbolstring- Official gene symbol from the relevant nomenclature committee.
namestring- Full approved gene name.
summarystring- Narrative RefSeq summary of what the gene does, with its provenance stated inline.
taxidinteger- NCBI taxonomy id of the species. 9606 is human.
entrezgenestring- Entrez gene id, present as its own field so you can select it without parsing `_id`.
What you can build with the MyGene.info API
- Convert a list of gene symbols to Entrez or Ensembl identifiers
- Pull one-line gene descriptions to display alongside expression results
- Annotate a differential expression table with names, summaries and GO terms
- Map genes between species using the homologene fields
- Validate that user-supplied gene symbols exist before running an analysis
Common errors and how to fix them
404
The identifier does not resolve to a gene.
Fix: Symbols are ambiguous across species; prefer Entrez or Ensembl ids, or use `/query` with a `species` filter when all you have is a symbol.
400
A field name in `fields` is not recognised.
Fix: Field names use dotted paths such as `refseq.rna`. Fetch one full document without `fields` to see the exact key names available.
429
Too many requests in a short window.
Fix: Switch to the POST batch endpoint with up to 1000 ids per call; one batch request replaces a thousand single lookups.
Unexpectedly large response
No `fields` parameter was sent.
Fix: Always name the fields you want. Full documents for well-studied genes are tens of kilobytes each.
MyGene.info API — frequently asked questions
Is MyGene.info free and does it need an API key?
It is free and needs no key or registration. The maintainers ask only that you stay within a few requests per second and use the batch endpoint for anything bulk.
How do I annotate a whole list of genes at once?
POST to `/v3/gene` with `ids` as a comma-separated list of up to 1000 identifiers and a `fields` parameter. That returns an array of documents in one request, which is far kinder to the service than looping.
Where does MyGene.info get its data?
It merges roughly forty upstream sources including NCBI Gene, Ensembl, UniProt, HGNC, Gene Ontology and Reactome, refreshed on a regular schedule. Each document records which source contributed which field, so you can trace any value back.
Can I search by gene symbol instead of an id?
Yes, through the `/query` endpoint with `q=symbol:CDK2`. Add a `species` filter, because the same symbol frequently exists in several organisms and an unfiltered query will return all of them.
Tools that pair with this API
JSON Formatter
Format, beautify and minify JSON online with 2-space, 4-space or tab indentation. Sort keys alphabetically and catch syntax errors instantly — free and private.
JSON to CSV Converter
Convert a JSON array of objects to CSV online. Automatic column headers from the union of all keys, delimiter choice and proper quoting — all in-browser.
GC Content Calculator
Count A, C, G and T in a sequence to get GC content, AT content and the GC/AT ratio, plus primer melting temperature and a sliding-window GC profile.
MyGene.info is an independent third-party service and is not affiliated with ByteTools or ByteVancer. Details on this page were verified on 2026-08-21; always check the official documentation before relying on this API in production, as terms and limits can change.