Skill Tracer
Skills › Scientific Agent Skills › database-lookup › ensembl.md

ensembl.md

552 lines · skills/database-lookup/references/ensembl.md at 5f2bc03

Open on GitHub
1# Ensembl REST API
2

Ensembl REST API

Raw lines 1 to 2
3## Base URL
4
5```
6https://rest.ensembl.org
7```
8
9For the Ensembl Genomes (plants, fungi, bacteria, protists, metazoa):
10```
11https://rest.ensembl.org
12```
13(Same base; Ensembl Genomes was merged into the main REST API.)
15For the GRCh37 (hg19) archive:
16```
17https://grch37.rest.ensembl.org
18```

Base URL

https://rest.ensembl.org

For the Ensembl Genomes (plants, fungi, bacteria, protists, metazoa):

https://rest.ensembl.org

(Same base; Ensembl Genomes was merged into the main REST API.)

For the GRCh37 (hg19) archive:

https://grch37.rest.ensembl.org
Raw lines 3 to 19
20## Authentication
22No API key required. All endpoints are public.

Authentication

No API key required. All endpoints are public.

Raw lines 20 to 23
24## Common Headers
26All requests should include:
27```
28Content-Type: application/json
29```
31The API uses content negotiation. Append `?content-type=application/json` to GET requests, or set the `Accept` header.

Common Headers

All requests should include:

Content-Type: application/json

The API uses content negotiation. Append ?content-type=application/json to GET requests, or set the Accept header.

Raw lines 24 to 32
33## Key Endpoints

Key Endpoints

Raw lines 33 to 34
35### 1. Gene lookup by symbol
37```
38GET /lookup/symbol/{species}/{symbol}?content-type=application/json
39```
41| Parameter | Type | Description |
42|------------|--------|-------------|
43| `species` | string | **Required.** Species name (e.g., `homo_sapiens`, `mus_musculus`). |
44| `symbol` | string | **Required.** Gene symbol (e.g., `TP53`, `BRCA1`). |
45| `expand` | int | Set to `1` to include transcripts, translations, exons. |
47**Example:**
48```
49https://rest.ensembl.org/lookup/symbol/homo_sapiens/TP53?content-type=application/json
50https://rest.ensembl.org/lookup/symbol/homo_sapiens/BRCA1?content-type=application/json;expand=1
51```
53**Response:**
54```json
56 "id": "ENSG00000141510",
57 "display_name": "TP53",
58 "description": "tumor protein p53 [Source:HGNC Symbol;Acc:HGNC:11998]",
59 "species": "homo_sapiens",
60 "object_type": "Gene",
61 "biotype": "protein_coding",
62 "assembly_name": "GRCh38",
63 "seq_region_name": "17",
64 "start": 7661779,
65 "end": 7687538,
66 "strand": -1,
67 "source": "ensembl_havana",
68 "logic_name": "ensembl_havana_gene_homo_sapiens",
69 "version": 16,
70 "Transcript": [...]
72```
74---

1. Gene lookup by symbol

GET /lookup/symbol/{species}/{symbol}?content-type=application/json
ParameterTypeDescription
speciesstringRequired. Species name (e.g., homo_sapiens, mus_musculus).
symbolstringRequired. Gene symbol (e.g., TP53, BRCA1).
expandintSet to 1 to include transcripts, translations, exons.

Example:

https://rest.ensembl.org/lookup/symbol/homo_sapiens/TP53?content-type=application/json
https://rest.ensembl.org/lookup/symbol/homo_sapiens/BRCA1?content-type=application/json;expand=1

Response:

{
  "id": "ENSG00000141510",
  "display_name": "TP53",
  "description": "tumor protein p53 [Source:HGNC Symbol;Acc:HGNC:11998]",
  "species": "homo_sapiens",
  "object_type": "Gene",
  "biotype": "protein_coding",
  "assembly_name": "GRCh38",
  "seq_region_name": "17",
  "start": 7661779,
  "end": 7687538,
  "strand": -1,
  "source": "ensembl_havana",
  "logic_name": "ensembl_havana_gene_homo_sapiens",
  "version": 16,
  "Transcript": [...]
}

