Baidu AI Search: Integrating Baidu Qianfan AI Search and Hot List into Agent

Introduction

When conducting research in environments like Cursor and Claude Code, the model’s built-in web-browsing capability is often unstable, or its results are difficult to reconcile with domestic sites and real-time trending lists. If you want your Agent to follow a fixed workflow for calling Baidu Qianfan’s AI search, encyclopedia, and trending list APIs—and to bake quota and API selection logic into a Skill—the community Skill “百度ai搜索” provides an installable solution. Below we explain what it is, what it can do, and how to install and configure it via SkillHub.

What Is This

“百度ai搜索” is a community Skill on SkillHub, identified as @user_458b0f84/baiduaisearchwithquota. The current version is 1.0.3, categorized under knowledge-management, with a tag indicating requires_api_key=true. Official description: integrates deep search, encyclopedia queries, trending list retrieval, and other capabilities for web information retrieval, real-time news, and knowledge queries.

The Skill package’s metadata requires the runtime environment to have python3 and to provide a Baidu Qianfan API Key via the environment variable BAIDU_API_KEY. The package’s README also points to the GitHub repository Stan-Xia/baidu-ai-search as a related reference; when installed via SkillHub, the scripts/ directory inside this Skill is treated as the source of truth.

Core Features

The following capabilities are drawn from the Skill package’s SKILL.md and script documentation, and can be grouped into three categories by purpose.

Intelligent Search and Scheduling

scripts/smart_search.py acts as a dispatcher. When no API is explicitly forced, it tries APIs by priority: Deep Intelligent Search (chat_completions) → High-Performance Edition (web_summary / smart_search_pro) → Standard Baidu Search (web_search / smart_search). The documentation states the approximate daily quotas are: about 100 calls each for deep and high-performance search, and about 50 calls for standard search; scheduling switches to the next API tier when the current quota reaches approximately 85%.

You can also use --force to lock a specific API category, such as deep search, encyclopedia details/search, or trending lists from various platforms.

Encyclopedia

Supports entry details (baike_content) and title-based search (baike_search). The documentation notes an approximate daily quota of 50 calls.

scripts/trending.py can query trending lists from multiple platforms (e.g., weibo, zhihu, bilibili, xhs, douyin), and supports subcommands for vertical trending lists and Baidu hot search categories. The Skill documentation provides separate daily limits for trending lists, vertical trending, and Baidu hot search, and reminds users that the total trending list calls and billing strategy should be based on the Qianfan console.

Installation and Activation

1. Install the SkillHub CLI (if not already installed)

First check whether the CLI is available:

command -v skillhub && skillhub --version

If not installed, follow the official SkillHub installation instructions (full install or CLI-only):

curl -fsSL https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/install.sh | bash
curl -fsSL https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/install.sh | bash -s -- --cli-only

Instructions: https://skillhub.cn/install/skillhub.md

2. Install This Skill

When installing, you must use --dir to point to the current Agent’s skills directory; otherwise, the default location ./skills/ may not be recognized. The installation prompt shown on the SkillHub page is: following the installation instructions above, install @user_458b0f84/baiduaisearchwithquota.

Command-line examples (replace the directory with your current client’s path):

skillhub install @user_458b0f84/baiduaisearchwithquota --dir ~/.cursor/skills
skillhub install @user_458b0f84/baiduaisearchwithquota --dir ~/.claude/skills
skillhub install @user_458b0f84/baiduaisearchwithquota --dir ~/.codex/skills

After successful installation, the Skill will appear under the corresponding directory as @user_458b0f84/baiduaisearchwithquota/. Some clients require a restart after installing or updating a Skill to load it; refer to the documentation of your specific product.

3. Configure BAIDU_API_KEY

Create an application and obtain an API Key at the Baidu Qianfan Console, then set the environment variable:

export BAIDU_API_KEY="your API Key"

You can also pass it when invoking the script (see the --api-key option in the package’s SKILL.md). Do not commit your Key to a public repository.

Typical Usage

The following examples assume the Skill is installed at ~/.cursor/skills/@user_458b0f84/baiduaisearchwithquota; for other clients, replace .cursor in the path with the corresponding skills directory.

Intelligent search (recommended, auto-selects API):

python3 ~/.cursor/skills/@user_458b0f84/baiduaisearchwithquota/scripts/smart_search.py 'Latest tech news'

Force deep intelligent search with reasoning enabled:

python3 ~/.cursor/skills/@user_458b0f84/baiduaisearchwithquota/scripts/smart_search.py 'Quantum computing' --force chat_completions --reasoning

Query Weibo trending list:

python3 ~/.cursor/skills/@user_458b0f84/baiduaisearchwithquota/scripts/trending.py weibo

In an Agent session, you can also follow the prompt on the SkillHub page and let the AI complete the installation according to the installation instructions. After enabling the Skill, when users describe their search or trending list needs in natural language, the Agent should call the above scripts according to SKILL.md rather than fabricating APIs.

Use Cases and Considerations

Who it’s for: Developers who need AI-summarized search, encyclopedia verification, and trending list tracking on domestic data sources; users already working with clients that support Skills such as Cursor, Claude Code, and Codex, and who are willing to apply for a Qianfan API Key themselves.

Limitations and considerations:

  1. Quotas and costs: The Skill documentation lists reference daily limits for each API, while also clarifying that Baidu’s own accounting may not match the documentation—the Qianfan Resource Usage page is the authoritative source. After the free tier is exhausted, usage may switch to post-paid billing; monitor your account balance accordingly.
  2. Trending list call counts: The documentation describes different limits for “general trending lists,” “vertical trending lists,” and “Baidu hot search.” Before making actual calls, it’s advisable to cross-check against the quota table in SKILL.md to avoid exhausting quotas through unintended testing.
  3. Network and dependencies: Access to Baidu’s API is required; dependencies are limited to python3 and requests (used within the scripts), with no additional compilation steps.
  4. Community maintenance: The source is the SkillHub community, published by user_458b0f84; troubleshooting can refer to the troubleshooting table included in the package (e.g., invalid Key, insufficient quota, empty results, etc.).

The version currently shown on the SkillHub page is v1.0.3; the on-site statistics (at time of crawl) show a rating of 100000, approximately 1898 downloads, and 24 installations—provided for reference on popularity only, with no direct relation to Qianfan quotas.

Conclusion

“百度ai搜索” wraps Baidu Qianfan’s search, encyclopedia, and trending list capabilities into a Skill that an Agent can follow, and uses a dispatcher to switch between multiple APIs based on priority and quota usage. If you are building an Agent workflow for domestic news and knowledge queries, you can install from SkillHub, configure BAIDU_API_KEY, and then use the bundled scripts for reproducible verification.

Official Skill page: https://www.skillhub.cn/skills/user_458b0f84/baiduaisearchwithquota
API endpoint (SkillHub): https://api.skillhub.cn/user_458b0f84/baiduaisearchwithquota

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye