WebRouter
OfficialWebRouter is an MCP server that gives agents a unified interface for web search, extraction, research, live data, browser automation, and vendor API calls, with routing, fallback, and budget controls.
Search the web and return ranked links with titles, text, provider, and options for domain filters, recency, locale, country, effort, depth, and result count.
Extract page content from known URLs as markdown, HTML, or text, including racing all backends with provider='max'.
List, describe, and run live data/scraper sources that return structured records from supported vendors.
Answer closed questions with citations and optional source snippets.
Start and poll multi-step research runs, optionally constrained by a JSON output schema.
Start and poll hosted browser-agent tasks for interactive sites, forms, and logins.
Drive a browser session: open, navigate, snapshot accessibility tree, click, type, press keys, screenshot, read page text/HTML, and close.
Fetch full raw backend payloads for earlier results.
Load API keys from a user-specified .env file and return only credential names.
Route plain-language requests via web_run, with optional dry-run planning and cost/time caps.
Start and inspect a task budget in dollars and seconds.
Discover, describe, and call third-party vendor APIs with the user's credentials, with write operations protected.
Use keyless search/extract and a free local browser; many billed methods currently require provider keys and will fail until credentials are configured.
Provides live-data access to Amazon product records via the amazon_products source, using a supported live-data provider such as Bright Data.
Integrates Brave as a search and answer provider, enabling WebRouter to route web search and sourced-answer requests to Brave.
Allows calling Datadog's own API through the call_vendor method with user-supplied credentials for vendor-specific operations.
Allows calling Google Ads' own API through the call_vendor method with user-supplied credentials for vendor-specific operations.
Integrates Perplexity as a search, answer, and research provider, enabling WebRouter to route queries and multi-step research to Perplexity.
Developer preview: the API may change before 1.0. Share feedback on Discord.
Every web API for agents has its own SDK, parameter names and response shape. WebRouter puts one interface in front of all of them, so switching provider is one argument, a failing provider falls back to the next, and your agent code never changes.
from web_router import WebRouter
with WebRouter() as router: # no API key needed to start
results = router.search("what is retrieval augmented generation", max_results=5, timeout=10)
pages = router.extract(results.urls[:3], timeout=30) # markdown, whichever backend serves it
print(results.provider, [doc.url for doc in pages.documents])Why WebRouter
One call shape, every provider. The same request and the same typed response from Tavily, Exa, Brave, Perplexity, Firecrawl, Nimble and the rest. Nothing is lost: unmapped fields stay in
extraand the raw payload inraw.Never silently weaker. An option a provider cannot honour raises
UnsupportedParameterErrorinstead of being dropped, so a call never runs under looser constraints than you asked for.Routing based on published benchmarks.
autotries the providers you hold keys for in the order committed benchmark results rank them, and falls back on an error or an empty answer.response.provideralways says who answered.Cost control. Search, extract, answer, research and browse responses say how long they took and, where the backend's price is known, what they cost. Cap a call or a whole session in dollars and seconds, try the free backends first, and keep a log of what you spent (budgets).
Keyless to start. Search, extract and a local browser work with no API key. Every key you add unlocks more providers and fallbacks.
Built for agents. An MCP server, plus ready-made tools for LangChain, Claude and OpenAI agents.
Measure, don't guess.
benchmark()andevaluate()compare providers on your own queries and score their accuracy against known answers.Yours to run. Apache 2.0, runs in your process with your own keys, and sends each key only to its own provider.
Related MCP server: nimble-js-mcp
Install
pip install "webrouter[all]" # or: uv add "webrouter[all]"Or try the command line with no install and no key:
uvx --from "webrouter[search,extract]" webrouter search "rust async runtimes" -n 5Python 3.11 or later. Extras per method (search, extract, research,
answer, browser, mcp, ...) keep the install small; see the
Quickstart.
Keys are read from the environment. Copy .env.example, which
names every variable and where to get it, and fill in the ones you hold.
Methods
Method | What it does | Keyless |
Web results for a query | Yes | |
Page contents for URLs, in markdown, html or text | Yes | |
A written answer with its sources, in one call | No | |
A multi-step research run, as prose or a schema you give | No | |
A vendor's ready-made scraper for one site, returning records | No | |
A browser session you drive, local or in the cloud | Yes ( | |
A task handed to a hosted browser agent | No | |
A vendor's own API (Google Ads, Datadog, ...) with your credentials | No |
with WebRouter() as router:
router.answer("who won the 2022 world cup final") # .answer, .citations
router.research("how did nvidia's datacenter mix shift in 2025", output_schema=MySchema)
router.live_data("amazon_products", {"url": product_url}, provider="brightdata")
with router.open_browser() as browser: # a local Chromium, no key
browser.goto("https://example.com")Every method has an async twin on AsyncWebRouter.
Providers
Method | Providers |
Search | Nimble, Tavily, Exa, Brave, Perplexity, Parallel, Linkup, You.com, WebIQ, Keenable, DeepSeek, AWS AgentCore, Valyu, Seltz, Octen, Keirolabs, SpecStream, plus the keyless You.com, Exa and Parallel MCP endpoints |
Extract | Nimble, Tavily, Firecrawl, Exa, Linkup, Oxylabs, Bright Data, Jina Reader, WebIQ, Keenable, DeepSeek, Browserbase, SpecStream |
Answer | Perplexity, You.com, Linkup, Parallel, Exa, Brave |
Research | Nimble, Parallel, Perplexity, Linkup, You.com |
Live data | Nimble, Apify, Bright Data, Oxylabs |
Browser sessions | Local Chromium, Browserbase, Steel, Hyperbrowser, Anchor, Kernel |
Browser agents | Browserbase, Browser Use, Skyvern |
Providers has each provider's key, the options it maps and how it was verified. Adding one is two methods: see Adding a provider.
Routing and fallback
For search, extract, answer, research and the browser methods, name no
provider and auto serves the call: every provider you hold a key for, in the
order committed benchmark results rank them,
then the free tiers. A member that fails, is rate-limited or answers empty
passes the call to the next. A member that cannot honour an option you set is
skipped for that call, and if none can, the call raises rather than running
without it. Live data has no fallback, since a source belongs to one vendor:
live_data_sources() with no provider searches every vendor you hold a key
for, and each source it returns names its own, which live_data() runs it on.
Vendor calls always name their vendor, since an account belongs to one.
from web_router import Provider, WebRouter
WebRouter(Provider.TAVILY).search("...") # one provider, by name
WebRouter().search("...", provider="exa") # or per call
router = WebRouter(provider_config={"auto": {"chain": {"extract": ["nimble", "firecrawl"]}}})
router.extract(url) # Nimble, then Firecrawl if Nimble failsA named provider is never quietly swapped for another: a missing key raises an
error naming the variable to set. In a service, share one router per process,
set timeout= on each call and turn on the web_router logger: see
Running in production. The auto order
lists each method's order and how it is generated.
Budgets and cost control
from web_router import Budget, WebRouter, prices
router = WebRouter(router="cheapest_first") # free backends first, then the cheapest paid ones
log = router.log_spend("spend.jsonl") # from here on, every answered call is logged
response = router.answer("...", budget=Budget(max_cost_usd=0.01, time_limit_s=10))
response.provider, response.cost_usd, response.cost_source, response.elapsed_s
with router.budget(Budget(max_cost_usd=3.0, time_limit_s=600)) as b:
b.search("...")
b.research("...")
b.status() # spent, reserved, remaining, time left
log.report() # what you spent, by day, backend and method
prices.estimate("tavily", "search") # 0.008: list price of one requestEvery response carries cost_usd: the backend's own figure where it states
one (cost_source="reported"), 0 for a call on a backend's keyless tier
(cost_source="keyless"), else an estimate. Unless a router ranks the
backends itself (the default rules router does not), a cost cap makes auto
try the cheaper of the backends that score alike first.
Each attempt is checked against what is left before it starts, so parallel
calls never overspend together, and a backend that does not fit is skipped
with the reason recorded. Estimates come from the list prices shipped in
web_router.prices, not your bill. Only search (its keyless backends) and
open_browser (local) have a $0 backend; Cost and budgets
has the table per method, a fall-back for a batch that runs out, and the spend log. An
experimental router can also pick the method and provider for each prompt, and
url_policy="public_only" keeps a planned call off private and cloud-metadata
hosts. See Smart routing.
Use it from an agent
MCP server. Every method as a tool, running on your machine with your keys:
claude mcp add web-router -- uvx --from "webrouter[mcp]" web-router-mcpThe MCP guide covers Claude Desktop, Cursor and other clients, credentials, tool costs and browser guards.
Command line. The same methods from a shell, printing JSON, for scripts and agents that run commands rather than speak MCP:
webrouter search "rust async runtimes" -n 5 | jq -r '.results[].url'See Command line for every command and its exit codes.
Agent frameworks. Ready-made web_search and web_extract tools, with a
compact rendering for the model and the full response kept for you:
from web_router import WebRouter
from web_router.integrations.langchain import web_router_tools
tools = web_router_tools(WebRouter(), max_results=5) # LangChainweb_router.integrations.anthropic and web_router.integrations.openai give
Claude and OpenAI agents the same tools as plain tool definitions. See
Agent integrations.
Data flow
WebRouter runs inside your process, or as an MCP server you start yourself. There is no WebRouter service in between, and nothing to sign up for.
Each call goes straight from your machine to the backend that serves it, carrying your query or URL and that backend's own key. A key is sent only to its own provider.
Which backends: the ones you hold a key for, and, when
autohas none left for a method, the free tiers listed in Working with no credentials. Name a provider to keep a call on that backend alone.Beyond the backends:
call_vendorreaches the vendor API you name, with that vendor's credentials;WEB_ROUTER_MCP_ROUTER=remotesends a prompt to the router service at the URL you set; andevaluate()downloads the question set you pick and calls the judge model you configure.No telemetry. The package sends no usage data and does not call home.
Keys stay in the process. They are read from the environment (and, for the MCP server, from a
.envit is pointed at), held in memory, and kept out of logs and tool results. The server writes no key to disk:load_env'srememberrecords the file's path, never its contents.
Compare providers on your own queries
report = router.benchmark("nvidia q3 earnings", providers=["nimble", "tavily", "you-mcp"])
for run in report.runs:
print(run.provider, run.latency, run.count if run.ok else run.error)benchmark_extract() does the same for extract, and evaluate() scores each
provider's accuracy on a question set with known answers (SimpleQA, FRAMES,
SealQA or your own CSV) with an LLM judge. See
Benchmarks and evaluation, and
benchmarks/ for the published runs behind the default order.
WebRouter or calling each provider directly
Each provider's SDK | WebRouter | |
Switching provider | Rewrite the call, options and parsing | One argument |
Response shape | Different per provider | One typed model, raw payload kept |
An unsupported option | Varies by provider | Raises, naming who can serve it |
A provider fails | Your retry code | Falls back to the next you hold a key for |
Which provider to use | Guesswork | Order from published benchmarks, |
Spend | Per-vendor dashboards | Per-call and per-session caps, list prices in the package |
Agent tools | One integration per provider | One MCP server and one set of tools |
Documentation
Get started | Methods | Go further |
Contributing
Contributions are welcome, and the most useful one is small: map one more of a provider's options, or add a provider.
make install # every extra, dev tools and pre-commit hooks
make check # lint, typecheck and the offline unit tests; no keys neededCONTRIBUTING.md has the workflow and the provider checklist, STYLE_GUIDE.md the review standards, and AGENTS.md the rules for AI coding agents working on this repo.
Community
Discord: questions in #help, and what you built in #showcase.
GitHub Issues: bugs and gaps in a provider's support.
GitHub Discussions: proposals and design ideas.
SECURITY.md: vulnerabilities. Never in a public channel.
License
Apache License 2.0. The SimpleQA grader prompt vendored at
src/web_router/evals/prompts/ keeps its own MIT license, in
LICENSE-simple-evals beside it.
Available Tools
27 toolsanswerAnswer a question (billed)A
Answer one closed question in a sentence or two: the backend searches and writes the answer, with the sources it cites, each by its marker (e.g. '[2]'). A few seconds. Unset, provider tries the configured backends in ranked order, and each one tried bills. Unedited: check it against the sources when it matters. search returns the pages themselves. NOTHING IS CONFIGURED FOR THIS METHOD on this machine, so every call will fail. A key in one of BRAVE_ANSWER_API_KEY, EXA_API_KEY, LINKUP_API_KEY, PARALLEL_API_KEY, PERPLEXITY_API_KEY, YOU_API_KEY turns it on: see load_env.
Inputs: query (required), snippets, all_sources. Returns: note, answer, handle, provider, +2 more
browseStart a browser-agent task (billed)ADestructive
Hand a task to a hosted browser agent that clicks and types until done: MINUTES, billed per task. For forms, a site's own search, pages behind interaction; a URL you have is extract's. After 25s it returns a handle: poll browse_status, since calling this again pays for a second task. NOTHING IS CONFIGURED FOR THIS METHOD on this machine, so every call will fail. A key in one of BROWSERBASE_API_KEY, BROWSER_USE_API_KEY, SKYVERN_API_KEY turns it on: see load_env.
Inputs: task (required), provider, max_steps, start_url, +2 more.
browser_clickClick an elementADestructive
Click an element, named by a ref from the latest browser_snapshot or by a CSS selector -- exactly one of the two. Returns where the page is afterwards.
Inputs: session_id (required), ref, timeout, selector.
browser_closeClose a browser sessionAIdempotent
End a browser session and stop paying for it. Call it as soon as you are done with a session. Closing one that already ended is not an error.
Inputs: session_id (required).
browser_gotoLoad a URL in the browserADestructive
Load a URL in a browser session. Returns the page's final URL, title and HTTP status. Any refs from an earlier browser_snapshot stop working: take a new snapshot before clicking.
Inputs: url (required), session_id (required), timeout, wait_until.
browser_openOpen a browser sessionA
Open a browser session you drive with the other browser_* tools. A cloud backend BILLS FOR EVERY MINUTE; local is free on this machine, and headless=false shows its window. For logins, forms and portals: ask the user first, and browser_close when done (idle 300s ends it; at most 3 open). Unset provider with stealth, proxy_country or solve_captchas routes to a BILLED vendor.
Inputs: timeout, headless, provider, viewport.
browser_pressPress a keyADestructive
Press a key on whatever has focus: 'Enter', 'Escape', 'Tab', 'ArrowDown', 'Control+A'.
Inputs: key (required), session_id (required).
browser_readRead the page's textARead-only
Read the page as it is now, as text or live HTML, shaped like an extract result; fetch_raw with its handle returns all of it.
Inputs: session_id (required), format, timeout.
browser_screenshotScreenshot the pageARead-only
A PNG of the viewport, or the whole page with full_page. It carries no refs: use browser_snapshot to find things to click.
Inputs: session_id (required), timeout, full_page.
browser_snapshotRead the page's element treeARead-only
The page's accessibility tree, one element per line tagged [ref=eN] for browser_click and browser_type. Refs last until the next snapshot or navigation. Capped at 40000 characters unless max_chars says otherwise.
Inputs: session_id (required), timeout, max_chars.
browser_typeType into a fieldADestructive
Type text into a field, replacing what it held, named by ref or selector as for browser_click. submit presses Enter afterwards.
Inputs: text (required), session_id (required), ref, submit, +2 more.
browse_statusPoll a browser-agent taskARead-only
Poll a task browse started: its state, or the answer and the agent's steps once it has one. Free, about a second.
Inputs: handle (required).
budget_startStart a task budgetA
Start a task budget, max_cost_usd at list prices and time_limit_s from now, that every billed tool spends from; a call that does not fit is refused before it bills. It replaces the previous one, and the operator's ceiling still caps it.
Inputs: max_cost_usd (required), time_limit_s (required).
budget_statusShow the budgetARead-only
Where the current budget stands: dollars spent, reserved for calls still running and left, and seconds elapsed and left; and the operator's ceiling, if one is set. Free: it calls nothing.
Inputs: no named parameters.
call_vendorCall a vendor's API with your credentialsADestructive
Call a vendor's API with the user's credentials (never shown) and return its answer as sent. Writes are refused unless 'allow_writes' is true and the server allows them. A large answer stays behind the handle for 'fetch_raw'.
Inputs: body, host, path, query, +5 more.
extractRead pages by URLARead-only
Read pages you have URLs for, as markdown, HTML or text, in a few seconds. It reads, it does not find: URLs come from search, the user or a page. A page behind a login or clicks is browser_open's. provider='max' races every backend, one fetch each: only when the user wants speed over cost. data_apis: its site's vendor APIs, for call_vendor.
Inputs: urls (required), format, provider, data_apis, +1 more. Returns: note, handle, provider, documents, +1 more
fetch_rawFetch a result's full payloadARead-only
The backend's full, unshaped payload for a handle: instant, but can be very large. Use it when a result was cut and you need the rest. Session URLs and credentials in browser payloads are redacted.
Inputs: handle (required).
live_dataRun a live data source (billed)A
Run a live data source and get structured records, scraped for this call. Seconds, up to minutes; bills one run at the vendor's rate. Pass the provider live_data_sources named (optional with one vendor configured); inputs come from live_data_source. For a page no source covers use extract. A failed run is an error, never an empty answer. NOTHING IS CONFIGURED FOR THIS METHOD on this machine, so every call will fail. A key in one of APIFY_TOKEN, BRIGHTDATA_API_TOKEN, NIMBLE_API_KEY, OXYLABS_WEB_API_KEY turns it on: see load_env.
Inputs: source (required), inputs.
live_data_sourceDescribe a live data sourceARead-only
Describe one live data source: its input_schema (what live_data passes as inputs), output_schema and recorded sample runs. About a second; free. Read it before a source's first run here. NOTHING IS CONFIGURED FOR THIS METHOD on this machine, so every call will fail. A key in one of APIFY_TOKEN, BRIGHTDATA_API_TOKEN, NIMBLE_API_KEY, OXYLABS_WEB_API_KEY turns it on: see load_env.
Inputs: name (required).
live_data_sourcesList live data sourcesARead-only
List live data sources: ready-made scrapers that turn one site's pages (a product, a job listing) into records with fixed fields. About a second. Pass query with the site or page kind; page with limit and offset. Leave provider out to search every configured vendor: each row names its provider, and failures names a vendor that could not answer. Each lists its required_inputs and sample_inputs; live_data_source has the full schemas. NOTHING IS CONFIGURED FOR THIS METHOD on this machine, so every call will fail. A key in one of APIFY_TOKEN, BRIGHTDATA_API_TOKEN, NIMBLE_API_KEY, OXYLABS_WEB_API_KEY turns it on: see load_env.
Inputs: limit, query, offset.
load_envLoad API keys from a .env fileAIdempotent
Load API keys from a .env file the user names. Ask where it is; never ask for a key. Only provider credentials are read, an already-set variable wins, and only names are returned. Set remember (read it on every start) only when the user asks.
Inputs: path, forget, remember.
researchStart a research run (billed)A
Start an agentic research run: many turns of searching and reading, which takes MINUTES and bills for the run. For comparisons, datasets or enriching records; a lookup is search's. After 25s it returns a handle: poll research_status, since calling this again pays for a second run. NOTHING IS CONFIGURED FOR THIS METHOD on this machine, so every call will fail. A key in one of LINKUP_API_KEY, NIMBLE_API_KEY, PARALLEL_API_KEY, PERPLEXITY_API_KEY, YOU_API_KEY turns it on: see load_env.
Inputs: query (required), effort, provider, output_schema.
research_statusPoll a research runARead-only
Poll a run research started: its state, or the answer once it has one. Free, about a second.
Inputs: handle (required).
searchSearch the webARead-only
Search the web: ranked links with titles and text, in seconds; free if keyless, else billed. Use extract for a known URL, research to investigate. Higher effort costs more; leave it unset unless needed. For a login or form, suggest browser_open. data_apis: vendor APIs for call_vendor; offer one if it beats the pages.
Inputs: query (required), effort, locale, country, +9 more. Returns: note, answer, handle, results, +2 more
vendor_endpointDescribe a vendor API endpointARead-only
Describe one vendor endpoint: every input with where it goes and an example, the notes a caller gets wrong without (units, paging, quirks), and the credentials it needs. Read it before 'call_vendor'.
Inputs: endpoint (required).
vendorsFind a vendor API endpointARead-only
Find a vendor API (Google Ads, Datadog, ...) to call with the user's own credentials. With 'query', matching endpoints, best first; without, the vendors. Then 'vendor_endpoint' and 'call_vendor'.
Inputs: limit, query, vendor, category, +1 more.
web_runRoute and run a requestADestructive
Hand a request in plain words to web-router's router, which picks the method and backends and runs it (by default: a URL is read, a report or comparison researched -- billed, minutes long, so set max_cost_usd -- anything else searched). Call a tool directly for its options. dry_run=true returns the plan and bills nothing.
Inputs: prompt (required), dry_run, max_cost_usd, time_limit_s.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 27 tools
Pipelines for browser control, vendor APIs, live data sources, budget tracking, and status polling are clearly separated. The main ambiguity is among the web-information tools: web_run overlaps search/extract/research, and answer versus search/research requires reading the descriptions, though those descriptions are fairly explicit.
Names are consistently snake_case and grouped with clear prefixes/suffixes such as browser_, live_data_, budget_, and *_status. There is no single verb_noun convention—bare nouns/verbs like vendors, search, extract, and answer coexist with call_vendor and budget_start—but the naming remains readable and predictable within groups.
27 tools is heavy for an agent to scan, but the server spans genuinely different modalities: search, extraction, manual browser control, hosted browsing, research, vendor APIs, live data, budgets, and environment loading. Each group earns its place, but the overall surface is above the comfortable range and increases selection overhead.
The surface covers the main lifecycles: search/extract, full manual browser control, hosted browse and research start/status, vendor discovery/describe/call, live-data list/describe/run, raw fetch, and budget start/status. Minor gaps remain, such as no cancellation for long-running research/browse runs and no explicit browser session listing or multi-tab controls, but workarounds are generally available.
Maintenance
Related MCP Connectors
Connect AI agents to discover services and coordinate real-world tasks.
Free, privacy-respecting software and public discovery tools for AI agents.
Connect your AI agent to 300+ methods and 100+ live tools
The system of record for AI agents — open-source (MIT) database where agents and people share data.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA standardized interface for agent-to-agent communication that enables composability, supports streaming, and implements server-sent events (SSE) for real-time interaction.Apache 2.0

nimble-js-mcpofficial
AlicenseNot gradedqualityBmaintenanceEnables AI assistants to interact with the Nimble REST API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.7,836 npmApache 2.0- AlicenseAqualityDmaintenanceEnables AI tools to discover, communicate with, and orchestrate AI agents over a decentralized peer-to-peer network with end-to-end encryption.626 PyPIApache 2.0
- AlicenseNot gradedqualityDmaintenanceA peer-to-peer protocol for AI agents to call tools on each other over HTTP, with cross-provider translation, file transfer, batching, rate limiting, and audit logging.MIT