baidu-ecommerce-search百度电商搜索,包括cps商品查询、全网比价、榜单、商品参数、品牌品类知识等能力
Install via ClawdBot CLI:
clawdbot install crossallen/baidu-ecommerce-search百度电商搜索,包括商品对比、全网比价、榜单、商品参数、品牌品类知识等能力。
urllib、json、os,无需额外安装依赖)
# 必需:设置 API Token
export BAIDU_EC_SEARCH_TOKEN="your-token"
# 可选:设置 API 调用 QPS(每秒请求数),默认为 1
# 设置为 0 表示无限制,设置为 0.5 表示每 2 秒 1 次请求
export BAIDU_EC_SEARCH_QPS="1"
QPS 配置说明:
1(每秒最多1次请求,避免触发限流)BAIDU_EC_SEARCH_QPS=0:无限制,但容易触发 token is limit 错误BAIDU_EC_SEARCH_QPS=0.5:每2秒1次请求,更保守的限流策略1,如需更快的请求速度可适当调高当用户提出以下类型的请求时,应优先使用本技能:
1. 全维度对比决策助手
2.1 品牌知识
2.2 品类知识
2.3 商品参数
3.1 品牌榜单
4.1 CPS商品查询
5. 全网比价
触发时机: xxxx价格、xxxx比价
价格类:
比价类:
提供 SPU 参数/口碑/价格全方位对比评测,协助用户做最优选择。
# 对比两个商品
python3 scripts/compare.py "iphone16和iphone15对比"
python3 scripts/compare.py "华为mate60和小米14对比"
返回数据包含:
提供品类选购指南、品牌科普知识、全维度参数库的服务。
查询单个品牌的相关信息,包括品牌简介、品牌定位、明星产品、品牌荣誉、品牌大事记。
# 查询品牌信息
python3 scripts/knowledge.py brand "华为"
python3 scripts/knowledge.py brand "ysl"
返回数据包含:
查询某个品类的选购知识,如选购要点、选购建议、避坑指南等。
# 查询品类选购知识
python3 scripts/knowledge.py entity "无人机怎么选"
python3 scripts/knowledge.py entity "怎么选笔记本电脑"
返回数据包含:
查询单个 SPU 的参数信息,包括 SPU 名称、图片、价格、参数列表及 AI 解读。
# 查询商品参数
python3 scripts/knowledge.py param "iphone16"
python3 scripts/knowledge.py param "小米14"
返回数据包含:
基于综合搜索热度、全网声量及销量,提供客观权威的品牌排行推荐服务。
查询某个分类下的品牌排行榜信息。
# 查询品牌榜单
python3 scripts/ranking.py brand "手机品牌榜"
python3 scripts/ranking.py brand "冰箱品牌榜"
返回数据包含:
查询某品牌某品类下的单品排行榜信息。
# 查询单品榜
python3 scripts/ranking.py product "苹果手机排行榜"
python3 scripts/ranking.py product "华为冰箱排行榜"
返回数据包含:
通过商品关键词,获取全网 CPS 商品链接及热卖商品信息。
# 查询商品
python3 scripts/cps.py "iphone16"
python3 scripts/cps.py "机械键盘"
返回数据包含:
url 字段)xxxx价格:返回对应层级的价格
xxxx比价:查询到对应sku的商品价格
query → spu列表 → spuID → sku列表 → skuID → 商品价格
基于用户 query 返回匹配的 SPU 列表,包含 SPUID、名称、价格等信息。
触发场景: 用户询问 "[品类]价格"、"[品牌]价格"
# 品类价格
python3 scripts/bijia.py spu "手机价格"
python3 scripts/bijia.py spu "冰箱价格"
# 品牌价格
python3 scripts/bijia.py spu "华为价格"
python3 scripts/bijia.py spu "小米价格"
返回数据包含:
基于 SPUID 查询该 SPU 下所有 SKU 列表及价格。
调用流程: 首先使用 SPU比价能力获取品牌下所有 SPU,然后基于返回结果中的 SPUID 调用 SKU比价。
示例:
# 1. 先用品牌名SPU比价获取SPUID
python3 scripts/bijia.py spu "华为价格"
# 2. 基于返回的SPUID查询该SPU下的所有SKU
python3 scripts/bijia.py sku_list "shv2_09bff5cedd0cc952c7cbaf05e08ae972"
完整调用(SPU名称价格场景):
# 例如用户询问 "Mate 60价格"
# Step 1: 使用品牌名"华为"获取所有SPU
# Step 2: 从结果中找到"Mate 60"对应的SPUID
# Step 3: 基于SPUID调用SKU比价
返回数据包含:
基于 SKUID 查询该 SKU 下所有商品在不同渠道、不同平台的价格。
调用流程: 首先使用 SPU比价获取品牌下所有 SPU,然后基于 SPUID 获取 SKU列表,最后基于 SKUID 调用 SKU商品比价。
示例:
# 1. 先用品牌名SPU比价获取SPUID
python3 scripts/bijia.py spu "华为价格"
# 2. 基于SPUID获取SKU列表及SKUID
python3 scripts/bijia.py sku_list "shv2_09bff5cedd0cc952c7cbaf05e08ae972"
# 3. 基于SKUID查询各平台价格
python3 scripts/bijia.py sku_goods "shv2_62a16fd98771e0ed3aee0f2a6b40dbb9"
完整调用(SKU名称价格场景):
# 例如用户询问 "Mate 60 Pro 12GB+256GB价格"
# Step 1: 使用品牌名"华为"获取所有SPU
# Step 2: 从结果中找到"Mate 60 Pro"对应的SPUID
# Step 3: 基于SPUID获取SKU列表,找到"12GB+256GB"对应的SKUID
# Step 4: 基于SKUID调用SKU商品比价
返回数据包含:
cps_url 字段,当 cps_url 有值时作为购买链接展示,当 cps_url 为空时则不展示购买链接)脚本返回的错误信息(errmsg字段)及处理措施:
| 错误信息 | 说明 | 处理措施 |
|----------|------|----------|
| token is limit | API调用频率限流 | 等待1秒后重试 |
| path错误 / 请求地址错误 | API请求地址不正确 | 检查脚本路径和调用参数 |
| token权限不足 | Token未申请对应权限 | 访问 https://openai.baidu.com 申请所需能力 |
| 非法path | 当前功能暂未支持 | 该路径/API尚未开放,请更换查询方式 |
| token is nil | Token未配置 | 检查token |
| token is invalid | Token错误 | 检查token |
BAIDU_EC_SEARCH_TOKEN 环境变量已正确设置BAIDU_EC_SEARCH_QPS 环境变量调整token权限不足| 等特殊字符,在以markdown形式展现链接时需要注意转义Generated Mar 1, 2026
Helps consumers compare smartphones, laptops, or other electronics by analyzing specifications, user reviews, and prices across platforms. For example, a user deciding between iPhone 16 and Samsung Galaxy S25 can get a detailed comparison of features, performance feedback, and current market prices to make an informed choice.
Assists shoppers in selecting home appliances like refrigerators or washing machines by providing brand rankings, product reviews, and buying guides. Users can explore top brands in a category, compare specific models, and access detailed parameter lists to find the best fit for their needs.
Enables businesses or savvy shoppers to track and compare prices for specific products (SKUs) across multiple online platforms such as Taobao, JD.com, and Pinduoduo. This helps in identifying the best deals, monitoring price fluctuations, and optimizing purchasing strategies.
Supports marketers and analysts by offering insights into brand stories, category trends, and product rankings. For instance, researching a brand like Huawei provides its history, key products, and market position, while category guides help understand consumer preferences and competitive landscapes.
Facilitates affiliate marketers in discovering trending products, accessing CPS (Cost Per Sale) links, and generating recommendations. Users can search for items like 'mechanical keyboards' to get product listings with images, prices, and direct purchase links to promote on their platforms.
Integrates the skill to provide product search and comparison features, earning commissions through CPS links when users make purchases. By offering detailed product info and price comparisons, the platform drives traffic and conversions, generating revenue from affiliate partnerships with e-commerce sites.
Offers a subscription-based service that leverages the skill's price comparison and brand ranking capabilities to help businesses monitor competitors, track market trends, and optimize pricing strategies. Users pay a monthly fee for access to real-time data and analytics dashboards.
Develops a mobile or web application that uses the skill to assist individual shoppers with product research, comparisons, and deal-finding. Revenue is generated through in-app advertisements, premium features like advanced analytics, or partnerships with retailers for featured listings.
💬 Integration Tip
Ensure proper environment variable setup for the API token and QPS control to avoid rate limits, and verify that required permissions are applied on the Baidu platform for all intended functionalities.
Summarize URLs or files with the summarize CLI (web, PDFs, images, audio, YouTube).
AI-optimized web search via Tavily API. Returns concise, relevant results for AI agents.
This skill should be used when users need to search the web for information, find current content, look up news articles, search for images, or find videos. It uses DuckDuckGo's search API to return results in clean, formatted output (text, markdown, or JSON). Use for research, fact-checking, finding recent information, or gathering web resources.
Web search and content extraction via Brave Search API. Use for searching documentation, facts, or any web content. Lightweight, no browser required.
Search indexed Discord community discussions via Answer Overflow. Find solutions to coding problems, library issues, and community Q&A that only exist in Discord conversations.
Multi search engine integration with 17 engines (8 CN + 9 Global). Supports advanced search operators, time filters, site search, privacy engines, and WolframAlpha knowledge queries. No API keys required.