For Developers

Get Started

The GDC Application Programming Interface (API) is the external facing Representational State Transfer (REST) interface that drives the GDC Data Portal and is made accessible to external users for programmatic access to the same functionality found through the GDC Data Portal. This includes searching for and downloading subsets of data files, metadata, and annotations based on specific parameters, BAM Slicing endpoints as well as submission of new projects and associated data to the GDC.

Please visit the GDC API to access the REST interface and the GDC API Usage Guide for instructions and code examples for using the GDC API.

More about the API

Source code

Illustration: For Developers GitHub Source Code Extensive Support API

From the GDC FAQ

How can I download BAM index files (BAI files) using the API?

BAI files are included with the download when using the GDC Data Transfer Tool to download BAM files. When using the API to download BAM files, BAI files will only be included if the `related_files=true` parameter is specified together with the BAM UUID, for example: ```https://api.gdc.cancer.gov/data/53f4ad60-0777-409c-a34d-ca4442dc9c44?related_files=true``` Alternatively, users can determine the BAI file UUID from the API `files` endpoint by supplying the BAM UUID. The BAI file UUID can then be used to download the BAI file from the `data` endpoint. ```https://api.gdc.cancer.gov/files/53f4ad60-0777-409c-a34d-ca4442dc9c44?pretty=true&expand=index_files``` ```https://api.gdc.cancer.gov/data/60cefd89-b428-46b7-b5b0-3b6e2743ab20``` ***Note:*** BAI files are not available for sliced BAM files.

Need Assistance?

Need help with data retrieval, download, or submission?