# DrugBank Open Drug Reference Scraper (`acquistion-automation/drugbank-open-scraper`) Actor

Scrapes structured drug entries from the public DrugBank database. Filter by group and collect up to a million rows with a fixed schema.

- **URL**: https://apify.com/acquistion-automation/drugbank-open-scraper.md
- **Developed by:** [Acquisition Automation Co.](https://apify.com/acquistion-automation) (community)
- **Categories:** Education, Developer tools, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.52 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

### DrugBank Open Drug Reference Scraper

**Scrape DrugBank's open drug reference, up to a million drugs per run.** Every drug comes with its identifiers, categories, and computed properties. No login or API key. Export to CSV, JSON, Excel, or XML.

DrugBank's official API needs a paid subscription and rate-limits you. This reads the public drug listing directly, filtered by drug group, and returns each match in one fixed schema. It is the fastest way to build a local copy of the open drug reference for research, analysis, or app development.

| Who uses it | What they scrape DrugBank for |
|---|---|
| Pharmacologists | Which approved drugs share a structural class |
| Bioinformaticians | A clean dataset of drug identifiers for a knowledge graph |
| Health data analysts | Which withdrawn drugs are still mentioned in clinical notes |
| App developers | A local drug reference for a medication lookup feature |

### What it does

This Actor collects DrugBank drugs by group, and returns each one as a flat row.

- 📋 **Group filter:** approved, experimental, nutraceutical, illicit, withdrawn, or investigational.
- 🔢 **Max items:** cap the run from 1 to 1,000,000 drugs.
- 📦 **Flat rows:** one drug per row, ready for CSV, JSON, Excel, or XML.

Results export to CSV, JSON, Excel, or XML, or straight from the API.

### What you can do with DrugBank data

**🧪 Build a research dataset.**

A pharmacologist runs the Actor with group set to Approved and maxItems 50000 to get a clean CSV of approved drugs for a drug repurposing screen.

**📊 Track regulatory changes.**

A health data analyst runs the Actor weekly with group set to Withdrawn to monitor which drugs have been pulled from the market.

**🔍 Power a medication lookup.**

An app developer runs the Actor once with group set to All to populate a local drug reference for a medication search feature.

**🧬 Enrich a knowledge graph.**

A bioinformatician runs the Actor with group set to Experimental to collect drug identifiers for a drug-target interaction graph.

### Why choose this scraper

| | What you get |
|---|---|
| **No API key** | Read the public listing without registration or rate limits |
| **Group filter** | Target approved, experimental, or withdrawn drugs in one run |
| **Fixed schema** | Every drug returns the same fields, so joins and merges stay clean |
| **Bulk export** | CSV, JSON, Excel, or XML for any downstream tool |

### How it compares

No other Store actor targets DrugBank the same way, so the honest comparison is with the alternatives teams actually weigh.

| | DrugBank Open Drug Reference Scraper | Build it in-house | By hand |
|---|---|---|---|
| Setup | Run it now, zero config | Days of engineering | None, but hours per pull |
| When DrugBank changes | Maintained for you | You fix it | You re-learn the page |
| Proxies, retries, anti-bot | Built in | Your problem | Browser only |
| Output | Fixed JSON schema, CSV/Excel export | Whatever you build | Copy-paste |
| Cost | Pay per result | Engineering time | Analyst hours |

### Configure the run

Drive the Actor from the drug group selector, and the max items cap runs as the list is read so only the first N matches reach your dataset. The Input tab lists every parameter.

A first run with the defaults:

```json
{
 "maxItems": 10
}
```

A larger pull:

```json
{
 "maxItems": 200
}
```

### Pricing

Pay-per-result: **$0.005 per result** collected. You pay only for the results written to your dataset.

| Results collected | Approximate cost |
|---|---|
| 100 results | $0.50 |
| 1,000 results | $5.00 |
| 10,000 results | $50.00 |

New Apify accounts start with $5 in free credit.

### Free users

Free-plan runs return up to 10 results as a preview. [Upgrade your Apify plan](https://console.apify.com/sign-up) to collect up to 1,000,000 results per run.

### Run it

1. [Create a free Apify account with $5 in credit](https://console.apify.com/sign-up).
2. Open the [DrugBank Open Drug Reference Scraper](https://apify.com/acquistion-automation/drugbank-open-scraper).
3. Set your inputs and any filters, then click **Start**.
4. Export the results as CSV, Excel, JSON, or XML from the **Dataset** tab.

Run it programmatically through the [Apify API](https://docs.apify.com/api/v2) (`run-sync-get-dataset-items`) or the [ApifyClient](https://docs.apify.com/api/client/js) for JavaScript and Python.

### Use with AI agents (MCP)

Give an AI agent live access to DrugBank through the Model Context Protocol. Add the Actor to Claude, Cursor, or any MCP client:

```bash
claude mcp add --transport http apify "https://mcp.apify.com?tools=acquistion-automation/drugbank-open-scraper"
```

Then prompt it in plain language to run the scraper and read back the results.

### Troubleshooting

**Why am I getting no results?**

Check the group filter. If you selected a group with no drugs, the dataset will be empty. Try setting group to All Drugs.

**Why did the run stop before maxItems?**

The Actor stops when it reaches the end of the listing. If the selected group has fewer drugs than maxItems, you will get all of them.

**Why are some fields empty?**

Not every drug has every field. The open reference may omit some properties for certain drugs.

**Why is the run slow?**

The Actor reads pages sequentially. For large runs, increase the timeout or split the work by group.

**Can I scrape a single drug by name?**

This Actor browses the listing, not individual drug pages. To get one drug, run with a small maxItems and filter the result.

### FAQ

| Question | Answer |
|---|---|
| Do I need a DrugBank API key? | No. This Actor reads the public drug listing, so no registration or key is required. |
| What is the difference between this and the official DrugBank API? | The official API is a paid product with rate limits. This Actor scrapes the open reference, which is free but may have fewer fields per drug. |
| Can I filter by drug group? | Yes. Use the group input to select approved, experimental, nutraceutical, illicit, withdrawn, or investigational. |
| How many drugs can I scrape in one run? | You can set maxItems from 1 to 1,000,000. The default is 10. |
| What format is the output? | The Actor returns a flat dataset. You can export it as CSV, JSON, Excel, or XML from the Apify platform. |
| Does this Actor get the full drug record? | It collects the fields available on the public listing. For the complete record, you would need the official API. |
| Can I schedule this Actor to run daily? | Yes. Use Apify's scheduler to run it on a cron expression, and store the results in a dataset or key-value store. |
| Is this Actor legal to use? | You are responsible for complying with DrugBank's terms of service. The Actor only reads publicly available pages. |
| What if I need more than a million drugs? | DrugBank's open reference has fewer than a million drugs. If you need more, contact support to discuss a custom solution. |
| Can I get the data via API instead of a file? | Yes. You can access the dataset through the Apify API, or use the Actor's API endpoint to trigger runs and fetch results. |

🆘 **Need help?** Open an issue in the Issues tab of this Actor with your run ID, your input, and what you expected.

⚠️ **Disclaimer.** This Actor is unofficial and is not affiliated with, endorsed by, or sponsored by DrugBank. It collects only publicly available data. You are responsible for using the collected data in compliance with the source's terms of service and applicable data-protection laws, including GDPR, CCPA, and PIPL. Do not use it to collect personal data unlawfully.

# Actor input Schema

## `group` (type: `string`):

Optional. Limit the browse list to a DrugBank group. Leave as All for the full listing.

## `maxItems` (type: `integer`):

Maximum number of drugs to collect per run.

## Actor input object example

```json
{
  "group": "",
  "maxItems": 10
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "maxItems": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("acquistion-automation/drugbank-open-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "maxItems": 10 }

# Run the Actor and wait for it to finish
run = client.actor("acquistion-automation/drugbank-open-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "maxItems": 10
}' |
apify call acquistion-automation/drugbank-open-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,acquistion-automation/drugbank-open-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/UPEBA5ZVldg9V5MjZ/builds/kDVEDXy2bqH5zgmQb/openapi.json
