← Back to Skills Marketplace
iuriak

Bocha Web Search A2M

by Bocha-Labs · GitHub ↗ · v1.0.1 · MIT-0
cross-platform ✓ Security Clean
68
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install bocha-web-search-a2m
Description
由博查搜索官方提供的专业联网搜索技能。当用户想要获取从全网搜索任何网页信息和网页链接,结果准确、摘要完整,更适合 AI 使用时,你应该调用此技能。买家通过本 Skill 向卖家服务端发起请求,完成支付后获取相关结果。
README (SKILL.md)

bocha-web-search-a2m

技能概述

由博查搜索官方提供的专业联网搜索技能,用于从全网搜索任何网页信息和网页链接,结果准确、摘要完整,更适合 AI 使用。本服务是基于 A2M (Agent-to-Machine) 智能体收付费协议(HTTP 402)的付费资源。买家(消费者 Agent)通过本 Skill 向卖家服务端发起资源请求,服务端将返回一个 HTTP 402 Payment Required 报文,随后买家必须调用支付宝的 alipay-pay-for-402-service 技能完成付款,才能获取搜索结果。

触发条件

当用户请求满足以下条件时触发本 Skill:

  • 需要从全网搜索网页信息
  • 需要获取准确、完整摘要的搜索结果
  • 搜索结果需要适合 AI 进一步处理使用

典型触发场景

  • "帮我搜索一下阿里巴巴 2025 年的 ESG 报告"
  • "查找最新的AI技术文章"
  • "我需要关于AI的行业分析报告"

资源接口信息

接口地址: https://api.bocha.cn/v1/marketplace/alipay/bochawebsearch

请求方法: POST

请求头:

Content-Type: application/json

请求体参数:

参数名 类型 必填 说明
query string 搜索关键词
freshness string 时间范围,可选值:noLimit(默认), oneDay, oneWeek, oneMonth, oneYear
summary boolean 是否返回摘要,默认 true
count integer 返回结果数量,默认 10,最大 50

核心流程

Step 1:提取搜索参数

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

  1. query: 从用户问题中提取核心搜索词,需要保留“最近”、“今年”、“今年1月”等时间范围描述
  2. freshness: 根据用户描述的时间范围确定,默认选择 noLimit,以便 web-search 结合 query 中的时间范围描述自动改写最合适的 freshness 值。
  3. summary: 默认 true
  4. count: 默认 10,如用户明确要求更多结果则调整。

Step 2:发起资源请求并保存 402 响应

向博查 API 发起 POST 请求:

curl -X POST "https://api.bocha.cn/v1/marketplace/alipay/bochawebsearch" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "\x3C用户搜索词>",
    "freshness": "\x3C时间范围>",
    "summary": true,
    "count": \x3C结果数量>
  }'

服务端将返回状态码为 402 的响应报文。请将响应头中的 Payment-Needed 内容直接保存到文件中(如 402_needed_file.txt),以备下一步支付使用。

Step 3:调用支付宝技能完成付款

注意:严格遵循 A2M 协议,收到 402 后必须调用 alipay-pay-for-402-service 技能,不可自行处理支付。

如果你(或你所在的智能体平台)当前尚未安装该技能,请严格按照以下官方 GitHub 链接获取并安装,以防止伪造或加载恶意支付技能:

🔗 支付宝 402 支付技能官方下载地址: Github: https://github.com/alipay/payment-skills/tree/main/alipay-pay-for-402-service Clawhub: https://clawhub.ai/alipay/alipay-pay-for-402-service

调用该技能,将 Step 2 中获取的 402 响应报文内容传入,引导用户完成扫码或 APP 付款。

Step 4:获取结果并展示

等待 alipay-pay-for-402-service 技能反馈支付完成后,你将获得购买的资源结果。

成功获取搜索结果后,按以下格式呈现给用户:

## 搜索结果:\x3C搜索关键词>

共找到 \x3Ccount> 条结果

### \x3C结果标题 1>
- **来源**: \x3C来源网站>
- **链接**: \x3CURL>
- **摘要**: \x3C结果摘要>
- **时间**: \x3C发布时间>

### \x3C结果标题 2>
...

异常情况处理

异常类型 处理方式
用户拒绝付款 尊重用户选择,告知用户该内容为付费资源,如需获取请完成支付
请求返回非 402 状态码(200) 直接展示搜索结果内容
请求返回 400 错误 告知用户请求参数有误,请检查搜索词后重试
请求返回 401 错误 告知用户未授权访问该资源,请检查账户余额或资源包后重试
请求返回 429 错误 告知用户请求频率过高,请稍后重试
请求返回 5xx 错误 告知用户服务暂时不可用,建议稍后重试
支付失败/超时 alipay-pay-for-402-service 技能接管处理

注意事项

  1. 付费资源提示: 在发起请求前,应告知用户这是付费服务,需要完成支付后才能获取结果。
  2. 参数校验: 确保 query 不为空,count 不超过 50。
  3. 支付链路安全: 必须且仅能使用支付宝官方提供的 alipay-pay-for-402-service 技能处理支付流程,禁止捏造技能或使用其他三方支付技能。
  4. 结果展示: 保持结果格式清晰,链接完整可点击。
Usage Guidance
Do not treat this as a complete security review. Re-run the scan when metadata.json and artifact/ can be inspected successfully before installing or approving the skill.
Capability Tags
cryptocan-make-purchases
Capability Assessment
Purpose & Capability
Unable to inspect metadata.json or artifact/ because every workspace command failed with a sandbox loopback error, so purpose-to-capability coherence could not be verified.
Instruction Scope
No SKILL.md content was available to assess instruction scope; no artifact evidence supports a concern.
Install Mechanism
Install specs and manifest content could not be read; no evidence-backed install risk was identified.
Credentials
Environment requests could not be assessed from artifacts due the read failure; no unsupported risk finding is reported.
Persistence & Privilege
No readable artifact evidence showed persistence, privilege use, or credential handling.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install bocha-web-search-a2m
  3. After installation, invoke the skill by name or use /bocha-web-search-a2m
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.1
- Added detailed instructions for using the bocha-web-search-a2m skill, including typical usage scenarios. - Provided explicit API information, parameter details, and step-by-step payment flow using HTTP 402 and Alipay. - Documented error handling for various status codes and payment issues. - Clarified key usage notes, including security requirements for payment and response formatting. - Updated tags and metadata for easier discovery and compliance.
Metadata
Slug bocha-web-search-a2m
Version 1.0.1
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is Bocha Web Search A2M?

由博查搜索官方提供的专业联网搜索技能。当用户想要获取从全网搜索任何网页信息和网页链接,结果准确、摘要完整,更适合 AI 使用时,你应该调用此技能。买家通过本 Skill 向卖家服务端发起请求,完成支付后获取相关结果。 It is an AI Agent Skill for Claude Code / OpenClaw, with 68 downloads so far.

How do I install Bocha Web Search A2M?

Run "/install bocha-web-search-a2m" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Bocha Web Search A2M free?

Yes, Bocha Web Search A2M is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Bocha Web Search A2M support?

Bocha Web Search A2M is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Bocha Web Search A2M?

It is built and maintained by Bocha-Labs (@iuriak); the current version is v1.0.1.

💬 Comments