SoSearch API
A lightning-fast pseudo Web Search Engine API written in Rust โ also works as an MCP server for AI agents. This project emulates popular APIs like SerpAPI or Tavily without needing official and expensive API keys, by multiplexing requests to popular engines directly and scraping the results concurrently.
Philosophy
- Performance: Powered by
tokiofor async concurrent I/O. - Bot Bypass: Leverages
rquestwith TLS impersonation (e.g., simulating a Chrome 124 browser footprint at the TLS/HTTP2 layer) to minimize blocking vs standard HTTP clients (the Rust equivalent ofcurl_cffi). - Standardized: Normalizes
DuckDuckGo,Yahoo, andBraveHTML results into a standardizedSearchResultJSON array.
Core Stack
๐ Supported Search Engines
- DuckDuckGo (Primary standard search)
- Yahoo (Powered by Bing)
- Brave Search (Independent index)
๐ Project Structure
src/ โโโ main.rs # Entry point: HTTP server or MCP mode (--mcp) โโโ search.rs # Shared concurrent search logic โโโ mcp.rs # MCP stdio server (JSON-RPC 2.0) โโโ models.rs # SearchResultItem, SearchResponse structs โโโ engines/ โโโ mod.rs # SearchEngine enum + trait dispatch โโโ duckduckgo.rs # DuckDuckGo scraper โโโ yahoo.rs # Yahoo scraper (Bing-powered) โโโ brave.rs # Brave Search scraper examples/ โโโ fetch_html.rs # Download raw HTML for offline debugging โโโ test_parser.rs # Offline CSS selector iteration .gemini/ # Gemini CLI agent config โโโ GEMINI.md # Project-level system prompt โโโ settings.json # MCP server configuration โโโ skills/ # Project-level agent skills โโโ sosearch-engine-dev/ # Scraper development workflow โโโ sosearch-api-ops/ # API operations & deployment .agents/ # Generic agent config (compatible with multiple AI tools) โโโ skills/ # Same skills, alternative discovery path โโโ sosearch-engine-dev/ โโโ sosearch-api-ops/
๐ค Agent Skills & MCP Support
This project includes built-in AI agent support for both Gemini CLI and other tools that follow the .agents/ convention.
Available Skills
| Skill | Description |
|---|---|
sosearch-engine-dev | Full workflow for adding/debugging search engine scrapers: fetch HTML โ test selectors offline โ decode URLs โ integrate |
sosearch-api-ops | Operations guide: build, run, test, deploy (local + Docker), troubleshoot |
MCP Servers
Configured in .gemini/settings.json:
| Server | Package | Purpose |
|---|---|---|
filesystem | @modelcontextprotocol/server-filesystem | Scoped file access to project directory |
Usage with Gemini CLI
bashcd /path/to/SoSearch gemini # Skills are auto-discovered. Ask: "How do I add a new search engine?"
๐ MCP Server Mode
Run SoSearch as an MCP server for AI agents (Claude, Gemini, Cursor, etc.):
bash./SoSearch --mcp
Configuration
Claude Desktop (claude_desktop_config.json):
json{ "mcpServers": { "sosearch": { "command": "/path/to/SoSearch", "args": ["--mcp"] } } }
Gemini CLI (.gemini/settings.json):
json{ "mcpServers": { "sosearch": { "command": "/path/to/SoSearch", "args": ["--mcp"] } } }
This exposes a web_search tool that AI agents can call to search the web.
Windows Configuration
Claude Desktop (%APPDATA%\Claude\claude_desktop_config.json):
json{ "mcpServers": { "sosearch": { "command": "C:\\path\\to\\SoSearch.exe", "args": ["--mcp"] } } }
๐ Quick Start
Linux / macOS
bash# Download pre-built binary or build from source cargo run --release curl "http://localhost:10080/search?q=hello+world"
Windows
ไฝฟ็จ้ข็ผ่ฏไบ่ฟๅถ๏ผ
ไป GitHub Releases ไธ่ฝฝ SoSearch-windows-amd64.zip๏ผ่งฃๅๅ๏ผ
powershell# ๅฏๅจ HTTP ๆๅก .\SoSearch.exe # ๅฆๅผไธไธช็ป็ซฏๆต่ฏ Invoke-RestMethod "http://localhost:10080/search?q=hello+world" | ConvertTo-Json # ๆไฝฟ็จ curl curl.exe "http://localhost:10080/search?q=hello+world"
ไปๆบ็ ็ผ่ฏ๏ผ้่ฆๅฎ่ฃ RustใCMakeใNASMใLLVM/Clang๏ผ๏ผ
powershell# ๅฎ่ฃ ไพ่ต (ไฝฟ็จ Chocolatey) choco install cmake nasm llvm -y # ็ผ่ฏ่ฟ่ก cargo run --release
MCP ๆจกๅผ๏ผ
powershell.\SoSearch.exe --mcp
Refer to QUICK_START.md for full instructions.
๐ License
CC BY-NC 4.0 โ ้ๅไธ็จ้ๅฏ่ช็ฑไฝฟ็จใไฟฎๆนๅๅๅใ
๐ Community
้ฆๅไบ LINUX DO ็คพๅบ๏ผๆฌข่ฟ Star โญ ๅ PR๏ผ




