# ChEMBL Drug & Molecule Scraper - Free Chemistry API (`ninhothedev/chembl-scraper`) Actor

$0.5/1K 🔥 ChEMBL scraper! Drugs & bioactive molecules — formula, weight, phase, SMILES & InChI. No key. JSON, CSV, Excel or API in seconds. Accelerate drug discovery & cheminformatics ⚡

- **URL**: https://apify.com/ninhothedev/chembl-scraper.md
- **Developed by:** [ninhothedev](https://apify.com/ninhothedev) (community)
- **Categories:** AI, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.50 / 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.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## ChEMBL Drug & Molecule Scraper — Free Chemistry Data, No API Key

Scrape **drugs and bioactive molecules from ChEMBL** (EMBL-EBI) into clean, structured JSON, CSV or Excel — **no API key, no login, no proxy required**. Search by drug name or browse the entire ChEMBL molecule table, and get molecular formula, molecular weight, clinical phase, Lipinski properties, SMILES and InChI keys in one row per molecule.

ChEMBL is the reference open database for medicinal chemistry: **2.9M+ molecules**, curated bioactivities and approved-drug annotations. This actor turns its web services into a ready-to-use dataset for drug discovery, cheminformatics and pharma research pipelines.

### What it does

- **Search mode** — full-text ChEMBL search for any drug or molecule name (`aspirin`, `imatinib`, `semaglutide`, or a ChEMBL ID like `CHEMBL25`).
- **Browse mode** — walk the complete ChEMBL molecule table page by page to build bulk datasets.
- One dataset item per molecule, deduplicated by ChEMBL ID across all queries.
- Every numeric field is coerced to a real number, so `molecular_weight`, `alogp` and `psa` are ready for pandas / RDKit without cleanup.

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| `mode` | select (`search` / `browse`) | `search` | Search by query, or browse all molecules |
| `queries` | array of strings | `["aspirin", "imatinib"]` | Drug/molecule names to search (search mode only) |
| `maxItems` | integer | `100` (max `1000`) | Maximum molecules saved to the dataset |

```json
{
  "mode": "search",
  "queries": ["aspirin", "imatinib", "atorvastatin"],
  "maxItems": 300
}
```

### Output

```json
{
  "chembl_id": "CHEMBL25",
  "name": "ASPIRIN",
  "max_phase": 4.0,
  "molecule_type": "Small molecule",
  "first_approval": 1950,
  "oral": true,
  "parenteral": false,
  "topical": false,
  "black_box_warning": false,
  "withdrawn": false,
  "molecular_weight": 180.16,
  "alogp": 1.31,
  "hba": 3,
  "hbd": 1,
  "psa": 63.6,
  "rotatable_bonds": 2,
  "ro5_violations": 0,
  "formula": "C9H8O4",
  "smiles": "CC(=O)Oc1ccccc1C(=O)O",
  "inchi_key": "BSYNRYMUTXBXSQ-UHFFFAOYSA-N",
  "url": "https://www.ebi.ac.uk/chembl/compound_report_card/CHEMBL25",
  "source": "chembl",
  "scraped_at": "2026-07-28T11:36:59+00:00"
}
```

All fields are nullable — ChEMBL does not compute properties for every entry (biotherapeutics, unknowns), so missing values come back as `null` instead of breaking your pipeline.

### Pricing

Runs on the **pay-per-usage** model — roughly **$0.5 per 1,000 molecules** at 512 MB memory. A typical 100-molecule search run costs a few cents and finishes in well under a minute.

### Use cases

- **Drug discovery** — pull approved-drug sets by clinical phase, first approval year and route of administration to seed target or repurposing screens.
- **Cheminformatics** — export SMILES and InChI keys in bulk for RDKit fingerprints, similarity search, clustering and QSAR modelling.
- **Pharma research** — track black-box warnings, withdrawn drugs and Lipinski rule-of-five violations across a compound portfolio.
- **Datasets & ML** — build training tables of molecular descriptors (MW, AlogP, HBA, HBD, PSA, rotatable bonds) for property-prediction models.

### Tips

- Use `browse` mode with `maxItems: 1000` to sample the database, then `search` mode for targeted follow-ups.
- Search matches synonyms and trade names too — `aspirin` returns aspirin salts, esters and combinations, all with their own ChEMBL IDs.
- Join results on `inchi_key` to merge ChEMBL data with PubChem, DrugBank or your internal compound registry.

### Related actors

- [PubChem Compounds Scraper](https://apify.com/ninhothedev/pubchem-compounds-scraper) — chemical structures and properties from PubChem
- [UniProt Scraper](https://apify.com/ninhothedev/uniprot-scraper) — protein sequences, functions and targets
- [openFDA Scraper](https://apify.com/ninhothedev/openfda-scraper) — drug labels, adverse events and recalls
- [Clinical Trials Scraper](https://apify.com/ninhothedev/clinical-trials-scraper) — study records from ClinicalTrials.gov

### Legal & data source

Data comes from the public [ChEMBL web services](https://www.ebi.ac.uk/chembl/api/data/docs) operated by EMBL-EBI. ChEMBL data is released under **CC BY-SA 3.0** — attribute ChEMBL when you republish. Only publicly accessible, non-personal scientific data is collected. Please keep run volumes reasonable to respect EMBL-EBI's shared infrastructure.

# Actor input Schema

## `mode` (type: `string`):

How to collect molecules. 'search' runs a full-text ChEMBL search for each of your queries (drug names, synonyms, ChEMBL IDs). 'browse' walks the complete ChEMBL molecule table page by page and ignores the queries field.

## `queries` (type: `array`):

Drug or molecule names to search for, one per line (for example 'aspirin', 'imatinib', 'CHEMBL25'). Only used when mode is 'search'. The maxItems budget is split evenly across all queries.

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

Maximum number of molecule records to save to the dataset across all queries. Hard capped at 1000 to keep runs fast and cheap.

## Actor input object example

```json
{
  "mode": "search",
  "queries": [
    "aspirin",
    "imatinib"
  ],
  "maxItems": 100
}
```

# 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 = {
    "queries": [
        "aspirin",
        "imatinib"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("ninhothedev/chembl-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 = { "queries": [
        "aspirin",
        "imatinib",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("ninhothedev/chembl-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 '{
  "queries": [
    "aspirin",
    "imatinib"
  ]
}' |
apify call ninhothedev/chembl-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,ninhothedev/chembl-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/thDOQqZWmWoi1NwRw/builds/M1ysbY3ixDHboqUz7/openapi.json
