scientific-skills/database-lookup/references/ucsc-genome.md
Provides programmatic access to genome annotations, gene tracks, sequence data, and other resources from the UCSC Genome Browser database.
https://api.genome.ucsc.edu
None required (public, unauthenticated).
JSON for all endpoints.
GET /list/ucscGenomes
Returns all genome assemblies (hg38, mm39, etc.) with descriptions.
GET /list/tracks?genome=hg38
Returns all annotation tracks available for the specified assembly.
GET /list/chromosomes?genome=hg38
Optional: add &track=<trackName> to limit to chroms with data in that track.
GET /list/schema?genome=hg38&track=knownGene
Returns table schema including field names, types, and SQL create statement.
GET /getData/track?genome=hg38&track=knownGene&chrom=chr1&start=11873&end=14409
Parameters:
genome -- assembly name (required)track -- track name (required)chrom -- chromosome (optional, limits to one chrom)start, end -- 0-based half-open coordinates (optional, requires chrom)maxItemsOutput -- limit number of items returned (default 1000 for some tracks)GET /getData/sequence?genome=hg38&chrom=chr1&start=11873&end=11893
Returns DNA sequence for the specified region. Coordinates are 0-based half-open.
GET /search?search=BRCA1&genome=hg38
Returns matching positions across tracks (gene names, accessions, etc.).
GET /list/hubGenomes?hubUrl=<hubURL>
Lists genomes available in a track hub.
GET https://api.genome.ucsc.edu/getData/track?genome=hg38&track=ncbiRefSeq&chrom=chr17&start=43044295&end=43125483
GET https://api.genome.ucsc.edu/getData/sequence?genome=hg38&chrom=chr7&start=117119148&end=117119178
{
"genome": "hg38",
"chrom": "chr7",
"start": 117119148,
"end": 117119178,
"dna": "atgcagatatcagcgatgcagatcgatcg..."
}
{
"genome": "hg38",
"track": "ncbiRefSeq",
"chrom": "chr17",
"start": 43044295,
"end": 43125483,
"ncbiRefSeq": [
{
"chrom": "chr17",
"chromStart": 43044295,
"chromEnd": 43125483,
"name": "NM_007294.4",
"strand": "-",
"name2": "BRCA1",
"exonCount": 23,
"exonStarts": "43044295,43047642,...",
"exonEnds": "43045802,43047703,..."
}
]
}
All coordinates are 0-based, half-open (standard BED format). This means
start is inclusive and end is exclusive.
maxItemsOutputhg38 -- Human GRCh38 (current)hg19 -- Human GRCh37mm39 -- Mouse GRCm39mm10 -- Mouse GRCm38dm6 -- DrosophiladanRer11 -- ZebrafishsacCer3 -- Yeast