DrugBank Downloads Help

Versioning Strategy

DrugBank releases use a form of Semantic Versioning for the DrugBank data. With this versioning strategy, the following applies:

For data exports (including XML), given a version number MAJOR.MINOR.PATCH (e.g. 4.5.0), we are using the following rules for updating the version:

  1. MAJOR version will be incremented when we make incompatible data schema changes (e.g. adding/removing/moving nodes)
  2. MINOR version will be incrementeed when we add new data in a backwards-compatible manner (e.g. adding a new drug group)
  3. PATCH version will be incremented with each new data export, and reset to 0 when the MAJOR or MINOR versions change.
  4. this versioning system, it makes it clearer how new releases will need to be integrated into your system. Each MAJOR and MINOR release will also include release notes detailing the changes.

Releases

Releases are kept indefinetly, tied to their specific version, meaning you can always go back to a previous version. This means you can reference a particular version of DrugBank in publications, posters, and software.

Downloading Programmatically

Data files are accessible using HTTP basic authentication, using your account email and password. Downloads are named by the drug category and type. You can view the different names on the download pages, or get a list of downloads for a release in JSON format.

Note that you need to pass the -L parameter to tell cURL to follow redirects (our data is stored privately on Amazon S3).


Grab the latest full XML download:
> curl -Lfv -o filename.zip -u EMAIL:PASSWORD https://portal.drugbank.com/releases/latest/downloads/all-full-database 

You can also access the downloads by version and name using the following URL format:
> curl -Lfv -o filename.zip -u EMAIL:PASSWORD https://portal.drugbank.com/releases/4-5-0/downloads/all-full-database 

Querying Downloads

You can access information about releases and downloads in JSON format.


To get a list of all releases in JSON format, you can access this URL:
> curl -L -u vandelay@example.com:PASSWORD https://portal.drugbank.com/releases.json 

To get a list of all downloads in JSON format for the latest release, you can access this URL:
> curl -L -u vandelay@example.com:PASSWORD https://portal.drugbank.com/releases/latest.json 

To get a list of all downloads in JSON format for a particular release, you can access this URL:
> curl -L -u vandelay@example.com:PASSWORD https://portal.drugbank.com/releases/4-5-0.json