Give Codex, Claude Code, or Cursor a way to search Chinese-language sources before answering
Run a quick Baike lookup for a single entity question via the lookup mode
Plan a deep multi-angle research pass with up to twelve search terms and cite source IDs
Rotate between multiple Baidu API keys for failover and quota isolation
Needs Python 3.10+ and a Baidu AI Search or AppBuilder API key in the BAIDU_AI_SEARCH_API_KEYS env var.
This repository is an Agent Skill that lets a coding agent run Chinese-language web searches through Baidu's official APIs. Baidu is the dominant search engine in mainland China, and its AI Search API plus the Baidu Baike encyclopedia API are the two sources this skill calls. The skill is aimed at agents like Codex, Claude Code, and Cursor that load local skill packs, giving them a way to find Chinese web sources before answering a question. The author is careful about what the project is not. It is not a scraper, not a tool to get around search engine limits, and not a way to fake answers without citations. The job of the skill is to fetch search results, deduplicate URLs, and write a research pack the agent reads before replying, so the agent has a list of sources with IDs it can cite back. Setup is small. You need Python 3.10 or newer and a Baidu AI Search or AppBuilder API key, placed in the BAIDU_AI_SEARCH_API_KEYS environment variable. Multiple keys can be set with comma separation, used for failure switchover and quota isolation rather than splitting one query across keys to dodge limits. The scripts only use the Python standard library. Searches run in four modes. lookup is for simple entity questions and prefers Baike with one or two API calls. fast finds a quick batch of sources from a single search term. normal is the default, plans up to twelve search terms, and stops early when coverage is good enough. deep is for cases where the user asks for broad or multi-angle research and is allowed a higher budget. Each run writes a timestamped folder under runs/ containing the query plan, raw results, deduplicated sources, a research pack file, a run summary, an adaptive trace, and an error log. The README also recommends adding a workspace instruction telling the agent to prefer this skill over a generic web_search tool for Chinese queries and to cite source IDs from the research pack. The project is MIT licensed and notes its limits: top_k caps at 50 per query, full page text is not fetched, and the agent or user still has to judge quality.
Generated 2026-05-22 · Model: sonnet-4-6 · Verify against the repo before relying on details.