TinySearch is a self-hosted web research tool for AI agents, with the main goal of completing web search, crawling, reranking, and deduplication before the model, thereby reducing token consumption and improving retrieval efficiency. It searches the web, reads the best pages, removes low-value content, and returns compact evidence with source URLs. The model receives useful passages instead of paying to process entire web pages.
Main capabilities:
- Search: supports SearXNG, DuckDuckGo (via the ddgs package), and an automatic fallback mode. By default, no paid search service is required; Brave Search API can optionally be used as a fallback.
- Crawling: concurrently reads content from known pages, returns selected Markdown evidence and related navigation candidate links, and respects a configurable token limit.
- Reranking and deduplication: runs ONNX embeddings and hybrid reranking (BM25 and dense vectors) locally, returns the best evidence chunks based on the original page text, and does not perform model rewriting or summarization, ensuring citations match the original text.
- Browser automation: when static scraping is insufficient, drives a real browser through Playwright to handle JavaScript rendering, cookie pop-ups, load more, or client-side search interfaces. Provides two tools, browser_navigate and browser_act, supporting navigation, clicking, typing, waiting, tab management, and closing.
- External browser access: can drive a user-run browser through the Chrome DevTools Protocol (CDP), and supports routing crawling through a proxy.
Usage:
- MCP client integration: using uv, TinySearch can be added to any MCP client. The client starts TinySearch via stdio, with no need to clone the repository, register an account, or use a paid search key.
- Python package: can be called as a regular Python package, returning stable, JSON-serializable results.
- FastAPI service: an optional FastAPI application provides endpoints such as /search, /scrape, /browser/navigate, /browser/act, /health, /current_datetime, and read-only /config.
- Installation: supports Docker deployment, and can also be run from a source checkout; detailed installation steps are in the installation guide in the documentation.
ApplicableScenarios:
- Need to provide localized, low-cost web research capabilities for AI agents.
- Want to keep only high-value evidence within the model context to reduce input token costs.
- Need retrieval results with traceable citations and unmodified source text.
- Run search and crawling in a private environment, avoiding reliance on externally hosted search services.
Limitations:
- TinySearch is a retrieval layer, not an agent, chat interface, hosted search product, or permanent web index.
- It does not summarize or compress; every chunk returned is original page text, so it may be less compact than dedicated reduction models.
- Actual savings depend on the page, evidence limit, client model, and provider pricing; TinySearch does not control how the client subsequently uses the evidence.
- Browser tools cannot execute code, and do not support form filling, uploading, or drag-and-drop; they can only click and type based on refs observed by the model.
- Operator-managed configuration items (such as browser_backend, browser_cdp_url, browser_storage_state_path, browser_proxy_server, etc.) cannot be modified via HTTP PUT /config; they must be set in the startup environment or configuration file and then restarted.
- If OpenTelemetry is enabled, only operation/phase timings, results, counts, backend status, browser usage, token counts, and embedding model metadata are exported; queries, URLs, domains, prompts, documents, snippets, request headers, credentials, configuration paths, raw errors, exception stacks, MCP parameters, or results are never exported.