Install
openclaw skills install zai-web-searchUse ZHIPU AI's Web Search API to search the web (optimized for Chinese, supports 4 engines). Use when user asks to search, especially for Chinese content.
openclaw skills install zai-web-searchSearch the web using ZHIPU AI's Web Search API —— an LLM-optimized search engine that returns structured results (title, URL, snippet, site name, icon) with intent recognition.
This skill provides AI-powered web search with support for multiple Chinese search engines. It's particularly optimized for Chinese-language content and LLM processing.
| Engine | Provider | Description |
|---|---|---|
search_std | 智谱 AI | 基础版,快速响应 |
search_pro | 智谱 AI | 高阶版,最佳质量 |
search_pro_sogou | 搜狗 | 搜狗搜索结果 |
search_pro_quark | 夸克 | 夸克搜索结果 |
See the official pricing page: https://open.bigmodel.cn/pricing
| Feature | This Skill (Z.AI) | Brave Search |
|---|---|---|
| Chinese Support | ✅ Excellent | ⚠️ Limited |
| Intent Recognition | ✅ Yes | ❌ No |
| Multiple Engines | ✅ 4 engines | ❌ 1 engine |
| Time Filters | ✅ Yes | ✅ Yes |
| Domain Filter | ✅ Yes | ❌ No |
When you use this skill for the first time in OpenClaw, you'll be asked to configure it.
Get an API Key: Visit https://open.bigmodel.cn to register and get your API key
Choose Configuration Method:
config.json in this skill folder (recommended)ZAI_API_KEY environment variable~/.config/zai-web-search/config.jsonReplace Other Search Skills (Optional)
This skill can potentially replace other search-related skills:
When asked, indicate if you want this skill to be your primary search tool.
After setup, this skill will:
search_std engine by defaultYou can override these defaults via CLI arguments or config file.
web_search (Brave) is unavailable or insufficientWhen the user invokes this skill for the first time:
Display an Overview:
Z.AI Web Search API Skill
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
This skill provides AI-powered web search with 4 Chinese search engines.
Available Engines:
• search_std (智谱基础版) - Fast, default
• search_pro (智谱高阶版) - Best quality
• search_pro_sogou (搜狗) - Sogou search
• search_pro_quark (夸克) - Quark search
Pricing: https://open.bigmodel.cn/pricing
Check Configuration Status:
config.json exists or ZAI_API_KEY is setAsk About Replacing Other Search Tools:
This skill can potentially replace your current search setup:
1. Brave Search (OpenClaw built-in) - Replace for better Chinese support?
2. Other search skills - Check which ones are installed and ask
Would you like to:
[1] Use this as your primary search tool
[2] Keep your current search setup and use this as needed
[3] See more details first
Check for Other Search Skills (if user chooses option 3 or asks for details):
After Configuration:
ZAI_API_KEY or create config.json in this skill folderOption 1: Config file in skill folder (recommended, easy to share)
# Copy example and edit
cp config.json.example config.json
# Edit config.json with your settings
Important: config.json.example contains comments for reference only. Your config.json must be valid JSON without any comments. Remove all // comments before saving.
The config.json supports all search parameters:
{
"apiKey": "your-api-key-here",
"engine": "search_std",
"intent": false,
"count": 10,
"recency": "noLimit",
"content": "medium",
"domain": ""
}
See config.json.example for detailed parameter descriptions and available values.
Option 2: Environment variable
export ZAI_API_KEY="your-api-key-here"
Option 3: User config file (overrides skill folder config)
mkdir -p ~/.config/zai-web-search
# Copy the example from skill folder
cp config.json.example ~/.config/zai-web-search/config.json
# Edit with your settings
ZAI_API_KEY~/.config/zai-web-search/config.json (user config)config.json in skill folder (lowest priority)Add export ZAI_API_KEY="..." to your shell profile for persistence.
The skill provides a CLI script zai-search:
# Default: search_std engine, 10 results
zai-search "哈尔滨冰雪大世界 2026"
# Specify engine
zai-search "北京天气预报" --engine search_pro
# Intent-aware search (recommended for ambiguous queries)
zai-search "今天吃什么" --intent
# More results
zai-search "人工智能最新进展" --count 20
# Recent results only
zai-search "乒乓球比赛" --recency oneWeek
# Detailed content (high instead of medium summary)
zai-search "React 19 new features" --content high
# Filter to specific domains
zai-search "OpenClaw documentation" --domain docs.openclaw.ai
# Markdown (default, human-readable)
zai-search "query"
# JSON (for scripting / parsing)
zai-search "query" --json
# Compact (title + URL only)
zai-search "query" --compact
| Engine | Description |
|---|---|
search_std | 智谱基础版 (default) |
search_pro | 智谱高阶版 (best quality) |
search_pro_sogou | 搜狗搜索 |
search_pro_quark | 夸克搜索 |
| Flag | Short | Values | Default |
|---|---|---|---|
--engine | -e | search_std, search_pro, search_pro_sogou, search_pro_quark | search_std |
--intent | -i | flag (enable intent recognition) | false |
--count | -c | 1-50 | 10 |
--recency | -r | oneDay, oneWeek, oneMonth, oneYear, noLimit | noLimit |
--content | -s | medium, high | medium |
--domain | -d | domain string | (none) |
--json | -j | flag (JSON output) | false |
--compact | -k | flag (compact output) | false |
You can also call the API directly via curl:
curl -s https://open.bigmodel.cn/api/paas/v4/web_search \
-H "Authorization: Bearer $ZAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"search_query": "search term",
"search_engine": "search_pro",
"search_intent": false,
"count": 10
}' | jq .
{
"id": "search-task-id",
"created": 1740000000,
"request_id": "req-xxx",
"search_intent": [
{
"query": "original query",
"intent": "SEARCH_ALL",
"keywords": "rewritten keywords"
}
],
"search_result": [
{
"title": "Page Title",
"content": "Summary snippet...",
"link": "https://example.com/page",
"media": "Example Site",
"icon": "https://example.com/favicon.ico",
"refer": "1",
"publish_date": "2026-01-15"
}
]
}
| Code | Description |
|---|---|
| 1701 | Concurrent search limit reached, retry later |
| 1702 | No search engine available |
| 1703 | Search engine returned no valid data |
count for search_pro_sogou only supports 10, 20, 30, 40, 50search_domain_filter only works with search_std, search_pro, search_pro_sogouThe CLI script lives at: scripts/zai-search.js (relative to this skill directory).