arxiv-search
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChinesearXiv Search
arXiv 搜索
Search the complete arXiv database of preprints across physics, mathematics, computer science, and quantitative biology using natural language queries powered by Valyu's semantic search API.
使用Valyu的语义搜索API,通过自然语言查询搜索arXiv数据库中物理学、数学、计算机科学和定量生物学领域的全部预印本。
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 article content, not just abstracts
- Image Links: Includes figures and images from papers
- Comprehensive Coverage: Access to all of arXiv's preprint archive across multiple disciplines
- 无需解析API参数:直接传入自然语言查询即可,无需构建复杂的搜索参数
- 语义搜索:理解查询的含义,而非仅进行关键词匹配
- 全文访问:返回完整的文章内容,而非仅摘要
- 图片链接:包含论文中的图表和图片
- 全面覆盖:可访问arXiv跨多个学科的全部预印本文档库
Requirements
要求
- Node.js 18+ (uses built-in fetch)
- Valyu API key from https://platform.valyu.ai ($10 free credits)
- Node.js 18+(使用内置的fetch)
- 从https://platform.valyu.ai获取Valyu API密钥(赠送10美元免费额度)
CRITICAL: Script Path Resolution
重要提示:脚本路径解析
The commands in this documentation are relative to this skill's installation directory.
scripts/searchBefore running any command, locate the script using:
bash
ARXIV_SCRIPT=$(find ~/.claude/plugins/cache -name "search" -path "*/arxiv-search/*/scripts/*" -type f 2>/dev/null | head -1)Then use the full path for all commands:
bash
$ARXIV_SCRIPT "quantum entanglement" 15本文档中的命令是相对于该工具的安装目录的。
scripts/search运行任何命令前,请使用以下命令定位脚本:
bash
ARXIV_SCRIPT=$(find ~/.claude/plugins/cache -name "search" -path "*/arxiv-search/*/scripts/*" -type f 2>/dev/null | head -1)然后使用完整路径执行所有命令:
bash
$ARXIV_SCRIPT "quantum entanglement" 15API Key Setup Flow
API密钥设置流程
When you run a search and receive , follow this flow:
"setup_required": true-
Ask the user for their API key: "To search arXiv, I need your Valyu API key. Get one free ($10 credits) at https://platform.valyu.ai"
-
Once the user provides the key, run:bash
scripts/search setup <api-key> -
Retry the original search.
当你运行搜索并收到时,请按照以下流程操作:
"setup_required": true-
向用户索要API密钥: "要搜索arXiv,我需要你的Valyu API密钥。可前往https://platform.valyu.ai免费获取(赠送10美元额度)"
-
用户提供密钥后,运行以下命令:bash
scripts/search setup <api-key> -
重试原搜索请求。
Example Flow:
示例流程:
User: Search arXiv for transformer architecture papers
→ Response: {"success": false, "setup_required": true, ...}
→ Claude asks: "Please provide your Valyu API key from https://platform.valyu.ai"
→ User: "val_abc123..."
→ Claude runs: scripts/search setup val_abc123...
→ Response: {"success": true, "type": "setup", ...}
→ Claude retries: scripts/search "transformer architecture papers" 10
→ Success!用户:搜索arXiv中关于transformer架构的论文
→ 响应:{"success": false, "setup_required": true, ...}
→ Claude询问:"请提供你从https://platform.valyu.ai获取的Valyu API密钥"
→ 用户:"val_abc123..."
→ Claude运行:scripts/search setup val_abc123...
→ 响应:{"success": true, "type": "setup", ...}
→ Claude重试:scripts/search "transformer architecture papers" 10
→ 成功!When to Use This Skill
使用场景
- Searching preprints across physics, mathematics, and computer science
- Finding research before peer review publication
- Cross-disciplinary research combining fields
- Staying current with rapid developments in AI and theoretical physics
- Prior art searching for new ideas
- Tracking emerging research trends
- 搜索物理学、数学和计算机科学领域的预印本
- 在论文同行评审前查找研究成果
- 进行跨学科研究
- 跟进AI和理论物理学的快速发展
- 为新创意查找相关研究
- 追踪新兴研究趋势
Output Format
输出格式
json
{
"success": true,
"type": "arxiv_search",
"query": "quantum entanglement",
"result_count": 10,
"results": [
{
"title": "Article Title",
"url": "https://arxiv.org/abs/...",
"content": "Full article text with figures...",
"source": "arxiv",
"relevance_score": 0.95,
"images": ["https://example.com/figure1.jpg"]
}
],
"cost": 0.025
}json
{
"success": true,
"type": "arxiv_search",
"query": "quantum entanglement",
"result_count": 10,
"results": [
{
"title": "Article Title",
"url": "https://arxiv.org/abs/...",
"content": "Full article text with figures...",
"source": "arxiv",
"relevance_score": 0.95,
"images": ["https://example.com/figure1.jpg"]
}
],
"cost": 0.025
}Processing Results
结果处理
With jq
使用jq
bash
undefinedbash
undefinedGet article titles
获取文章标题
scripts/search "query" 10 | jq -r '.results[].title'
scripts/search "query" 10 | jq -r '.results[].title'
Get URLs
获取URL
scripts/search "query" 10 | jq -r '.results[].url'
scripts/search "query" 10 | jq -r '.results[].url'
Extract full content
提取完整内容
scripts/search "query" 10 | jq -r '.results[].content'
undefinedscripts/search "query" 10 | jq -r '.results[].content'
undefinedCommon Use Cases
常见使用案例
AI/ML Research
AI/ML研究
bash
undefinedbash
undefinedFind recent machine learning papers
查找近期机器学习论文
scripts/search "large language model architectures" 50
undefinedscripts/search "large language model architectures" 50
undefinedPhysics Research
物理学研究
bash
undefinedbash
undefinedSearch for quantum physics papers
搜索量子物理相关论文
scripts/search "topological quantum computation" 20
undefinedscripts/search "topological quantum computation" 20
undefinedMathematics
数学
bash
undefinedbash
undefinedFind math papers
查找数学论文
scripts/search "representation theory and Lie algebras" 15
undefinedscripts/search "representation theory and Lie algebras" 15
undefinedComputer Science
计算机科学
bash
undefinedbash
undefinedSearch for CS theory papers
搜索计算机科学理论论文
scripts/search "distributed systems consensus algorithms" 25
undefinedscripts/search "distributed systems consensus algorithms" 25
undefinedError Handling
错误处理
All commands return JSON with field:
successjson
{
"success": false,
"error": "Error message"
}Exit codes:
- - Success
0 - - Error (check JSON for details)
1
所有命令返回的JSON中包含字段:
successjson
{
"success": false,
"error": "Error message"
}退出码:
- - 成功
0 - - 错误(查看JSON获取详细信息)
1
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 CLIDirect API calls using Node.js built-in , zero external dependencies.
fetch()scripts/
├── search # Bash封装脚本
└── search.mjs # Node.js命令行工具使用Node.js内置的直接调用API,无外部依赖。
fetch()Adding to Your Project
集成到你的项目
If you're building an AI project and want to integrate arXiv Search directly into your application, use the Valyu SDK:
如果你正在构建AI项目并希望将arXiv搜索直接集成到应用中,请使用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-arxiv"],
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-arxiv"],
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-arxiv"],
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-arxiv"],
maxResults: 20
});
response.results.forEach((result) => {
console.log(`Title: ${result.title}`);
console.log(`URL: ${result.url}`);
console.log(`Content: ${result.content.substring(0, 500)}...`);
});查看Valyu文档获取完整集成示例和SDK参考。