Raw lines 35 to 75
76### 2. Gene/feature lookup by Ensembl ID
78```
79GET /lookup/id/{id}?content-type=application/json
80```
82| Parameter | Type | Description |
83|-----------|--------|-------------|
84| `id` | string | **Required.** Ensembl stable ID (gene, transcript, protein, exon). |
85| `expand` | int | Set to `1` to include child objects (transcripts for genes, etc.). |
86| `db_type` | string | Database type: `core`, `otherfeatures`, `cdna`, `rnaseq`. |
88**Example:**
89```
90https://rest.ensembl.org/lookup/id/ENSG00000141510?content-type=application/json;expand=1
91https://rest.ensembl.org/lookup/id/ENST00000269305?content-type=application/json
92https://rest.ensembl.org/lookup/id/ENSP00000269305?content-type=application/json
93```
95---

2. Gene/feature lookup by Ensembl ID

GET /lookup/id/{id}?content-type=application/json
ParameterTypeDescription
idstringRequired. Ensembl stable ID (gene, transcript, protein, exon).
expandintSet to 1 to include child objects (transcripts for genes, etc.).
db_typestringDatabase type: core, otherfeatures, cdna, rnaseq.

Example:

https://rest.ensembl.org/lookup/id/ENSG00000141510?content-type=application/json;expand=1
https://rest.ensembl.org/lookup/id/ENST00000269305?content-type=application/json
https://rest.ensembl.org/lookup/id/ENSP00000269305?content-type=application/json

Raw lines 76 to 96
97### 3. Batch lookup (POST, up to 1000 IDs)
99```
100POST /lookup/id
101Content-Type: application/json
103{ "ids": ["ENSG00000141510", "ENSG00000012048", "ENSG00000157764"] }
104```
106**Example response:** Returns a map keyed by ID:
107```json
109 "ENSG00000141510": {
110 "id": "ENSG00000141510",
111 "display_name": "TP53",
112 ...
113 },
114 "ENSG00000012048": { ... }
116```
118---

3. Batch lookup (POST, up to 1000 IDs)

POST /lookup/id
Content-Type: application/json

{ "ids": ["ENSG00000141510", "ENSG00000012048", "ENSG00000157764"] }

Example response: Returns a map keyed by ID:

{
  "ENSG00000141510": {
    "id": "ENSG00000141510",
    "display_name": "TP53",
    ...
  },
  "ENSG00000012048": { ... }
}

Raw lines 97 to 119
120### 4. Sequence retrieval
122```
123GET /sequence/id/{id}?content-type=application/json
124```
126| Parameter | Type | Description |
127|--------------|--------|-------------|
128| `id` | string | Ensembl stable ID (gene, transcript, or protein). |
129| `type` | string | `genomic`, `cdna`, `cds`, `protein`. Default varies by object type. |
130| `format` | string | `fasta`; select JSON with the content-type/Accept header. |
131| `expand_3prime` | int | Expand 3' end by N bases. |
132| `expand_5prime` | int | Expand 5' end by N bases. |
133| `mask` | string | `soft` (lowercase repeats) or `hard` (N-mask repeats). |
135**Examples:**
137Protein sequence:
138```
139https://rest.ensembl.org/sequence/id/ENSP00000269305?content-type=application/json
140```
142CDS sequence:
143```
144https://rest.ensembl.org/sequence/id/ENST00000269305?type=cds&content-type=application/json
145```
147Genomic sequence with flanking:
148```
149https://rest.ensembl.org/sequence/id/ENSG00000141510?type=genomic&expand_5prime=1000&expand_3prime=500&content-type=application/json
150```
152FASTA format:
153```
154https://rest.ensembl.org/sequence/id/ENSP00000269305?content-type=text/x-fasta
155```
157**Response (JSON):**
158```json
160 "id": "ENSP00000269305",
161 "seq": "MEEPQSDPSVEPPLSQETFSDL...",
162 "molecule": "protein",
163 "desc": "chromosome:GRCh38:17:7661779:7687538:-1"
165```
167---

