Bing web search for Pi coding agent and Claude Code. Zero config, no API key needed. Scrapes cn.bing.com — works great in China without VPN.
Existing web search extensions rely on services blocked or limited in China:
| Tool | Problem |
|---|---|
pi-web-access |
Uses Google/Gemini — blocked in China |
pi-websearch |
DuckDuckGo default — blocked in China |
pi-search-hub |
Brave only 2000 free queries/month — runs out fast |
pi-web-bing-search uses cn.bing.com directly:
- ✅ No API key — zero configuration
- ✅ No monthly quota — unlimited searches (rate-limited only)
- ✅ Works in China —
cn.bing.comfully accessible - ✅ Lightweight — pure HTTP, no browser/ffmpeg dependencies
- ✅ Zero npm deps — only Node.js built-ins (fetch, regex)
pi install git:github.com/hustcolin/pi-web-bing-searchAfter installing, just ask:
Search for 马斯克 最新动态
Or use tools directly:
web_search({ query: "Elon Musk latest news" })
web_search({ queries: ["Elon Musk Tesla news", "马斯克 SpaceX 最新进展"] })
get_search_content({ responseId: "a1b2c3d4" })
Features: structured tool schema, progress updates, TUI rendering, result caching, /bing-status command.
node <path>/bing-search.js "<query>"
# Multiple queries (auto-dedup):
node <path>/bing-search.js "query1" "query2"Returns clean JSON:
{
"query": "Elon Musk latest news",
"results": [
{
"title": "Elon Musk - Wikipedia",
"url": "https://en.wikipedia.org/wiki/Elon_Musk",
"snippet": "Elon Reeve Musk is a businessman known for his key roles in Tesla, SpaceX, X (formerly Twitter)..."
}
]
}In Claude Code: Add to your CLAUDE.md:
## Web Search
When the user asks for current information, use Bing search:
node /path/to/bing-search.js "<query>"
Cite the source URLs in your answer.In Pi: The skill is auto-loaded when you pi install — or manually via /skill:bing-search.
pi-web-bing-search/
├── index.ts # Pi extension (free-code tool registration)
├── bing-search.js # Standalone CLI script (no dependencies)
├── skills/
│ └── bing-search/
│ └── SKILL.md # Skill description for Pi / Claude Code
├── package.json # Pi package manifest
└── README.md # This file
| Tool | Description |
|---|---|
web_search |
Search Bing. Supports query or queries (multiple). Returns titles, URLs, snippets. |
get_search_content |
Retrieve stored results by responseId. |
- HTTP GET to
https://cn.bing.com/search?q=...with browser User-Agent - Parse
<li class="b_algo">elements for titles, URLs, snippets - Deduplicate across multiple queries
- Return compact, token-efficient output
- Node.js 18+ (native
fetch) - Pi v0.37.3+ (for extension mode)
MIT