websearch-sdk — One web search API for every provider
Unified web search for AI agents<br>One web search API for every provider<br>A unified TypeScript SDK to search and scrape the web from your agents. Swap providers without touching your app code, and hand framework-native tools straight to your model.<br>Read the docsBrowse providers<br>terminal
For humansFor agents<br>search.ts
Providers5Providers
Unified API1Unified API
Dual buildsESM + CJSDual builds
Heavy deps0Heavy deps
Provider-agnostic<br>Swap providers, keep your code<br>search() and scrape() always return the same shape. Change the provider factory on one line — the rest of your code never moves.
FirecrawlTavilyExaBraveSerper<br>search.ts
Capabilities<br>Everything an agent needs to read the web
Pluggable providers<br>Firecrawl, Tavily, Exa, Brave, Serper — one small factory each. Switch by changing a single line.
Always-unified results<br>Identical SearchResult / ScrapeResult shapes across every provider, no matter the underlying API.
Agent-ready tools<br>web.tools() returns a Vercel AI SDK ToolSet (web_search + web_scrape) ready for your agent.
Capability-aware<br>Scrape tools and methods are only exposed when the active provider actually supports them.
Lightweight<br>Providers use native fetch — no heavy vendor SDKs dragged into your dependency tree.
ESM + CJS + types<br>Ships dual builds with full TypeScript declarations. Works everywhere on Node 18+.
Quick start<br>From install to first search in two steps
1Install core + a provider
The Vercel AI SDK adapter is built into core. Add ai only if you want agent tools.<br>terminal
2Search the web
Pass a provider, then call the unified API. A bare string works too.<br>search.ts
Give your agent the whole web, one API at a time<br>Start with one provider and switch any time. Adding a provider or framework adapter is purely additive.<br>Get startedStar on GitHub