4. Sequence retrieval

GET /sequence/id/{id}?content-type=application/json
ParameterTypeDescription
idstringEnsembl stable ID (gene, transcript, or protein).
typestringgenomic, cdna, cds, protein. Default varies by object type.
formatstringfasta; select JSON with the content-type/Accept header.
expand_3primeintExpand 3' end by N bases.
expand_5primeintExpand 5' end by N bases.
maskstringsoft (lowercase repeats) or hard (N-mask repeats).

Examples:

Protein sequence:

https://rest.ensembl.org/sequence/id/ENSP00000269305?content-type=application/json

CDS sequence:

https://rest.ensembl.org/sequence/id/ENST00000269305?type=cds&content-type=application/json

Genomic sequence with flanking:

https://rest.ensembl.org/sequence/id/ENSG00000141510?type=genomic&expand_5prime=1000&expand_3prime=500&content-type=application/json

FASTA format:

https://rest.ensembl.org/sequence/id/ENSP00000269305?content-type=text/x-fasta

Response (JSON):

{
  "id": "ENSP00000269305",
  "seq": "MEEPQSDPSVEPPLSQETFSDL...",
  "molecule": "protein",
  "desc": "chromosome:GRCh38:17:7661779:7687538:-1"
}

Raw lines 120 to 168
169### 5. Sequence by region
171```
172GET /sequence/region/{species}/{region}?content-type=application/json
173```
175Region format: `chromosome:start..end` or `chromosome:start..end:strand`
177**Example:**
178```
179https://rest.ensembl.org/sequence/region/homo_sapiens/17:7661779..7662000:1?content-type=application/json
180```
182---

5. Sequence by region

GET /sequence/region/{species}/{region}?content-type=application/json

Region format: chromosome:start..end or chromosome:start..end:strand

Example:

https://rest.ensembl.org/sequence/region/homo_sapiens/17:7661779..7662000:1?content-type=application/json

