# Opentargets Database

Query Open Targets Platform for target-disease associations, drug target discovery...

- Repository: https://github.com/google-deepmind/science-skills (3377 stars)
- Category: Engineering
- 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 opentargets-database -g -a claude-code -y`
Codex: `npx skills add google-deepmind/science-skills --skill opentargets-database -g -a codex -y`
Cursor: `npx skills add google-deepmind/science-skills --skill opentargets-database -g -a cursor -y`
Gemini CLI: `npx skills add google-deepmind/science-skills --skill opentargets-database -g -a gemini-cli -y`

## Description

Query Open Targets Platform for target-disease associations, drug target discovery, tractability/safety data, genetics/omics evidence, known drugs, for therapeutic target identification.

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

# Open Targets Database Skill

## Overview

This skill provides access to the Open Targets Platform GraphQL API. It
aggregates multi-modal evidence from genetics (GWAS/eQTL), pathways, animal
models, and clinical trials to rank target-disease associations and identify
druggable genes.

## 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/opentargets_database_LICENSE.txt does
    not already exist in the workspace root directory then (1) prominently
    notify the user to check the terms at
    https://platform-docs.opentargets.org/licence, then (2) create the file
    recording the notification text and timestamp.

## Core Rules

-   **Use the Wrapper**: ALWAYS execute the provided helper scripts to query the
    database rather than accessing the database directly. The scripts
    automatically enforce fair use and implement retry logic.
-   **Output Flag**: The `--output` flag is always required as output can be
    very large. Use `jq` or write your own code to process this JSON file.
-   **Notification**: If this skill is used, ensure this is mentioned in the
    output.

## Quick Reference

Always use the provided Python script `scripts/query_opentargets.py` to quickly
query the database. It handles API communication, retries, formatting, and
automatically truncates overly large responses. NEVER write your own curl or
similar requests.

**Usage:**

```bash
uv run scripts/query_opentargets.py --output /tmp/opentargets_results.json [OPTIONS] COMMAND [ARGS]...
```

**Common Options:**

-   `--output PATH`: **Required**. Path to write the JSON output file.
-   `--limit N`: Limit the number of items returned in arrays (default is 50).
    Use a smaller number like 10 when doing preliminary exploration.
-   `--page-size N`: Set the API pagination size (default is 200). Increase if
    you need more results (e.g., a study with many credible sets).

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