chembl-search

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

ChEMBL Search

ChEMBL搜索

Search the complete ChEMBL database of bioactive molecules, drug targets, and binding data using natural language queries powered by Valyu's semantic search API.
使用Valyu语义搜索API提供的自然语言查询功能,搜索完整的ChEMBL生物活性分子、药物靶点和结合数据库。

Why This Skill is Powerful

该工具的强大之处

  • No API Parameter Parsing: Just pass natural language queries directly - no need to construct complex search parameters
  • Semantic Search: Understands the meaning of your query, not just keyword matching
  • Full-Text Access: Returns complete compound and target information
  • Image Links: Includes molecular structures and data visualizations
  • Comprehensive Coverage: Access to all ChEMBL bioactive molecule data for drug discovery
  • 无需解析API参数:直接传入自然语言查询,无需构建复杂的搜索参数
  • 语义搜索:理解查询的含义,而非仅进行关键词匹配
  • 全文访问:返回完整的化合物和靶点信息
  • 图片链接:包含分子结构和数据可视化内容
  • 全面覆盖:可访问ChEMBL所有用于药物研发的生物活性分子数据

Requirements

要求

  1. Node.js 18+ (uses built-in fetch)
  2. Valyu API key from https://platform.valyu.ai ($10 free credits)
  1. Node.js 18+(使用内置的fetch)
  2. https://platform.valyu.ai获取Valyu API密钥(赠送10美元免费额度)

CRITICAL: Script Path Resolution

重要提示:脚本路径解析

The
scripts/search
commands in this documentation are relative to this skill's installation directory.
Before running any command, locate the script using:
bash
CHEMBL_SCRIPT=$(find ~/.claude/plugins/cache -name "search" -path "*/chembl-search/*/scripts/*" -type f 2>/dev/null | head -1)
Then use the full path for all commands:
bash
$CHEMBL_SCRIPT "kinase inhibitors" 15
本文档中的
scripts/search
命令是相对于该工具的安装目录的。
在运行任何命令之前,请使用以下命令定位脚本:
bash
CHEMBL_SCRIPT=$(find ~/.claude/plugins/cache -name "search" -path "*/chembl-search/*/scripts/*" -type f 2>/dev/null | head -1)
然后使用完整路径执行所有命令:
bash
$CHEMBL_SCRIPT "kinase inhibitors" 15

API Key Setup Flow

API密钥设置流程

When you run a search and receive
"setup_required": true
, follow this flow:
  1. Ask the user for their API key: "To search ChEMBL, I need your Valyu API key. Get one free ($10 credits) at https://platform.valyu.ai"
  2. Once the user provides the key, run:
    bash
    scripts/search setup <api-key>
  3. Retry the original search.
当你运行搜索并收到
"setup_required": true
时,请按照以下流程操作:
  1. 向用户索要API密钥: "要搜索ChEMBL,我需要你的Valyu API密钥。可从https://platform.valyu.ai免费获取(赠送10美元额度)"
  2. 用户提供密钥后,运行:
    bash
    scripts/search setup <api-key>
  3. 重试原搜索请求。

When to Use This Skill

适用场景

  • Finding bioactive compounds for drug discovery
  • Target-based compound searching
  • Compound property optimization
  • Assay data and biological activity research
  • Structure-activity relationship studies
  • Lead compound identification
  • 为药物研发查找生物活性化合物
  • 基于靶点的化合物搜索
  • 化合物属性优化
  • 试验数据和生物活性研究
  • 构效关系研究
  • 先导化合物识别

Output Format

输出格式

json
{
  "success": true,
  "type": "chembl_search",
  "query": "kinase inhibitors",
  "result_count": 10,
  "results": [
    {
      "title": "Compound/Assay Title",
      "url": "https://chembl.org/...",
      "content": "Compound data, targets, assay results...",
      "source": "chembl",
      "relevance_score": 0.95,
      "images": ["https://example.com/structure.png"]
    }
  ],
  "cost": 0.025
}
json
{
  "success": true,
  "type": "chembl_search",
  "query": "kinase inhibitors",
  "result_count": 10,
  "results": [
    {
      "title": "Compound/Assay Title",
      "url": "https://chembl.org/...",
      "content": "Compound data, targets, assay results...",
      "source": "chembl",
      "relevance_score": 0.95,
      "images": ["https://example.com/structure.png"]
    }
  ],
  "cost": 0.025
}

Processing Results

结果处理

With jq

使用jq工具

bash
undefined
bash
undefined

Get compound titles

Get compound titles