Raw lines 169 to 183
184### 6. Variant annotation (VEP -- Variant Effect Predictor)
186**By HGVS notation:**
187```
188GET /vep/{species}/hgvs/{hgvs_notation}?content-type=application/json
189```
191**Example:**
192```
193https://rest.ensembl.org/vep/homo_sapiens/hgvs/ENST00000269305.9:c.817C>T?content-type=application/json
194https://rest.ensembl.org/vep/homo_sapiens/hgvs/17:g.7675088C>G?CADD=1&content-type=application/json
195```
197`CADD=1` is how you get `cadd_phred`. Without it the field is absent.
198Verified 2026-09-11: `17:g.7675088C>G` is `missense_variant` / TP53 /
199`cadd_phred` **29.4**. The older worked example `17:g.7674220G>A` is
200HTTP 400 — the reference at 7674220 is `C`, not `G`.
202**By genomic region:**
203```
204GET /vep/{species}/region/{region}/{allele}?content-type=application/json
205```
207**Example:**
208```
209https://rest.ensembl.org/vep/homo_sapiens/region/17:7675088-7675088:1/G?CADD=1&content-type=application/json
210```
212The path carries the **alt** only. VEP reads the reference from the
213assembly. `17:7675088-7675088:1/G` returns `allele_string: C/G` even if
214you thought the ref was `A`. Compare `allele_string` to the alleles you
215meant, or use `/hgvs/` (which 400s on a wrong ref).
217**By rsID:**
218```
219GET /vep/{species}/id/{rsid}?content-type=application/json
220```
222**Example:**
223```
224https://rest.ensembl.org/vep/homo_sapiens/id/rs28934578?CADD=1&content-type=application/json
225https://rest.ensembl.org/vep/homo_sapiens/id/rs699?content-type=application/json
226```
228`rs28934578` is multi-allelic (`C/A/G/T`). `most_severe_consequence` is
229one label across **every** transcript (117 here, vs 39 on the single-alt
230region call). Do not quote it as the consequence of one allele.
232**VEP Response:**
233```json
235 {
236 "input": "17:g.7675088C>G",
237 "assembly_name": "GRCh38",
238 "seq_region_name": "17",
239 "start": 7675088,
240 "end": 7675088,
241 "strand": 1,
242 "allele_string": "C/G",
243 "most_severe_consequence": "missense_variant",
244 "transcript_consequences": [
245 {
246 "gene_id": "ENSG00000141510",
247 "gene_symbol": "TP53",
248 "transcript_id": "ENST00000269305",
249 "biotype": "protein_coding",
250 "consequence_terms": ["missense_variant"],
251 "impact": "MODERATE",
252 "amino_acids": "R/P",
253 "codons": "cGc/cCc",
254 "protein_start": 175,
255 "sift_prediction": "deleterious",
256 "sift_score": 0.0,
257 "cadd_phred": 29.4
258 }
259 ],
260 "colocated_variants": [
261 {
262 "id": "rs28934578",
263 "frequencies": { ... },
264 "clin_sig": ["pathogenic"]
265 }
266 ]
267 }
269```
271**Batch VEP (POST, up to 200 variants):**
272```
273POST /vep/homo_sapiens/region
274Content-Type: application/json
276{ "variants": ["17 7675088 7675088 C/G 1", "7 140753336 140753336 A/T 1"] }
277```
279Add `CADD=1` as a query parameter on GET or in the POST body when you
280need CADD annotations. Record the available CADD model/release and assembly.
281Scores from other aggregators can differ by model, release or build; compare
282like-for-like values (`myvariant.md`).
284---

6. Variant annotation (VEP -- Variant Effect Predictor)

By HGVS notation:

GET /vep/{species}/hgvs/{hgvs_notation}?content-type=application/json

Example:

https://rest.ensembl.org/vep/homo_sapiens/hgvs/ENST00000269305.9:c.817C>T?content-type=application/json
https://rest.ensembl.org/vep/homo_sapiens/hgvs/17:g.7675088C>G?CADD=1&content-type=application/json

CADD=1 is how you get cadd_phred. Without it the field is absent. Verified 2026-09-11: 17:g.7675088C>G is missense_variant / TP53 / cadd_phred 29.4. The older worked example 17:g.7674220G>A is HTTP 400 — the reference at 7674220 is C, not G.

By genomic region:

GET /vep/{species}/region/{region}/{allele}?content-type=application/json

Example:

https://rest.ensembl.org/vep/homo_sapiens/region/17:7675088-7675088:1/G?CADD=1&content-type=application/json

The path carries the alt only. VEP reads the reference from the assembly. 17:7675088-7675088:1/G returns allele_string: C/G even if you thought the ref was A. Compare allele_string to the alleles you meant, or use /hgvs/ (which 400s on a wrong ref).

By rsID:

GET /vep/{species}/id/{rsid}?content-type=application/json

Example:

https://rest.ensembl.org/vep/homo_sapiens/id/rs28934578?CADD=1&content-type=application/json
https://rest.ensembl.org/vep/homo_sapiens/id/rs699?content-type=application/json

rs28934578 is multi-allelic (C/A/G/T). most_severe_consequence is one label across every transcript (117 here, vs 39 on the single-alt region call). Do not quote it as the consequence of one allele.

VEP Response:

