REST service

Ensembl Genomes provides a RESTful web service giving language-independent programmatic access to data including sequences, genes and gene trees, and tools including assembly conversion and variant effect predictors. Full documentation, including extensive code samples, is available at https://rest.ensembl.org and https://github.com/Ensembl/ensembl-rest/wiki

Accessing Compara Data through the Ensembl REST API

Note when using the REST API with Compara end-points such as genetree or homology, the particular compara database to use can be selected using the appropriate compara argument (metazoa, protists, plants, fungi, pan_homology).

For example, to select homologies for a given metazoan gene in the default metazoan compara:

https://rest.ensembl.org/homology/id/drosophila_melanogaster/FBgn0000055?compara=metazoa&content-type=application/json

To select gene trees for a given fungal gene in the default fungal compara, use the following form of URL:

https://rest.ensembl.org/genetree/member/id/saccharomyces_cerevisiae/YHR053C?compara=fungi&content-type=application/json

To select gene trees for a plant gene in the pan-taxonomic compara, use the following form of URL:

https://rest.ensembl.org/genetree/member/id/vitis_vinifera/Vitis12g00114?compara=plants&content-type=application/json

The compara argument applies for any compara-related endpoint, and is recommended.