AI and models · Independent · 22 Oct 2026

fatwang2/search2ai

Self-hosted search gateway for AI agents. Unified search, news and page extraction with provider fallback. REST API, MCP server and TypeScript library.

← AI and models
Search2AI: search gateway for agents. Self-hosted search gateway with automatic failover.

In simple English

When your AI agent needs to search the web, it talks to this gateway. If your main search provider breaks or hits a rate limit, the gateway automatically tries the next one on your list. It unifies ten different search and crawling services behind a single format. You can run it on your own server, use it inside a Cloudflare Worker, or load it as a library in your own code. It costs you whatever time you spend setting up your API keys and your hosting.

What it is

A self-hosted search and crawling gateway written in TypeScript that aggregates multiple search providers into a single Perplexity-compatible API. It supports automatic fallback, an MCP (Model Context Protocol, a way for AI models to talk to local tools and data sources) server, and a TypeScript library.

What it is good for

Solo builders who want to give their AI agents reliable web search without depending on a single search vendor or writing custom failover logic for every API.

Stars1.3k
LicenceMIT
Latestv0.3.0 (2026-09-03)checked 22 Oct 2026
Last code change2026-10-22
Written inTypeScript
Setup effort
2 / 5
Payoff
4 / 5
Good
  • Automatically switches to backup search providers if the primary one fails or rate limits.
  • Provides a Model Context Protocol server out of the box for tools like Claude and Cursor.
  • Runs on Node, Bun, Docker, or Cloudflare Workers from the same codebase.
Watch for
  • Requires you to bring your own paid API keys for the underlying search providers.
  • Requires basic familiarity with environment variables and command-line tools to set up.
  • Node, npm, and a TypeScript build environment are needed if you modify the source code.
Replaces

Writing custom fallback logic and glue code for multiple search APIs.

Works well with

Claude Desktop or Cursor for AI tool use.

Similar repositories
  • searxng/searxng39k stars

    A free internet metasearch engine that aggregates results from many search services, while search2ai acts as a gateway for AI agents.

  • firecrawl/firecrawl194k stars

    Turns entire websites into clean markdown for LLMs, while search2ai focuses on unified search and provider fallback.

Also reviewed on Repo Radar
  • ggml-org/llama.cpp132k stars

    A C and C++ library and command-line tool for running language models locally.

  • EleutherAI/lm-evaluation-harness14k stars

    Runs standard question sets against a language model and reports the scores.

  • mudler/LocalAI50k stars

    Serves text, vision, speech, image and video models from one self-hosted service that imitates the paid interfaces.

Install
npm i search2ai
SEARCH1API_KEY=your_key npx search2ai serve

Independent: reviewed for Repo Radar outside the daily editions. Every independent repository

On Stack Radar: Data & Research › Web Scraping & Crawling › Search APIs for AI Agents.

Get the next edition in your inbox

A dozen repositories, opened and checked. The licence read, the last release dated, and the ones that did not make it named with the reason. It is the half most lists leave out.

No tracking pixels. One click to leave. The archive stays free either way.

We use your address to send the edition and nothing else. Confirm by email, leave in one click. How we handle it.