scripts/search "query" 10 | jq -r '.results[].title'
scripts/search "query" 10 | jq -r '.results[].title'

Get URLs

Get URLs

scripts/search "query" 10 | jq -r '.results[].url'
scripts/search "query" 10 | jq -r '.results[].url'

Extract full content

Extract full content

scripts/search "query" 10 | jq -r '.results[].content'
undefined
scripts/search "query" 10 | jq -r '.results[].content'
undefined

Common Use Cases

常见用例

Drug Discovery

药物研发

bash
undefined
bash
undefined

Find lead compounds

Find lead compounds

scripts/search "JAK2 selective inhibitors for myelofibrosis" 50
undefined
scripts/search "JAK2 selective inhibitors for myelofibrosis" 50
undefined

Target Validation

靶点验证

bash
undefined
bash
undefined

Search for target information

Search for target information

scripts/search "protein kinase B binding assays" 20
undefined
scripts/search "protein kinase B binding assays" 20
undefined

SAR Analysis

构效关系分析

bash
undefined
bash
undefined

Find structure-activity relationships

Find structure-activity relationships

scripts/search "benzimidazole derivatives anticancer activity" 15
undefined
scripts/search "benzimidazole derivatives anticancer activity" 15
undefined

Mechanism Research

作用机制研究

bash
undefined
bash
undefined

Search for mechanism data

Search for mechanism data

scripts/search "allosteric modulators of NMDA receptors" 25
undefined
scripts/search "allosteric modulators of NMDA receptors" 25
undefined

Error Handling

错误处理

All commands return JSON with
success
field:
json
{
  "success": false,
  "error": "Error message"
}
Exit codes:
  • 0
    - Success
  • 1
    - Error (check JSON for details)
所有命令返回的JSON中包含
success
字段:
json
{
  "success": false,
  "error": "Error message"
}
退出码:
  • 0
    - 成功
  • 1
    - 错误(查看JSON获取详细信息)

API Endpoint

API端点

  • Base URL:
    https://api.valyu.ai/v1
  • Endpoint:
    /search
  • Authentication: X-API-Key header
  • 基础URL:
    https://api.valyu.ai/v1
  • 端点:
    /search
  • 身份验证: X-API-Key请求头

Architecture

架构

scripts/
├── search          # Bash wrapper
└── search.mjs      # Node.js CLI
Direct API calls using Node.js built-in
fetch()
, zero external dependencies.
scripts/
├── search          # Bash wrapper
└── search.mjs      # Node.js CLI
使用Node.js内置的
fetch()
直接调用API,无外部依赖。

Adding to Your Project

集成到你的项目中

If you're building an AI project and want to integrate ChEMBL Search directly into your application, use the Valyu SDK:
如果你正在构建AI项目,希望将ChEMBL搜索直接集成到应用中,请使用Valyu SDK:

Python Integration

Python集成

python
from valyu import Valyu

client = Valyu(api_key="your-api-key")

response = client.search(
    query="your search query here",
    included_sources=["valyu/valyu-chembl"],
    max_results=20
)

for result in response["results"]:
    print(f"Title: {result['title']}")
    print(f"URL: {result['url']}")
    print(f"Content: {result['content'][:500]}...")
python
from valyu import Valyu

client = Valyu(api_key="your-api-key")

response = client.search(
    query="your search query here",
    included_sources=["valyu/valyu-chembl"],
    max_results=20
)

for result in response["results"]:
    print(f"Title: {result['title']}")
    print(f"URL: {result['url']}")
    print(f"Content: {result['content'][:500]}...")

TypeScript Integration

TypeScript集成

typescript
import { Valyu } from "valyu-js";

const client = new Valyu("your-api-key");

const response = await client.search({
  query: "your search query here",
  includedSources: ["valyu/valyu-chembl"],
  maxResults: 20
});

response.results.forEach((result) => {
  console.log(`Title: ${result.title}`);
  console.log(`URL: ${result.url}`);
  console.log(`Content: ${result.content.substring(0, 500)}...`);
});
See the Valyu docs for full integration examples and SDK reference.
typescript
import { Valyu } from "valyu-js";

const client = new Valyu("your-api-key");

const response = await client.search({
  query: "your search query here",
  includedSources: ["valyu/valyu-chembl"],
  maxResults: 20
});

response.results.forEach((result) => {
  console.log(`Title: ${result.title}`);
  console.log(`URL: ${result.url}`);
  console.log(`Content: ${result.content.substring(0, 500)}...`);
});
更多完整的集成示例和SDK参考,请查看Valyu文档