exa-search
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseExa Search Skill
Exa 搜索Skill
Trigger Conditions & Endpoint Selection
触发条件与端点选择
Choose Exa endpoint based on user intent:
- search: Need semantic search / find web pages / research topics
- contents: Given result IDs, need to extract full content
- findsimilar: Given URL, need to find similar pages
- answer: Need direct answer to a question
- research: Need structured research output following given
output_schema
根据用户意图选择Exa端点:
- search:需要语义搜索 / 查找网页 / 研究主题
- contents:给定结果ID,需要提取完整内容
- findsimilar:给定URL,需要查找相似页面
- answer:需要问题的直接答案
- research:需要遵循给定的结构化研究输出
output_schema
Recommended Architecture (Main Skill + Sub-skill)
推荐架构(主Skill + 子Skill)
This skill uses a two-phase architecture:
- Main skill (current context): Understand user question → Choose endpoint → Assemble JSON payload
- Sub-skill (fork context): Only responsible for HTTP call execution, avoiding conversation history token waste
本Skill采用两阶段架构:
- 主Skill(当前上下文):理解用户问题 → 选择端点 → 组装JSON请求体
- 子Skill(分支上下文):仅负责HTTP调用执行,避免对话历史的token浪费
Execution Method
执行方法
Use Task tool to invoke sub-skill, passing command and JSON (stdin):
exa-fetcherTask parameters:
- subagent_type: Bash
- description: "Call Exa API"
- prompt: cat <<'JSON' | node .claude/skills/exa-search/exa-api.js <search|contents|findsimilar|answer|research>
{ ...payload... }
JSON使用Task工具调用子Skill,传入命令和JSON(标准输入):
exa-fetcherTask parameters:
- subagent_type: Bash
- description: "Call Exa API"
- prompt: cat <<'JSON' | node .claude/skills/exa-search/exa-api.js <search|contents|findsimilar|answer|research>
{ ...payload... }
JSONPayload Examples
请求体示例
1) Search
1) 搜索
bash
cat <<'JSON' | node .claude/skills/exa-search/exa-api.js search
{
"query": "Latest research in LLMs",
"type": "auto",
"numResults": 10,
"category": "research paper",
"includeDomains": [],
"excludeDomains": [],
"startPublishedDate": "2025-01-01",
"endPublishedDate": "2025-12-31",
"includeText": [],
"excludeText": [],
"context": true,
"contents": {
"text": true,
"highlights": true,
"summary": true
}
}
JSONSearch Types:
- : Semantic search using embeddings
neural - : Quick keyword-based search
fast - : Automatically choose best method (default)
auto - : Comprehensive deep search
deep
Categories:
- ,
company,people,research paper,news,pdf,github, etc.tweet
bash
cat <<'JSON' | node .claude/skills/exa-search/exa-api.js search
{
"query": "Latest research in LLMs",
"type": "auto",
"numResults": 10,
"category": "research paper",
"includeDomains": [],
"excludeDomains": [],
"startPublishedDate": "2025-01-01",
"endPublishedDate": "2025-12-31",
"includeText": [],
"excludeText": [],
"context": true,
"contents": {
"text": true,
"highlights": true,
"summary": true
}
}
JSON搜索类型:
- :基于嵌入向量的语义搜索
neural - :快速关键词搜索
fast - :自动选择最佳方式(默认)
auto - :全面深度搜索
deep
类别:
- ,
company,people,research paper,news,pdf,github等tweet
2) Contents
2) 内容提取
bash
cat <<'JSON' | node .claude/skills/exa-search/exa-api.js contents
{
"ids": ["result-id-1", "result-id-2"],
"text": true,
"highlights": true,
"summary": true
}
JSONbash
cat <<'JSON' | node .claude/skills/exa-search/exa-api.js contents
{
"ids": ["result-id-1", "result-id-2"],
"text": true,
"highlights": true,
"summary": true
}
JSON3) Find Similar
3) 查找相似内容
bash
cat <<'JSON' | node .claude/skills/exa-search/exa-api.js findsimilar
{
"url": "https://example.com/article",
"numResults": 10,
"category": "news",
"includeDomains": [],
"excludeDomains": [],
"startPublishedDate": "2025-01-01",
"contents": {
"text": true,
"summary": true
}
}
JSONbash
cat <<'JSON' | node .claude/skills/exa-search/exa-api.js findsimilar
{
"url": "https://example.com/article",
"numResults": 10,
"category": "news",
"includeDomains": [],
"excludeDomains": [],
"startPublishedDate": "2025-01-01",
"contents": {
"text": true,
"summary": true
}
}
JSON4) Answer
4) 问答
bash
cat <<'JSON' | node .claude/skills/exa-search/exa-api.js answer
{
"query": "What is the capital of France?",
"numResults": 5,
"includeDomains": [],
"excludeDomains": []
}
JSONbash
cat <<'JSON' | node .claude/skills/exa-search/exa-api.js answer
{
"query": "What is the capital of France?",
"numResults": 5,
"includeDomains": [],
"excludeDomains": []
}
JSON5) Research
5) 结构化研究
bash
cat <<'JSON' | node .claude/skills/exa-search/exa-api.js research
{
"input": "What are the latest developments in AI?",
"model": "auto",
"stream": false,
"output_schema": {
"properties": {
"topic": {
"type": "string",
"description": "The main topic"
},
"key_findings": {
"type": "array",
"description": "List of key findings",
"items": {
"type": "string"
}
}
},
"required": ["topic"]
},
"citation_format": "numbered"
}
JSONbash
cat <<'JSON' | node .claude/skills/exa-search/exa-api.js research
{
"input": "What are the latest developments in AI?",
"model": "auto",
"stream": false,
"output_schema": {
"properties": {
"topic": {
"type": "string",
"description": "The main topic"
},
"key_findings": {
"type": "array",
"description": "List of key findings",
"items": {
"type": "string"
}
}
},
"required": ["topic"]
},
"citation_format": "numbered"
}
JSONEnvironment Variables & API Key
环境变量与API密钥
Two ways to configure API Key (priority: environment variable > ):
.env- Environment variable:
EXA_API_KEY - file: Place in
.env, can copy from.claude/skills/exa-search/.env.env.example
配置API密钥的两种方式(优先级:环境变量 > 文件):
.env- 环境变量:
EXA_API_KEY - 文件:放置在
.env,可从.claude/skills/exa-search/.env复制.env.example
Response Format
响应格式
All endpoints return JSON with:
- : Unique request identifier
requestId - : Array of search results
results - : Type of search performed (for search endpoint)
searchType - : LLM-friendly context string (if requested)
context - : Detailed cost breakdown
costDollars
所有端点返回的JSON包含:
- :唯一请求标识符
requestId - :搜索结果数组
results - :执行的搜索类型(仅search端点返回)
searchType - :适合LLM的上下文字符串(若请求)
context - :详细费用明细
costDollars