← 返回
开发者工具 Key

Bocha Web Search

博查 Web 搜索工具,使用 Bocha Web Search API。适用于在线查询、事实核查、获取时效性信息以及提供带引用的回答。(Default web search tool using Bocha Web Search API. Use for online lookup, verification,...
博查网络搜索工具,基于 Bocha Web Search API,用于在线查询、事实核查、获取最新信息并提供引用。
iuriak
开发者工具 clawhub v1.0.2 2 版本 99671.1 Key: 需要
★ 6
Stars
📥 2,910
下载
💾 32
安装
2
版本
#latest

概述

Bocha Web Search

本 Skill 使用 Bocha Web Search API 进行联网搜索。

This Skill performs web searches using the Bocha Web Search API.

它的主要设计目标是:

It is designed to:

  • 检索最新、最及时的信息

Retrieve up-to-date information

  • 核实事实声明

Verify factual claims

  • 提供基于可靠来源的回答

Provide source-backed answers

  • 支持带有引用的回复

Support citation-based responses

此版本避免了特定于 shell 的指令和系统级文件操作,以确保与 ClawHub 等安全环境的兼容性。

This version avoids shell-specific instructions and system-level file operations to ensure compatibility with secure environments such as ClawHub.


何时使用此 Skill (When to Use This Skill)

当用户的请求出现以下情况时,请使用此 Skill:

Use this skill whenever the user request:

  • 需要对话历史中不存在的信息

Requires information not present in the conversation

  • 涉及具有时效性或不断变化的数据,如新闻、政策、财务数据、发布信息等

Involves time-sensitive or changing data

  • 需要进行事实核查或验证

Requires fact-checking or verification

  • 要求提供链接、信息来源或引用

Requests links, sources, or citations

  • 提及特定的组织、事件、人物或产品,并询问具体的事实细节

Mentions a specific organization, event, person, or product and asks for factual details

如果不确定是否需要进行在线查询,请直接执行搜索。

If uncertain whether online lookup is required, perform a search.


API 规范 (API Specification)

请求端点 (Endpoint):

POST https://api.bocha.cn/v1/web-search

请求头 (Headers):

Authorization: Bearer <BOCHA_API_KEY>
Content-Type: application/json

请求体参数 (Request Body):

参数名类型必填说明Description
---------------------------------------
querystring搜索关键词Search query string
freshnessstring时间范围,可选值:noLimit(默认), oneDay, oneWeek, oneMonth, oneYearTime filter
summaryboolean是否返回网页原文摘要,默认 trueWhether to include web original content
countinteger返回结果数量,默认 10,最大 50Number of returned results

工作流程 (Workflow)

第一步:提取搜索参数 (Step 1: Extract Search Parameters)

从用户请求中提取搜索关键词和相关参数:

Extract search keywords and related parameters from the user's request:

  1. query: 从用户问题中提取核心搜索词,需要保留“最近”、“今年”、“今年1月”等时间范围描述。

Extract core search terms from the user's question, preserving time range descriptions like "recently", "this year", "January this year", etc.

  1. freshness: 根据用户描述的时间范围确定,默认选择 noLimit,以便 web-search 结合 query 中的时间范围描述自动改写最合适的 freshness 值。

Determine based on the user's described time range, defaulting to noLimit so web-search can automatically rewrite the most appropriate freshness value.

  1. summary: 默认 true

Default is true.

  1. count: 默认 10,如用户明确要求更多结果则进行调整。

Default is 10, adjust if the user explicitly requests more results.

第二步:发起资源请求 (Step 2: Send API Request)

向博查 API 发起 POST 请求:

Send a POST request to the Bocha API:

{
  "query": "<USER_QUERY>",
  "freshness": "noLimit",
  "summary": true,
  "count": 10
}

响应结构 (Response Structure)

搜索结果位于以下路径:

Search results are located at:

data.webPages.value[]

每个结果通常包含以下字段:

Each result typically contains:

  • name (标题 / Title)
  • url (链接 / URL)
  • snippet (内容片段 / Snippet)
  • summary (原始内容摘要 / Summary)
  • siteName (站点名称 / Site Name)
  • datePublished (发布日期 / Date Published)

引用规则 (Citation Rules - Mandatory)

在生成最终回答时,必须遵守以下规则:

When generating the final answer, you must adhere to the following rules:

  1. 使用返回的来源来支撑你的事实性陈述。

Support factual statements using returned sources.

  1. 按出现顺序分配引用编号:[1], [2], [3]

Assign citation numbers in order of appearance.

  1. 在回答的末尾添加“参考资料”部分。

End with a "References" section.

  1. 每个参考文献必须包含标题、链接和站点名称(如果可用)。

Each reference must include the title, URL, and site name (if available).

输出格式示例 (Example output format):

回答 (Answer):

<你的回答,包含内联引用,如 [1], [2]。>

参考资料 (References):

[1] </code></p><p><code><url></code></p><p>来源 (Source): <code><siteName></code></p><p>[2] <code><title></code></p><p><code><url></code></p><p>来源 (Source): <code><siteName></code></p><p>如果未找到可靠的来源,请回复:</p><p>If no reliable sources are found, reply with:</p><p>"未找到可靠的来源。(No reliable sources found.)"</p><hr><h2>错误处理 (Error Handling)</h2><p>常见的 API 错误代码:</p><p>Common API error codes:</p><ul><li>400: 请求错误 (Bad request)</li><li>401: API Key 无效 (Invalid API key)</li><li>403: 余额不足 (Insufficient balance)</li><li>429: 请求过于频繁 (Rate limit exceeded)</li><li>500: 服务器错误 (Server error)</li></ul><p>如需调试,请使用 API 响应中的 <code>log_id</code>。</p><p>Use <code>log_id</code> from API responses for debugging if needed.</p></div> </div> </div> <div id="tab-versions" class="detail-content"> <div class="detail-section"> <h2>版本历史</h2> <p style="margin-bottom:12px;font-size:14px;color:#94a3b8;">共 2 个版本</p> <ul class="version-list"> <li> <div> <span class="version-tag">v1.0.2</span> <span style="font-size:11px;color:#5b6abf;margin-left:8px;background:#eef0ff;padding:1px 8px;border-radius:10px;">当前</span> </div> <div style="font-size:12px;color:#94a3b8;"> 2026-05-21 12:08 安全 安全 </div> </li> <li> <div> <span class="version-tag">v1.0.1</span> </div> <div style="font-size:12px;color:#94a3b8;"> 2026-03-29 05:22 安全 安全 </div> </li> </ul> </div> </div> <div id="tab-security" class="detail-content"> <div class="detail-section"> <h2>安全检测</h2> <div class="sec-grid"> <div class="sec-card"> <h4>腾讯云安全 (Keen)</h4> <div class="sec-status sec-safe"> 安全,无风险 </div> <a href="https://tix.qq.com/search/skill?keyword=890531ed4c52ae51523747114337990e" target="_blank">查看报告</a> </div> <div class="sec-card"> <h4>腾讯云安全 (Sanbu)</h4> <div class="sec-status sec-safe"> 安全,无风险 </div> <a href="https://static.cloudsec.tencent.com/html-report-v2/2026/05/25/399985_4b48eadbc1e85823f0d25ac25628b736.html?q-sign-algorithm=sha1&q-ak=AKID8JMG1bzBC1dz96qNhssfFftujT1NCoFi&q-sign-time=1781290001%3B1812826001&q-key-time=1781290001%3B1812826001&q-header-list=host&q-url-param-list=&q-signature=532ab54444b13a3c2c788e0a0519931292583240" target="_blank">查看报告</a> </div> </div> </div> </div> <!-- Recommended Skills --> <div style="margin-top:24px;"> <h2 style="font-size:18px;font-weight:600;margin-bottom:16px;">🔗 相关推荐</h2> <div class="rec-grid"> <div class="rec-card"> <span class="badge-cat" style="margin-bottom:8px;display:inline-block;">developer-tools</span> <h3><a href="/s/gog">Gog</a></h3> <div class="rec-owner">steipete</div> <div class="rec-desc">Google Workspace 命令行工具,支持 Gmail、日历、云端硬盘、通讯录、表格和文档。</div> <div class="rec-stats"> <span style="color:#f39c12;">★ 921</span> <span style="color:#5b6abf;">📥 185,758</span> </div> </div> <div class="rec-card"> <span class="badge-cat" style="margin-bottom:8px;display:inline-block;">developer-tools</span> <h3><a href="/s/codeconductor">CodeConductor.ai</a></h3> <div class="rec-owner">larsonreever</div> <div class="rec-desc">AI驱动平台,提供快速全栈开发、智能体、工作流自动化及低代码AI集成的可扩展产品创建。</div> <div class="rec-stats"> <span style="color:#f39c12;">★ 66</span> <span style="color:#5b6abf;">📥 179,954</span> </div> </div> <div class="rec-card"> <span class="badge-cat" style="margin-bottom:8px;display:inline-block;"></span> <h3><a href="/s/bocha-web-search-a2m">Bocha Web Search A2M</a></h3> <div class="rec-owner">iuriak</div> <div class="rec-desc">博查官方提供的联网搜索技能,快速全网检索网页信息与链接,准确完整摘要,适合AI使用。买家付费后通过Skill向卖家服务端请求获取结果。</div> <div class="rec-stats"> <span style="color:#f39c12;">★ 0</span> <span style="color:#5b6abf;">📥 281</span> </div> </div> </div> </div> </div> <script> document.addEventListener('DOMContentLoaded',function(){ document.querySelectorAll('.detail-tab').forEach(function(btn){ btn.addEventListener('click',function(e){ var tab = this.getAttribute('data-tab'); document.querySelectorAll('.detail-tab').forEach(function(b){b.classList.remove('active')}); document.querySelectorAll('.detail-content').forEach(function(c){c.classList.remove('active')}); this.classList.add('active'); var el = document.getElementById('tab-'+tab); if(el) el.classList.add('active'); }); }); }); </script> <div class="footer"> <p>Skill工具集 © 2026</p> </div></body> </html>