[
  {
    "input": "17:g.7675088C>G",
    "assembly_name": "GRCh38",
    "seq_region_name": "17",
    "start": 7675088,
    "end": 7675088,
    "strand": 1,
    "allele_string": "C/G",
    "most_severe_consequence": "missense_variant",
    "transcript_consequences": [
      {
        "gene_id": "ENSG00000141510",
        "gene_symbol": "TP53",
        "transcript_id": "ENST00000269305",
        "biotype": "protein_coding",
        "consequence_terms": ["missense_variant"],
        "impact": "MODERATE",
        "amino_acids": "R/P",
        "codons": "cGc/cCc",
        "protein_start": 175,
        "sift_prediction": "deleterious",
        "sift_score": 0.0,
        "cadd_phred": 29.4
      }
    ],
    "colocated_variants": [
      {
        "id": "rs28934578",
        "frequencies": { ... },
        "clin_sig": ["pathogenic"]
      }
    ]
  }
]

Batch VEP (POST, up to 200 variants):

POST /vep/homo_sapiens/region
Content-Type: application/json

{ "variants": ["17 7675088 7675088 C/G 1", "7 140753336 140753336 A/T 1"] }

Add CADD=1 as a query parameter on GET or in the POST body when you need CADD annotations. Record the available CADD model/release and assembly. Scores from other aggregators can differ by model, release or build; compare like-for-like values (myvariant.md).


Raw lines 184 to 285
286### 7. Variant (known variants by rsID)
288```
289GET /variation/{species}/{rsid}?content-type=application/json
290```
292**Example:**
293```
294https://rest.ensembl.org/variation/homo_sapiens/rs699?content-type=application/json
295```
297**Response:**
298```json
300 "name": "rs699",
301 "source": "Variants (including SNPs and indels) imported from dbSNP",
302 "mappings": [
303 {
304 "seq_region_name": "1",
305 "start": 230710048,
306 "end": 230710048,
307 "strand": 1,
308 "allele_string": "A/G",
309 "assembly_name": "GRCh38",
310 "location": "1:230710048-230710048"
311 }
312 ],
313 "MAF": 0.35,
314 "minor_allele": "G",
315 "clinical_significance": [],
316 "synonyms": [],
317 "ancestral_allele": "A"
319```
321---

7. Variant (known variants by rsID)

GET /variation/{species}/{rsid}?content-type=application/json

Example:

https://rest.ensembl.org/variation/homo_sapiens/rs699?content-type=application/json

Response:

{
  "name": "rs699",
  "source": "Variants (including SNPs and indels) imported from dbSNP",
  "mappings": [
    {
      "seq_region_name": "1",
      "start": 230710048,
      "end": 230710048,
      "strand": 1,
      "allele_string": "A/G",
      "assembly_name": "GRCh38",
      "location": "1:230710048-230710048"
    }
  ],
  "MAF": 0.35,
  "minor_allele": "G",
  "clinical_significance": [],
  "synonyms": [],
  "ancestral_allele": "A"
}

Raw lines 286 to 322
323### 8. Overlap / features in a region
325```
326GET /overlap/region/{species}/{region}?feature={type}&content-type=application/json
327```
329| Parameter | Type | Description |
330|-----------|--------|-------------|
331| `region` | string | Format: `chr:start-end`. |
332| `feature` | string | One or more of: `gene`, `transcript`, `cds`, `exon`, `repeat`, `simple`, `misc`, `variation`, `somatic_variation`, `structural_variation`, `regulatory`, `motif`, `chipseq`, `constrained`. Can repeat parameter for multiple. |
334**Example -- get all genes in a region:**
335```
336https://rest.ensembl.org/overlap/region/homo_sapiens/17:7660000-7690000?feature=gene&content-type=application/json
337```
339**Example -- get regulatory features:**
340```
341https://rest.ensembl.org/overlap/region/homo_sapiens/17:7660000-7690000?feature=regulatory&content-type=application/json
342```
344---

8. Overlap / features in a region

GET /overlap/region/{species}/{region}?feature={type}&content-type=application/json
ParameterTypeDescription
regionstringFormat: chr:start-end.
featurestringOne or more of: gene, transcript, cds, exon, repeat, simple, misc, variation, somatic_variation, structural_variation, regulatory, motif, chipseq, constrained. Can repeat parameter for multiple.

Example -- get all genes in a region:

