Get Cross-Database References
ensembl_get_xrefsRetrieve cross-database references for a gene or feature — HGNC, UniProt, EntrezGene, OMIM, RefSeq, Reactome, and others. Returns each xref with its database name, primary ID, display ID, and description, plus how Ensembl assigned it (infoType, infoText) and its evidence codes (linkageTypes, such as GO evidence codes) when supplied. By default only the requested object level is queried; all_levels=true includes transcript and translation references for a gene. The dbname filter narrows this scope. IDs returned here chain onward: a Uniprot/SWISSPROT accession to UniProt (protein function) and PubChem (bioassays against the protein), MIM_GENE to OMIM (disease), Reactome_gene and Reactome to Reactome (pathways), and PDB to structure sources. Requires an Ensembl stable ID — use ensembl_lookup_gene to get the ENSG… ID first. Common dbname values: HGNC, Uniprot_gn, Uniprot/SWISSPROT (reviewed UniProt accession, held on the translation: use all_levels=true from a gene or transcript), EntrezGene, MIM_GENE, RefSeq_mRNA, RefSeq_peptide, Reactome_gene (gene pathways), Reactome (translation pathways), GO (Gene Ontology), ChEMBL.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Ensembl stable gene (ENSG…), transcript (ENST…), or translation (ENSP…) ID. A version suffix on an ENS… ID (ENSG00000139618.17) is dropped before the request. Use ensembl_lookup_gene to get the stable ID from a gene symbol. References default to this object level; all_levels=true includes child objects. | |
| dbname | No | Filter to a specific external database by its Ensembl internal name. Examples: HGNC (HGNC gene ID), Uniprot_gn (UniProt gene name), Uniprot/SWISSPROT (reviewed UniProt accession, on the translation), EntrezGene (NCBI Gene ID), MIM_GENE (OMIM disease gene), RefSeq_mRNA (NCBI RefSeq transcript), Reactome_gene (gene pathways), Reactome (translation pathways), GO (Gene Ontology terms). Transcript/translation references may require all_levels=true or the specific feature ID. Omit to return every database within the selected scope. | |
| all_levels | No | Include references on child objects: a gene includes its transcripts and translations. Default false queries only the requested object level, independently of dbname. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | Present when the call failed. Absent on success. | |
| xrefs | No | Cross-database references for the queried Ensembl ID. | |
| notice | No | Guidance when no cross-references are found. | |
| queriedId | No | The Ensembl stable ID as submitted, including any version suffix. | |
| totalCount | No | Total number of cross-references returned. |