关于 web-research
web-research 是一项通过 x402 受保护端点使用 Exa 搜索和 Firecrawl 抓取的研究技能,指导 Agent 发现端点、检索网页并提取来源内容,也涵盖受阻页面的处理方式。
主要功能
- 01语义与关键词搜索
- 02查找与指定网址相似的页面
- 03批量提取网址文本
- 04获取带引用的事实答案
- 05将网页抓取为 Markdown
- 06搜索并抓取结果
适用场景
- 01开展网络主题研究
- 02从参考页面发现相关内容
- 03提取已知网址的内容
- 04获取受阻或依赖 JavaScript 的页面内容
MCP 相关
该技能通过 x402.fetch 和 x402.discover_api_endpoints 等 x402 MCP 工具访问 Exa 与 Firecrawl 端点。
安装
复制下面的命令,在终端中运行。
npx skills add https:/ / github.com/ merit-systems/ x402scan-skills --skill web-research安装后在 Claude Code 中输入/web-research确认已加载。
附带文件rules/getting-started.mdrules/when-to-use.md
详细介绍
使用 x402 API 进行网络研究
停止 — 调用任何 API 前请先阅读。 enrichx402.com 端点与各提供商的原生 API 并不相同。所有路径均采用
https://enrichx402.com/api/{provider}/{action}格式。你必须:
- 从下方的快速参考表中复制准确的 URL,或
- 运行
x402.discover_api_endpoints(url="https://enrichx402.com")获取正确路径猜测路径会导致调用失败,并返回 405 错误(路径错误)或 404 错误(缺少
/api/前缀)。
通过受 x402 保护的端点访问 Exa(神经搜索)和 Firecrawl(网页抓取)。
设置
安装和钱包设置请参阅 rules/getting-started.md。
快速参考
| 任务 | 端点 | 价格 | 最适用于 |
|---|---|---|---|
| 神经搜索 | https://enrichx402.com/api/exa/search | $0.01 | 语义网络搜索 |
| 查找相似页面 | https://enrichx402.com/api/exa/find-similar | $0.01 | 查找与某个 URL 类似的页面 |
| 提取文本 | https://enrichx402.com/api/exa/contents | $0.002 | 从 URL 获取干净文本 |
| 直接回答 | https://enrichx402.com/api/exa/answer | $0.01 | 事实问答 |
| 抓取页面 | https://enrichx402.com/api/firecrawl/scrape | $0.0126 | 将单个页面转换为 Markdown |
| 网络搜索 | https://enrichx402.com/api/firecrawl/search | $0.0252 | 搜索并抓取 |
如何选择
| 场景 | 工具 |
|---|---|
| 常规网络搜索 | WebSearch(免费)或 Exa($0.01) |
| 语义/概念搜索 | Exa search |
| 查找类似 X 的页面 | Exa find-similar |
| 获取 URL 中的干净文本 | Exa contents |
| 抓取受阻或大量使用 JS 的网站 | Firecrawl scrape |
| 搜索并抓取结果 | Firecrawl search |
| 快速查询事实 | Exa answer |
详细指南请参阅 rules/when-to-use.md。
Exa 神经搜索
理解含义而不仅仅是关键词的语义搜索:
x402.fetch(
url="https://enrichx402.com/api/exa/search",
method="POST",
body={
"query": "startups building AI agents for customer support",
"numResults": 10,
"type": "neural"
}
)
选项:
query- 搜索查询(必填)numResults- 结果数量(默认值:10,最大值:25)type- "neural"(语义)或 "keyword"(传统)includeDomains- 仅搜索这些域名excludeDomains- 跳过这些域名startPublishedDate/endPublishedDate- 日期范围筛选
返回内容:包含标题、摘要和相关性评分的 URL 列表。
查找相似页面
查找与参考 URL 在语义上相似的页面:
x402.fetch(
url="https://enrichx402.com/api/exa/find-similar",
method="POST",
body={
"url": "https://example.com/article-i-like",
"numResults": 10
}
)
适用于:
- 查找竞争对手的产品
- 发现相关内容
- 扩展研究来源
提取文本内容
从 URL 获取干净、结构化的文本:
x402.fetch(
url="https://enrichx402.com/api/exa/contents",
method="POST",
body={
"urls": [
"https://example.com/article1",
"https://example.com/article2"
]
}
)
选项:
urls- 要提取内容的 URL 数组text- 是否包含全文(默认值:true)highlights- 是否包含关键要点
如果你已有 URL,只需要获取内容,这是最便宜的选项($0.002)。
直接回答
获取问题的事实性答案:
x402.fetch(
url="https://enrichx402.com/api/exa/answer",
method="POST",
body={
"query": "What is the population of Tokyo?"
}
)
返回直接答案及来源引用。最适用于:
- 事实性问题
- 快速查询
- 验证说法
Firecrawl 抓取
将单个页面抓取为干净的 Markdown:
x402.fetch(
url="https://enrichx402.com/api/firecrawl/scrape",
method="POST",
body={
"url": "https://example.com/page-to-scrape"
}
)
选项:
url- 要抓取的页面(必填)formats- 输出格式:["markdown", "html", "links"]onlyMainContent- 跳过导航栏、页脚和广告(默认值:true)waitFor- 等待 JS 渲染的毫秒数
相较于 WebFetch 的优势:
- 处理由 JavaScript 渲染的内容
- 绕过常见的访问拦截
- 仅提取主要内容
- 输出针对大模型优化的 Markdown
Firecrawl 搜索
搜索网络并自动抓取搜索结果:
x402.fetch(
url="https://enrichx402.com/api/firecrawl/search",
method="POST",
body={
"query": "best practices for react server components",
"limit": 5
}
)
选项:
query- 搜索查询(必填)limit- 结果数量(默认值:5)scrapeOptions- 传递给抓取器的选项
返回搜索结果及每个结果的完整抓取内容。
工作流
深度研究
- (可选)检查余额:
x402.get_wallet_info - 发现端点(首次抓取前必须执行):
x402.discover_api_endpoints(url="https://enrichx402.com") - 使用 Exa 广泛搜索
- 使用 find-similar 查找相关来源
- 从重要来源提取内容
- 综合整理结果
x402.fetch(
url="https://enrichx402.com/api/exa/search",
method="POST",
body={"query": "AI agents in healthcare 2024", "numResults": 15}
)
x402.fetch(
url="https://enrichx402.com/api/exa/find-similar",
method="POST",
body={"url": "https://best-article-found.com"}
)
x402.fetch(
url="https://enrichx402.com/api/exa/contents",
method="POST",
body={"urls": ["url1", "url2", "url3"]}
)
抓取受限网站
- 先尝试 WebFetch(免费)
- 如果受限或结果为空,则对 JavaScript 密集型网站使用带
waitFor的 Firecrawl
x402.fetch(
url="https://enrichx402.com/api/firecrawl/scrape",
method="POST",
body={"url": "https://blocked-site.com/article", "waitFor": 3000}
)
成本优化
- 已有 URL 时使用 Exa contents($0.002)
- 先使用 WebSearch/WebFetch(免费),再回退到 x402 端点
- 批量提取 URL——向 Exa contents 传入多个 URL
- 限制结果数量——只请求所需数量的结果
并行调用
可以并行执行相互独立的搜索:
# These don't depend on each other
x402.fetch(url=".../exa/search", body={"query": "topic A"})
x402.fetch(url=".../exa/search", body={"query": "topic B"})