https://rest.ensembl.org/overlap/region/homo_sapiens/17:7660000-7690000?feature=gene&content-type=application/json

Example -- get regulatory features:

https://rest.ensembl.org/overlap/region/homo_sapiens/17:7660000-7690000?feature=regulatory&content-type=application/json

Raw lines 323 to 345
346### 9. Cross-references (Xrefs)
348```
349GET /xrefs/id/{id}?content-type=application/json
350```
352**Example:**
353```
354https://rest.ensembl.org/xrefs/id/ENSG00000141510?content-type=application/json
355```
357Returns links to external databases (HGNC, UniProt, NCBI Gene, RefSeq, etc.).
359**Response:**
360```json
362 {
363 "primary_id": "11998",
364 "display_id": "TP53",
365 "dbname": "HGNC",
366 "db_display_name": "HGNC Symbol"
367 },
368 {
369 "primary_id": "P04637",
370 "display_id": "P53_HUMAN",
371 "dbname": "Uniprot/SWISSPROT"
372 },
373 {
374 "primary_id": "7157",
375 "display_id": "TP53",
376 "dbname": "EntrezGene"
377 }
379```
381**Xrefs by symbol:**
382```
383GET /xrefs/symbol/{species}/{symbol}?content-type=application/json
384```
386**Example:**
387```
388https://rest.ensembl.org/xrefs/symbol/homo_sapiens/TP53?content-type=application/json
389```
391---

9. Cross-references (Xrefs)

GET /xrefs/id/{id}?content-type=application/json

Example:

https://rest.ensembl.org/xrefs/id/ENSG00000141510?content-type=application/json

Returns links to external databases (HGNC, UniProt, NCBI Gene, RefSeq, etc.).

Response:

[
  {
    "primary_id": "11998",
    "display_id": "TP53",
    "dbname": "HGNC",
    "db_display_name": "HGNC Symbol"
  },
  {
    "primary_id": "P04637",
    "display_id": "P53_HUMAN",
    "dbname": "Uniprot/SWISSPROT"
  },
  {
    "primary_id": "7157",
    "display_id": "TP53",
    "dbname": "EntrezGene"
  }
]

Xrefs by symbol:

GET /xrefs/symbol/{species}/{symbol}?content-type=application/json

Example:

https://rest.ensembl.org/xrefs/symbol/homo_sapiens/TP53?content-type=application/json

Raw lines 346 to 392
393### 10. Comparative genomics -- Homology
395```
396GET /homology/id/{species}/{id}?content-type=application/json
397```
399| Parameter | Type | Description |
400|--------------|--------|-------------|
401| `id` | string | Ensembl gene ID. |
402| `type` | string | `orthologues`, `paralogues`, `projections`, `all`. |
403| `target_species` | string | Filter to specific species (e.g., `mus_musculus`). |
404| `target_taxon` | int | Filter to NCBI taxon ID. |
405| `sequence` | string | `none`, `cdna`, `protein`. Include aligned sequences. |
407**Example -- get mouse orthologs of human TP53:**
408```
409https://rest.ensembl.org/homology/id/homo_sapiens/ENSG00000141510?type=orthologues&target_species=mus_musculus&content-type=application/json
410```
412**Response:**
413```json
415 "data": [
416 {
417 "id": "ENSG00000141510",
418 "homologies": [
419 {
420 "type": "ortholog_one2one",
421 "target": {
422 "id": "ENSMUSG00000059552",
423 "species": "mus_musculus",
424 "protein_id": "ENSMUSP00000073359",
425 "perc_id": 77.8,
426 "perc_pos": 86.0
427 },
428 "source": {
429 "id": "ENSG00000141510",
430 "species": "homo_sapiens",
431 "protein_id": "ENSP00000269305"
432 },
433 "method_link_type": "ENSEMBL_ORTHOLOGUES",
434 "dn_ds": 0.15
435 }
436 ]
437 }
438 ]
440```
442**Homology by symbol:**
443```
444GET /homology/symbol/{species}/{symbol}?content-type=application/json
445```
447**Example:**
448```
449https://rest.ensembl.org/homology/symbol/homo_sapiens/TP53?type=orthologues&target_species=mus_musculus&content-type=application/json
450```
452---

