GtoPdb Download changes coming soon…

Ahead of this release we want to make users aware of some important changes regarding accessing GtoPdb download files.

GtoPdb supplies a number of download files on it’s website, the majority of these are accessible via our downloads page:  http://www.guidetopharmacology.org/downloads.jsp.

To enhance data security and provide better audit trails, we will be updating how files are accessed programmatically. Direct links to data files will no longer be available. All downloads will have to be authenticated.

What Is Changing?

  • Old URLs Deprecated: Links pointing directly to files (e.g., /DATA/ligands.csv) will now return a 404 Not Found error.
  • New Secure Endpoint: All downloads must go through our secure service: /gtopdb-downloads.
  • Authentication Required: Both browser users and automated scripts must provide valid credentials.

For Browser Users

No action is required!

  1. Log in to the website as usual.
  2. Navigate to the Downloads page.
  3. Click the file links. You will be able to download files normally

For Script Users (curl, Python, wget etc.)

If you use scripts to download data, you must now include an API Key in your requests. Requests without authentication will fail.

Step 1: Get Your API Key

Contact us to and we will generate and API Key for you

Step 2: Update your scripts

You must pass the API Key in the GTP-API-Key HTTP header.

cURL
curl -H "GTP-API-Key: YOUR_GENERATED_KEY_HERE" -O "https://www.guidetopharmacology.org/gtopdb-downloads?file=ligands.csv"
Python
import requests
url = "https://www.guidetopharmacology.org/gtopdb-downloads" params = {"file": "ligands.csv"} headers = {"GTP-API-Key": "YOUR_GENERATED_KEY_HERE"}

response = requests.get(url, params=params, headers=headers)

if response.status_code == 200: with open("ligands.csv", "wb") as f: f.write(response.content) print("Download successful!") else: print(f"Error: {response.status_code} - {response.text}")
wget
wget --header="GTP-API-Key: YOUR_GENERATED_KEY_HERE" \
     "https://www.guidetopharmacology.org/gtopdb-downloads?file=ligands.csv"

 

Posted in Database updates, Technical

Leave a Reply