Global Search
This skill harnesses powerful multi-source search technology to deliver instant, comprehensive results from diverse online repositories using intelligent aggregation.
When to Use
Apply this skill when the user:
- - Asks to search the web or gather information online
- Needs news articles or references by keyword
- Wants to retrieve content from diverse online sources
- Requires comprehensive, real-time web search with maximum coverage
By default, this skill performs comprehensive search across ALL available sources simultaneously to provide the most complete results.
API Overview
Endpoint: INLINECODE0
Base URL: INLINECODE1
Authentication: No authentication required (free service)
Request
For comprehensive search (default behavior), the skill will use the script from overall.md to perform 4 parallel API calls automatically:
- - Call 1:
search_source=baidu_search, mode=network (百度新闻/资讯) - Call 2:
search_source=google_search, mode=network (谷歌新闻/资讯) - Call 3:
search_source=baidu_search_ai, mode=network (百度 AI 搜索) - Call 4:
mode=warehouse (Elasticsearch 索引库,忽略 search_source)
Headers
| Header | Required | Description |
|--------|----------|-------------|
| Content-Type | Yes | application/x-www-form-urlencoded (form data) |
Form Parameters
| Parameter | Type | Required | Default | Description |
|---|
| keyword | string | Yes | - | Search keyword(s),多个关键词用空格分隔 |
| search_source |
string | No | - | Engine:
baidu_search,
google_search,
baidu_search_ai. Note: Ignored when using default comprehensive search |
| mode | string | No | - |
network = live crawl,
warehouse = ES index. Note: Ignored when using default comprehensive search |
| page | int | No | 1 | Page number (starts from 1) |
Comprehensive Search (All Sources)
当用户要求进行全面搜索(即同时搜索所有可用来源)时,必须使用overall.md中的脚本进行搜索,而不是使用下面的示例代码。
When the user wants to search across ALL available sources simultaneously (comprehensive search), you should:
Example Implementation (Python asyncio):
CODEBLOCK0
Parameter Constraints
- -
search_source: One of baidu_search, google_search, INLINECODE18 - INLINECODE19 : One of
network, INLINECODE21 - When
mode=warehouse, search is performed against the Elasticsearch index (ignores search_source) - When
mode=network, use search_source to select Baidu, Google, or Baidu AI search
Response Format
CODEBLOCK1
Usage Examples
Example 1: Search Baidu news
CODEBLOCK2
Example 2: Search Google news
CODEBLOCK3
Example 3: Search warehouse (ES index)
CODEBLOCK4
Example 4: cURL
CODEBLOCK5
Error Codes
| Code | Message | Cause |
|------|---------|-------|
| 400 | searchsource参数错误 | Invalid searchsource value |
| 400 | mode参数错误 | Invalid mode value |
| 400 | page参数错误 | Invalid page (non-integer or 0) |
Integration Steps
- 1. API base URL:
https://clb.ciglobal.cn,无需配置API密钥(免费服务) - By default, the skill will perform comprehensive search across all sources using the script from overall.md. Optional: Determine the desired
search_source (Baidu / Google / Baidu AI) or mode (network / warehouse) if you want to override the default comprehensive search behavior - Call
POST /web_search with form-encoded parameters - Parse
references from the response and use title, sourceAddress, summary as needed
全局搜索
该技能利用强大的多源搜索技术,通过智能聚合从不同的在线资源库中提供即时、全面的搜索结果。
使用时机
当用户出现以下情况时,应用此技能:
- - 要求搜索网络或在线收集信息
- 需要按关键词查找新闻文章或参考资料
- 想要从不同的在线来源检索内容
- 需要全面、实时的网络搜索,且覆盖范围最大化
默认情况下,此技能会同时对所有可用来源进行全面搜索,以提供最完整的结果。
API 概述
端点: POST /web_search
基础 URL: https://clb.ciglobal.cn
身份验证: 无需身份验证(免费服务)
请求
对于全面搜索(默认行为),该技能将使用 overall.md 中的脚本自动执行 4 个并行的 API 调用:
- - 调用 1:searchsource=baidusearch,mode=network(百度新闻/资讯)
- 调用 2:searchsource=googlesearch,mode=network(谷歌新闻/资讯)
- 调用 3:searchsource=baidusearchai,mode=network(百度 AI 搜索)
- 调用 4:mode=warehouse(Elasticsearch 索引库,忽略 searchsource)
请求头
| 请求头 | 必需 | 描述 |
|---|
| Content-Type | 是 | application/x-www-form-urlencoded(表单数据) |
表单参数
| 参数 | 类型 | 必需 | 默认值 | 描述 |
|---|
| keyword | 字符串 | 是 | - | 搜索关键词,多个关键词用空格分隔 |
| searchsource |
字符串 | 否 | - | 引擎:baidusearch、google
search、baidusearch_ai。注意:使用默认全面搜索时忽略此参数 |
| mode | 字符串 | 否 | - | network = 实时抓取,warehouse = ES 索引。注意:使用默认全面搜索时忽略此参数 |
| page | 整数 | 否 | 1 | 页码(从 1 开始) |
全面搜索(所有来源)
当用户要求进行全面搜索(即同时搜索所有可用来源)时,必须使用 overall.md 中的脚本进行搜索,而不是使用下面的示例代码。
当用户想要同时搜索所有可用来源(全面搜索)时,您应该:
示例实现(Python asyncio):
python
import aiohttp
import asyncio
APIURL = https://clb.ciglobal.cn/websearch
headers = {Content-Type: application/x-www-form-urlencoded}
SEARCH_CONFIGS = [
{name: 百度搜索, mode: network, searchsource: baidusearch},
{name: 谷歌搜索, mode: network, searchsource: googlesearch},
{name: 百度 AI 搜索, mode: network, searchsource: baidusearch_ai},
{name: 全库搜, mode: warehouse, search_source: None}
]
async def fetch_search(session, semaphore, config, keyword, page):
async with semaphore:
data = {
keyword: keyword,
page: page,
mode: config[mode],
}
if config[search_source]:
data[searchsource] = config[searchsource]
async with session.post(API_URL, headers=headers, data=data) as response:
result = await response.json()
return result.get(references, [])
async def comprehensive_search(keyword, page=1):
async with aiohttp.ClientSession() as session:
semaphore = asyncio.Semaphore(5) # 最多 5 个并发请求
tasks = [fetch_search(session, semaphore, config, keyword, page)
for config in SEARCH_CONFIGS]
results = await asyncio.gather(*tasks)
# 将所有引用展平为一个列表
all_references = [ref for refs in results for ref in refs]
return all_references
asyncio.run(comprehensive_search(人工智能))
参数约束
- - searchsource:取值为 baidusearch、googlesearch、baidusearchai 之一
- mode:取值为 network、warehouse 之一
- 当 mode=warehouse 时,搜索针对 Elasticsearch 索引库执行(忽略 searchsource)
- 当 mode=network 时,使用 search_source 选择百度、谷歌或百度 AI 搜索
响应格式
json
{
code: 200,
message: success,
references: [
{
title: 文章标题,
sourceAddress: https://example.com/article,
origin: 来源名称,
publishDate: 2025-03-24 12:00:00,
summary: 文章摘要或片段
}
]
}
使用示例
示例 1:搜索百度新闻
POST https://clb.ciglobal.cn/web_search
请求头:Content-Type: application/x-www-form-urlencoded
请求体(表单):keyword=人工智能&searchsource=baidusearch&mode=network&page=1
示例 2:搜索谷歌新闻
POST https://clb.ciglobal.cn/web_search
请求头:Content-Type: application/x-www-form-urlencoded
请求体(表单):keyword=AI&searchsource=googlesearch&mode=network&page=1
示例 3:搜索仓库(ES 索引)
POST https://clb.ciglobal.cn/web_search
请求头:Content-Type: application/x-www-form-urlencoded
请求体(表单):keyword=机器学习&mode=warehouse&page=1
示例 4:cURL
bash
curl -X POST https://clb.ciglobal.cn/web_search \
-H Content-Type: application/x-www-form-urlencoded \
-d keyword=科技新闻&search
source=baidusearch&mode=network&page=1
错误码
| 错误码 | 消息 | 原因 |
|---|
| 400 | searchsource参数错误 | 无效的 searchsource 值 |
| 400 |
mode参数错误 | 无效的 mode 值 |
| 400 | page参数错误 | 无效的 page(非整数或为 0) |
集成步骤
- 1. API 基础 URL:https://clb.ciglobal.cn,无需配置 API 密钥(免费服务)
- 默认情况下,该技能将使用 overall.md 中的脚本对所有来源进行全面搜索。可选:如果您想覆盖默认的全面搜索行为,可以确定所需的 searchsource(百度/谷歌/百度 AI)或 mode(network/warehouse)
- 使用表单编码参数调用 POST /websearch
- 从响应中解析 references,并根据需要使用 title、sourceAddress、summary