# Chembl Database

Query the ChEMBL database for bioactive molecules, drug targets, bioactivity data...

- Repository: https://github.com/google-deepmind/science-skills (3377 stars)
- Category: Data and ML
- License: Apache-2.0
- Last updated: 2026-10-23
- Runs scripts: yes, review before use

## Install

Claude Code: `npx skills add google-deepmind/science-skills --skill chembl-database -g -a claude-code -y`
Codex: `npx skills add google-deepmind/science-skills --skill chembl-database -g -a codex -y`
Cursor: `npx skills add google-deepmind/science-skills --skill chembl-database -g -a cursor -y`
Gemini CLI: `npx skills add google-deepmind/science-skills --skill chembl-database -g -a gemini-cli -y`

## Description

Query the ChEMBL database for bioactive molecules, drug targets, bioactivity data, approved drugs, and chemical structures. Use when the user asks about compounds, targets, IC50/Ki values, drug mechanisms, or structure searches.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# ChEMBL Database Query

## Prerequisites

1.  **`uv`**: Read the `uv` skill and follow its Setup instructions to ensure
    `uv` is installed and on PATH.
2.  **User Notification**: If .licenses/chembl_database_LICENSE.txt does not
    already exist in the workspace root directory then (1) prominently notify
    the user to check the terms at
    https://chembl.gitbook.io/chembl-interface-documentation/about, then (2)
    create the file recording the notification text and timestamp.

## Core Rules

-   [!IMPORTANT] **Use the Utility Scripts**: You MUST ALWAYS use the provided
    utility script `scripts/chembl_api.py` for all ChEMBL API interactions,
    including checking status. NEVER use `curl` or custom Python requests to
    query the ChEMBL API directly. This ensures rate limit is enfoced and also
    retries on network errors.

-   **Output to File (Required)**: The `--output` flag is **required** for every
    subcommand. All JSON results are written to the specified file. After
    running the command, read the output file with jq or your own code to
    extract the data. List results are typically wrapped in a JSON array keyed
    by the endpoint name (e.g., `molecules`, `activities`).

-   **Notification**: If this skill is used, ensure this is mentioned in the
    output.

## Utility Script

All ChEMBL API queries use one script with subcommands:

```bash
uv run scripts/chembl_api.py <subcommand> --output <file> [options]
```

--------------------------------------------------------------------------------

### 1. Check API Status

```bash
uv run scripts/chembl_api.py status --output /tmp/status.json
```

--------------------------------------------------------------------------------

### 2. Molecule Queries

**Fetch by ChEMBL ID:** `bash uv run scripts/chembl_api.py molecule --id
CHEMBL25 --output /tmp/mol.json`

**Search by name:** `bash uv run scripts/chembl_api.py molecule --search
"aspirin" --limit 3 --output /tmp/mol_search.json`

The rest: https://github.com/google-deepmind/science-skills/blob/HEAD/skills/chembl_database/SKILL.md
