Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Query gene, sequence, and variant data via the Ensembl REST API
.claude/skills/brycewang-stanford-ensembl-rest-api/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 55% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 55% | 0% |
| case-12 | ✗→✓ | ▲ Improved | 181% | 0% |
| case-02 | ✓→✓ | = Same ✓ | 54% | 0% |
| case-03 | ✓→✓ | = Same ✓ | 227% | 0% |
Ensembl is a genome browser and annotation system maintained by EMBL-EBI and the Wellcome Sanger Institute, providing reference assemblies, gene annotations, variant data, and comparative genomics for over 300 vertebrate genomes. It is the genomic reference underpinning gget, PyEnsembl, and BioMart.
The REST API exposes Ensembl data via stateless HTTP. Researchers can look up genes by symbol or stable ID, retrieve genomic/cDNA/protein sequences, query variant annotations (rsIDs, clinical significance, consequences), access cross-references (HGNC, UniProt, RefSeq, OMIM), and obtain assembly metadata. Responses in JSON or XML.
No authentication required. All endpoints are publicly accessible. Users needing higher throughput can register for an API token.
Retrieve gene metadata: coordinates, biotype, canonical transcript.
GET https://rest.ensembl.org/lookup/symbol/{species}/{symbol}| Parameter | Type | Required | Description | |---------------|--------|----------|--------------------------------------------------| | species | string | Yes | Species name (e.g., homo_sapiens) | | symbol | string | Yes | Gene symbol (e.g., BRCA1, TP53) | | expand | int | No | Set to 1 to include transcripts and translations | | content-type | string | Yes | application/json or text/xml |
bashcurl "https://rest.ensembl.org/lookup/symbol/homo_sapiens/BRCA1?content-type=application/json"
json{ "display_name": "BRCA1", "description": "BRCA1 DNA repair associated [Source:HGNC Symbol;Acc:HGNC:1100]", "object_type": "Gene", "species": "homo_sapiens", "assembly_name": "GRCh38", "biotype": "protein_coding", "seq_region_name": "17", "start": 43044292, "end": 43170245, "strand": -1, "id": "ENSG00000012048", "canonical_transcript": "ENST00000357654.9" }
Retrieve genomic, cDNA, CDS, or protein sequences by Ensembl stable ID.
GET https://rest.ensembl.org/sequence/id/{id}| Parameter | Type | Required | Description | |----------------|--------|----------|-------------------------------------------------------| | id | string | Yes | Ensembl stable ID (e.g., ENSG00000012048) | | type | string | No | genomic, cdna, cds, or protein | | expand_5prime | int | No | Expand 5' flanking region by N bases | | expand_3prime | int | No | Expand 3' flanking region by N bases | | content-type | string | Yes | application/json or text/plain (FASTA) |
bashcurl "https://rest.ensembl.org/sequence/id/ENSG00000012048?content-type=application/json&type=genomic"
json{ "id": "ENSG00000012048", "query": "ENSG00000012048", "desc": "chromosome:GRCh38:17:43044292:43170245:-1", "molecule": "DNA", "seq": "AAAGCGTGGGAATTACAGATAAATTAAAACTGTGGAACCCCTTTCCTCGGCTGCCGCCAAGGTGTTCGG..." }
Map a gene symbol to Ensembl stable IDs and external database identifiers.
GET https://rest.ensembl.org/xrefs/symbol/{species}/{symbol}species (required), symbol (required), external_db (optional filter, e.g., UniProt)bashcurl "https://rest.ensembl.org/xrefs/symbol/homo_sapiens/TP53?content-type=application/json"
[{"type":"gene","id":"ENSG00000141510"},{"type":"gene","id":"LRG_321"}]Use xrefs/id/{id} to expand an Ensembl ID to all external cross-references (UniProt, HGNC, RefSeq, OMIM).
Retrieve variant data by rsID: mappings, alleles, consequence, clinical significance.
GET https://rest.ensembl.org/variation/{species}/{id}species (required), id (required, e.g., rs699)bashcurl "https://rest.ensembl.org/variation/homo_sapiens/rs699?content-type=application/json"
json{ "name": "rs699", "var_class": "SNP", "most_severe_consequence": "missense_variant", "clinical_significance": ["benign"], "evidence": ["Frequency","1000Genomes","Cited","ESP","Phenotype_or_Disease","ExAC","TOPMed","gnomAD"], "mappings": [{"location":"1:230710048-230710048","allele_string":"A/G","strand":1,"assembly_name":"GRCh38"}] }
GET https://rest.ensembl.org/info/assembly/{species}assembly_name ("GRCh38.p14"), assembly_date ("2013-12"), assembly_accession ("GCA_000001405.29"), full karyotype array (1-22, X, Y, MT), and 347 top_level_region entries.X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset on every response./lookup/id, /sequence/id): accept up to 1000 IDs per request.https://grch37.rest.ensembl.orgpythonimport requests BASE = "https://rest.ensembl.org" HEADERS = {"Content-Type": "application/json"} gene = requests.get(f"{BASE}/lookup/symbol/homo_sapiens/BRCA1", headers=HEADERS).json() print(f"{gene['display_name']} ({gene['id']}) chr{gene['seq_region_name']}:{gene['start']}-{gene['end']}") seq = requests.get(f"{BASE}/sequence/id/{gene['id']}?type=cds", headers=HEADERS).json() print(f"CDS length: {len(seq['seq'])} bp")
pythonimport requests ids = ["ENSG00000012048", "ENSG00000141510", "ENSG00000157764"] # BRCA1, TP53, BRAF resp = requests.post( "https://rest.ensembl.org/lookup/id", headers={"Content-Type": "application/json", "Accept": "application/json"}, json={"ids": ids} ) for ens_id, info in resp.json().items(): print(f"{info['display_name']:10s} chr{info['seq_region_name']}:{info['start']}-{info['end']}")
pythonimport requests for rsid in ["rs699", "rs1042522", "rs334"]: v = requests.get( f"https://rest.ensembl.org/variation/homo_sapiens/{rsid}", headers={"Content-Type": "application/json"} ).json() loc = v["mappings"][0]["location"] if v.get("mappings") else "N/A" print(f"{v['name']:12s} {v['var_class']:5s} {v['most_severe_consequence']:25s} {loc}")
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 18,052 | 16,414 | -9% | 1 | 1 | 0% | 3,629 | 5,607 | +55% | 0 | 0 | — |
case-02 | pass→pass | 12,707 | 6,558 | -48% | 1 | 1 | 0% | 2,407 | 3,707 | +54% | 0 | 0 | — |
case-03 | pass→pass | 5,263 | 3,859 | -27% | 1 | 1 | 0% | 953 | 3,114 | +227% | 0 | 0 | — |
case-04 | pass→pass | 8,773 | 4,750 | -46% | 1 | 1 | 0% | 1,598 | 3,304 | +107% | 0 | 0 | — |
case-05 | pass→pass | 9,827 | 6,869 | -30% | 1 | 1 | 0% | 1,829 | 3,739 | +104% | 0 | 0 | — |
case-06 | pass→pass | 3,773 | 3,184 | -16% | 1 | 1 | 0% | 639 | 3,029 | +374% | 0 | 0 | — |
case-07 | pass→pass | 10,324 | 8,313 | -19% | 1 | 1 | 0% | 1,800 | 3,920 | +118% | 0 | 0 | — |
case-08 | pass→pass | 5,207 | 2,335 | -55% | 1 | 1 | 0% | 819 | 2,731 | +233% | 0 | 0 | — |
case-09 | fail→pass | 13,217 | 6,877 | -48% | 1 | 1 | 0% | 2,442 | 3,789 | +55% | 0 | 0 | — |
case-10 | pass→pass | 4,752 | 5,233 | +10% | 1 | 1 | 0% | 776 | 3,441 | +343% | 0 | 0 | — |
case-11 | pass→pass | 7,144 | 5,373 | -25% | 1 | 1 | 0% | 1,371 | 3,479 | +154% | 0 | 0 | — |
case-12 | fail→pass | 6,609 | 2,652 | -60% | 1 | 1 | 0% | 1,002 | 2,817 | +181% | 0 | 0 | — |
case-13 | fail→fail | 4,209 | 5,915 | +41% | 1 | 1 | 0% | 803 | 3,522 | +339% | 0 | 0 | — |
case-14 | pass→pass | 6,482 | 3,010 | -54% | 1 | 1 | 0% | 1,261 | 3,003 | +138% | 0 | 0 | — |
case-15 | pass→pass | 6,695 | 2,809 | -58% | 1 | 1 | 0% | 1,291 | 2,889 | +124% | 0 | 0 | — |
case-16 | pass→pass | 8,406 | 5,158 | -39% | 1 | 1 | 0% | 1,554 | 3,450 | +122% | 0 | 0 | — |
case-17 | pass→pass | 5,026 | 5,734 | +14% | 1 | 1 | 0% | 947 | 3,509 | +271% | 0 | 0 | — |
case-18 | pass→pass | 5,592 | 2,643 | -53% | 1 | 1 | 0% | 970 | 2,927 | +202% | 0 | 0 | — |
case-19 | pass→pass | 5,193 | 3,007 | -42% | 1 | 1 | 0% | 955 | 2,996 | +214% | 0 | 0 | — |
case-20 | pass→pass | 10,825 | 6,976 | -36% | 1 | 1 | 0% | 1,993 | 3,697 | +85% | 0 | 0 | — |
case-21 | pass→pass | 4,146 | 2,696 | -35% | 1 | 1 | 0% | 812 | 2,971 | +266% | 0 | 0 | — |
case-22 | pass→pass | 17,271 | 20,149 | +17% | 1 | 1 | 0% | 3,439 | 6,531 | +90% | 0 | 0 | — |
case-23 | pass→pass | 10,249 | 16,125 | +57% | 1 | 1 | 0% | 2,012 | 5,012 | +149% | 0 | 0 | — |
case-24 | pass→pass | 7,729 | 7,186 | -7% | 1 | 1 | 0% | 1,484 | 3,691 | +149% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 24 cases were attempted. The headline lift of +13 percentage points is the difference between those two pass rates over the 24 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.