10. Comparative genomics -- Homology

GET /homology/id/{species}/{id}?content-type=application/json
ParameterTypeDescription
idstringEnsembl gene ID.
typestringorthologues, paralogues, projections, all.
target_speciesstringFilter to specific species (e.g., mus_musculus).
target_taxonintFilter to NCBI taxon ID.
sequencestringnone, cdna, protein. Include aligned sequences.

Example -- get mouse orthologs of human TP53:

https://rest.ensembl.org/homology/id/homo_sapiens/ENSG00000141510?type=orthologues&target_species=mus_musculus&content-type=application/json

Response:

{
  "data": [
    {
      "id": "ENSG00000141510",
      "homologies": [
        {
          "type": "ortholog_one2one",
          "target": {
            "id": "ENSMUSG00000059552",
            "species": "mus_musculus",
            "protein_id": "ENSMUSP00000073359",
            "perc_id": 77.8,
            "perc_pos": 86.0
          },
          "source": {
            "id": "ENSG00000141510",
            "species": "homo_sapiens",
            "protein_id": "ENSP00000269305"
          },
          "method_link_type": "ENSEMBL_ORTHOLOGUES",
          "dn_ds": 0.15
        }
      ]
    }
  ]
}

Homology by symbol:

GET /homology/symbol/{species}/{symbol}?content-type=application/json

Example:

https://rest.ensembl.org/homology/symbol/homo_sapiens/TP53?type=orthologues&target_species=mus_musculus&content-type=application/json

Raw lines 393 to 453
454### 11. Regulatory features
456The current REST catalogue no longer lists the older `/regulatory/species/.../id/...`
457lookup. Use the current Ensembl regulatory data/download documentation and
458release-specific feature identifiers; do not assume an ENSR identifier from an
459older release resolves through the live API. The overlap endpoint's supported
460feature types are release-dependent.

11. Regulatory features

The current REST catalogue no longer lists the older /regulatory/species/.../id/... lookup. Use the current Ensembl regulatory data/download documentation and release-specific feature identifiers; do not assume an ENSR identifier from an older release resolves through the live API. The overlap endpoint's supported feature types are release-dependent.

Raw lines 454 to 461
462### 12. Species information
464```
465GET /info/species?content-type=application/json
466```
468Returns all available species with assembly info.
470---

12. Species information

GET /info/species?content-type=application/json

Returns all available species with assembly info.


Raw lines 462 to 471
472### 13. Assembly information
474```
475GET /info/assembly/{species}?content-type=application/json
476```
478**Example:**
479```
480https://rest.ensembl.org/info/assembly/homo_sapiens?content-type=application/json
481```
483Returns chromosome names, lengths, assembly name (GRCh38), coordinate system, etc.
485---

13. Assembly information

GET /info/assembly/{species}?content-type=application/json

Example:

https://rest.ensembl.org/info/assembly/homo_sapiens?content-type=application/json

Returns chromosome names, lengths, assembly name (GRCh38), coordinate system, etc.


Raw lines 472 to 486
487### 14. Phenotype by gene
489```
490GET /phenotype/gene/{species}/{gene}?content-type=application/json
491```
493**Example:**
494```
495https://rest.ensembl.org/phenotype/gene/homo_sapiens/TP53?content-type=application/json
496```
498---

14. Phenotype by gene

GET /phenotype/gene/{species}/{gene}?content-type=application/json

Example:

https://rest.ensembl.org/phenotype/gene/homo_sapiens/TP53?content-type=application/json

Raw lines 487 to 499
500### 15. LD (Linkage Disequilibrium)
502```
503GET /ld/{species}/pairwise/{rsid1}/{rsid2}?population_name={pop}&content-type=application/json
504```
506**Example:**
507```
508https://rest.ensembl.org/ld/homo_sapiens/pairwise/rs699/rs4762?population_name=1000GENOMES:phase_3:CEU&content-type=application/json
509```
511---

