Baidu Search CLI for Openclaw

A lightweight CLI tool for executing high-speed web searches via the Baidu AI Search API without requiring a Python environment.

zfeng1982
v1.0.5
Mar 20, 2026
0
1.2k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install baidu-search-cli

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install baidu-search-cli using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Baidu Search CLI?

Baidu Search CLI is a specialized tool within the Openclaw Skills ecosystem designed for developers who need robust web search capabilities without the overhead of heavy programming environments. By leveraging direct shell commands and the Baidu AI Search API, it allows AI agents and developers to query the web efficiently.

This skill is particularly valuable for environments where Python is unavailable or undesirable, providing a clean interface through standard curl commands. It bridges the gap between raw web data and AI processing by delivering structured search results directly to the command line.

Baidu Search CLI Use Cases

  • Enabling AI agents to perform real-time web research and fact-checking.
  • Integrating Baidu search capabilities into automated shell scripts.
  • Fetching date-filtered web content for data analytics and research.
  • Lightweight search integration for resource-constrained environments.

How Baidu Search CLI Works

  1. The system checks for the presence of the BAIDU_API_KEY environment variable.
  2. The user or agent prepares a search_request.json file containing the query and parameters.
  3. A curl POST request is dispatched to the Baidu AI Search endpoint.
  4. The API processes the query against Baidu's web index, applying filters like top_k and date ranges.
  5. The results are returned as a JSON response for immediate processing or display.

Baidu Search CLI Setup

To get started with this component of Openclaw Skills, ensure you have a valid API key from Baidu.

  1. Set your environment variable:
export BAIDU_API_KEY='your_api_key_here'
  1. Prepare your search_request.json:
{
  "query": "Your search term",
  "top_k": 10
}
  1. Execute the search via CLI (Windows users should use CMD):
curl -X POST -H "Authorization: Bearer $BAIDU_API_KEY" -H "X-Appbuilder-From: openclaw" -H "Content-Type: application/json" -d "@search_request.json" "https://qianfan.baidubce.com/v2/ai_search/web_search"

Baidu Search CLI Data Schema & Taxonomy

The skill utilizes a JSON-based request schema to define search behavior and constraints:

Field Type Description
content string The primary search query string.
top_k int Number of results to return (Default: 10, Max: 50).
gte string Start date filter in YYYY-MM-DD format.
lt string End date filter in YYYY-MM-DD format.

Baidu Search CLI Advanced Features

  • Zero-dependency architecture requiring only standard shell tools.
  • Precise date-range filtering for historical data retrieval.
  • Configurable result density with support for up to 50 concurrent results.
  • Native integration with Openclaw Skills workflows via standard JSON input/output.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Requires
Bins shell
Github Stars: 0
forks: 0

Featured*