Baidu Web Search: Real-Time Chinese Web Search for AI Agents
With over 22,000 downloads and 50 stars, the baidu-search skill by @ide-rea is one of the most-used search integrations on ClawHub. It gives Claude direct access to Baidu's AI Search Engine (BDSE) — the same infrastructure that powers web search for over 700 million monthly active users — delivering real-time results with fine-grained control over resource types, site targeting, and time ranges.
The Problem It Solves
Most web search skills optimize for English-language results. Tavily, Brave, and Exa all index primarily Western content, and their relevance models are trained on English data. If you're researching Chinese companies, markets, regulations, academic publications in Chinese, or local consumer trends, you're working against the grain.
Baidu dominates Chinese web search with over 60% market share. Its crawler has indexed billions of Chinese-language pages that simply don't exist in other engines. When your research target is China — its startups, policies, user sentiment, or technical documentation — you need to query where that content actually lives.
The baidu-search skill solves this by wrapping Baidu's Qianfan AI Search API into a clean, Claude-callable interface.
How It Works
The skill is a Python script (search.py) that sends POST requests to Baidu's AI search endpoint:
https://qianfan.baidubce.com/v2/ai_search/web_search
Claude calls it by passing a JSON request body:
python3 skills/baidu-search/scripts/search.py '<JSON>'The script handles authentication via a BAIDU_API_KEY Bearer token, strips noisy snippet fields from the response, and returns clean references — structured result objects with title, URL, and content.
Request Parameters
The full parameter set covers most professional search scenarios:
| Param | Required | Default | Description |
|---|---|---|---|
query | yes | — | Search query (Chinese or English) |
edition | no | standard | standard (full) or lite (lighter) |
resource_type_filter | no | web:20 | Resource types and counts (see below) |
search_filter | no | — | Site targeting, date ranges |
block_websites | no | — | Sites to exclude from results |
search_recency_filter | no | — | Time window: week, month, semiyear, year |
safe_search | no | false | Strict content filtering |
Deep Dive
Resource Type Filtering
One of the most powerful features is the ability to control what kind of content you get back, not just which pages:
| Type | Max results | Use case |
|---|---|---|
web | 50 | General pages, articles, documentation |
video | 10 | Baidu Video, Bilibili-indexed content |
image | 30 | Image search results |
aladdin | 5 | Baidu's structured knowledge cards (summaries, facts) |
To get a mixed result set:
python3 skills/baidu-search/scripts/search.py '{
"query": "旅游景点",
"resource_type_filter": [
{"type": "web", "top_k": 20},
{"type": "video", "top_k": 5}
]
}'The aladdin type is especially useful for factual lookups — it surfaces Baidu's knowledge graph cards rather than raw web pages, giving you structured data for things like company profiles, population statistics, or historical facts.
Time Range Queries
Freshness matters for news, regulatory updates, and market research. The skill supports two approaches:
Recency filter (quick presets):
python3 skills/baidu-search/scripts/search.py '{
"query": "最新新闻",
"search_recency_filter": "week"
}'Options: week, month, semiyear, year
Date range filter (precise bounds):
{
"query": "人工智能监管",
"search_filter": {
"range": {
"pageTime": {
"gte": "2025-01-01",
"lte": "2025-12-31"
}
}
}
}Relative date syntax is also supported: now-1w/d, now-1M/d, now-1y/d.
Site Targeting
For authoritative sources, use search_filter.match.site to restrict results to specific domains:
# Search only Baidu Baike (Wikipedia equivalent)
python3 skills/baidu-search/scripts/search.py '{
"query": "量子计算",
"search_filter": {
"match": {"site": ["baike.baidu.com"]}
}
}'
# News from major outlets
python3 skills/baidu-search/scripts/search.py '{
"query": "最新政策",
"search_filter": {
"match": {"site": ["news.baidu.com", "xinhua.net"]}
}
}'And for blocking noise, use block_websites:
python3 skills/baidu-search/scripts/search.py '{
"query": "产品评测",
"block_websites": ["tieba.baidu.com", "zhidao.baidu.com"]
}'Baidu Search vs. Other Search Skills
| Feature | baidu-search | Tavily | Brave Search |
|---|---|---|---|
| Chinese-language strength | ✅ dominant | ⚠️ partial | ⚠️ partial |
| Real-time news | ✅ | ✅ | ✅ |
| Resource type filter (video/image/aladdin) | ✅ | ❌ | ❌ |
| Site targeting | ✅ | ⚠️ limited | ❌ |
| Structured knowledge cards | ✅ (aladdin) | ❌ | ❌ |
| Free tier | ✅ via Qianfan | ✅ 1,000/mo | ✅ 2,000/mo |
| English content quality | ⚠️ limited | ✅ excellent | ✅ excellent |
| AI-synthesized summaries | ❌ (raw refs) | ✅ | ⚠️ varies |
The verdict: baidu-search is not a Tavily replacement — it's a complement. Use Tavily for English research. Use baidu-search when your subject is China, Chinese companies, or Chinese-language content.
How to Install
clawdbot install baidu-searchThen configure your API key. Get one from the Baidu Qianfan console:
export BAIDU_API_KEY=your_key_hereOr add it to your .env file:
BAIDU_API_KEY=your_key_here
The skill requires python3 and the requests library:
pip install requestsPractical Tips
-
Default to
standardedition. Theliteedition uses lighter models and may miss nuance. Only switch toliteif you're making high-volume queries and need to reduce latency. -
Use
aladdinfor fact lookups. When you need a definitive answer (company founding date, population, CEO name), include{"type": "aladdin", "top_k": 3}in your resource filter. It returns Baidu's knowledge card content rather than a page result. -
Block forum noise. Baidu Tieba and Baidu Zhidao (Q&A) tend to dominate results for popular queries but are rarely useful for professional research. Add them to
block_websitesas a default. -
Combine with site filter for compliance work. If you're tracking Chinese regulatory changes, lock the search to official domains:
gov.cn,mofcom.gov.cn,csrc.gov.cn. This ensures you're getting authoritative sources, not commentary. -
Match recency to your use case. For competitive intelligence,
weekormonthkeeps results fresh. For historical research or deep-dive topics, remove the recency filter entirely to capture all relevant content. -
Use Chinese query terms where possible. Even if your end user speaks English, querying in Chinese will return results from content that was never translated. The results will need translation downstream, but the coverage difference is significant.
Considerations
- Authentication required: Unlike some search skills that work out of the box, you need a Baidu Qianfan API account. Setup takes 10–15 minutes but requires a Baidu account.
- Chinese-first results: Even for English queries, Baidu will surface Chinese-language results if they're more relevant by its ranking model. This is a feature for China-focused research but a drawback for general use.
- No AI synthesis: The skill returns raw references, not summarized answers. Claude will need to process the results. For small result sets this is fine; for 50 web results, consider using
edition: liteandtop_klimits. - Python dependency: The skill requires
python3and therequestspackage. Agents running in environments without Python will need alternative arrangements. - Regional focus: Baidu's index is optimized for
.cndomains and Chinese content. Coverage of international sites (GitHub, Stack Overflow, Medium) is weaker than Tavily or Brave.
The Bigger Picture
In February 2026, Baidu integrated OpenClaw directly into its search app — giving 700 million monthly active users access to AI agents through the same interface they use for everyday web search. The baidu-search skill is part of a broader Baidu Qianfan Skills suite (alongside Baidu Scholar Search and Baidu Embedding DB) that brings the Baidu ecosystem directly into agentic workflows.
For teams building AI agents that need to understand the Chinese internet — whether for market research, regulatory compliance, competitive intelligence, or localization — this skill is not optional. It's the only way to reliably query the largest Chinese-language index on the web from within an AI agent workflow.
View the skill on ClawHub: baidu-search