15. LD (Linkage Disequilibrium)

GET /ld/{species}/pairwise/{rsid1}/{rsid2}?population_name={pop}&content-type=application/json

Example:

https://rest.ensembl.org/ld/homo_sapiens/pairwise/rs699/rs4762?population_name=1000GENOMES:phase_3:CEU&content-type=application/json

Raw lines 500 to 512
513## Common Species Names
515| Species | API Name |
516|---------|----------|
517| Human | `homo_sapiens` |
518| Mouse | `mus_musculus` |
519| Rat | `rattus_norvegicus` |
520| Zebrafish | `danio_rerio` |
521| Fruit fly | `drosophila_melanogaster` |
522| Chicken | `gallus_gallus` |
523| Dog | `canis_lupus_familiaris` |
524| Pig | `sus_scrofa` |

Common Species Names

SpeciesAPI Name
Humanhomo_sapiens
Mousemus_musculus
Ratrattus_norvegicus
Zebrafishdanio_rerio
Fruit flydrosophila_melanogaster
Chickengallus_gallus
Dogcanis_lupus_familiaris
Pigsus_scrofa
Raw lines 513 to 525
526## Rate Limits
528- **15 requests per second** for general users (no API key).
529- Use the returned rate-limit headers; there is no documented public API-key registration workflow for a higher quota.
530- Requests exceeding the limit receive HTTP 429 with a `Retry-After` header.
531- Batch endpoints (POST) count as a single request -- use them to reduce call count.
532- Max 1000 IDs per batch POST for `/lookup/id`.
533- Max 200 variants per batch POST for VEP.
534- Rate limit headers are returned: `X-RateLimit-Limit`, `X-RateLimit-Remaining`, `X-RateLimit-Reset`.

Rate Limits

  • 15 requests per second for general users (no API key).
  • Use the returned rate-limit headers; there is no documented public API-key registration workflow for a higher quota.
  • Requests exceeding the limit receive HTTP 429 with a Retry-After header.
  • Batch endpoints (POST) count as a single request -- use them to reduce call count.
  • Max 1000 IDs per batch POST for /lookup/id.
  • Max 200 variants per batch POST for VEP.
  • Rate limit headers are returned: X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset.
Raw lines 526 to 535
536## Error Format
538```json
540 "error": "ID 'ENSG999' not found"
542```
544HTTP 400 for bad requests, 404 for not found, 429 for rate limiting, 503 for service unavailable.

Error Format

{
  "error": "ID 'ENSG999' not found"
}

HTTP 400 for bad requests, 404 for not found, 429 for rate limiting, 503 for service unavailable.

Raw lines 536 to 545
546## Tips
548- Always append `?content-type=application/json` to GET requests (or set the Accept header) -- the default is XML/HTML.
549- Use the GRCh37 base URL (`grch37.rest.ensembl.org`) if you need hg19 coordinates.
550- The `/lookup/symbol` endpoint is the fastest way to go from gene symbol to Ensembl ID.
551- For VEP, the HGVS endpoint is most convenient for single variants; the region POST endpoint is best for batch.
552- Combine `/xrefs/id` with gene IDs to cross-reference to UniProt, NCBI Gene, HGNC, and other databases.

Tips

  • Always append ?content-type=application/json to GET requests (or set the Accept header) -- the default is XML/HTML.
  • Use the GRCh37 base URL (grch37.rest.ensembl.org) if you need hg19 coordinates.
  • The /lookup/symbol endpoint is the fastest way to go from gene symbol to Ensembl ID.
  • For VEP, the HGVS endpoint is most convenient for single variants; the region POST endpoint is best for batch.
  • Combine /xrefs/id with gene IDs to cross-reference to UniProt, NCBI Gene, HGNC, and other databases.
Raw lines 546 to 552