search2ai
A self-hosted search gateway for AI agents that exposes a single Perplexity-compatible search API backed by several providers, falling back to the next one automatically if one is rate-limited or down.
search2ai is a self-hosted search gateway for AI agents, exposing a Perplexity-compatible search API backed by providers including Search1API, Tavily, Brave, Exa, Serper, SerpApi, Google, and SearXNG; if one provider is rate-limited, times out, or errors, it automatically falls back to the next, and the response reports which provider answered and which were skipped. All providers use a single response schema of title, URL, snippet, and date, so switching providers needs no code change, and the gateway supports search, news, and crawl operations using each provider's own API key rather than key-free scraping.
It can be used as a library with no deployment, as a local MCP server for clients such as Claude, Cursor, and Claude Code, as an HTTP service exposing both a REST API and an MCP endpoint, or mounted into an existing Hono application; deployment targets include Node, Cloudflare Workers, Bun, and Docker from the same codebase.
An older proxy mode that gives any OpenAI-compatible client web access by changing its base URL is still supported for backward compatibility.