Summary: Get sequence by ID Operation ID: getSequenceById Auth: none
Retrieve the actual DNA, RNA, or protein sequence for an Ensembl feature by its stable ID. Returns the raw sequence string along with metadata about the molecule type. Can retrieve genomic DNA, cDNA (spliced transcript), coding sequences (CDS), or protein sequences depending on the type parameter. This is the primary endpoint for fetching sequence data from Ensembl.
Original spec description
Request multiple types of sequence by stable identifier. Supports feature masking and expand options.
Usage Tips
- Default returns genomic DNA which can be huge for large genes (85KB+ for BRCA2)
- Use `type=protein` for protein sequences (returns ~3,418 amino acids for typical protein)
- Use `type=cdna` for spliced transcript sequences (introns removed)
- Use `type=cds` for coding sequences only (UTRs removed)
- The response includes a `molecule` field confirming what you received
Parameters (5)
expand_3prime(integer, query, optional)
Expand sequence downstream (3') by this many base pairs
expand_5prime(integer, query, optional)
Expand sequence upstream (5') by this many base pairs