Documentation · Quickstart · Providers · Examples
WebRouter connects agents to search, extract, live data, answer, research and browsers through one typed interface, across many providers.
- Agent web primitives. Find pages, read them, ask for an answer, run deep research, call a site's structured scraper, or drive a browser.
- Smart routing. Static fallback and optional routers trade off cost, latency and coverage for each task and the providers you have keys for.
- No vendor lock-in. Calls and results keep the same shape when you switch providers. WebRouter is Apache 2.0 and runs with your own keys.
- Providers and vendor APIs. Use one call shape across web providers, then use the curated catalog for provider-specific APIs.
- Governance and security. Control provider selection and routing, keep keys scoped to their provider, reject unsupported constraints, and require explicit opt-in for vendor writes.
Useful? Star the repo so more agent developers can find it. ⭐
Developer preview: the API may change before 1.0. Share feedback on Discord.
Quickstart
Install WebRouter and make a search with no API key:
pip install "webrouter[all]"
from web_router import WebRouter
response = WebRouter().search("what is retrieval augmented generation", max_results=5)
for result in response.results:
print(result.title, result.url)
print(response.provider) # which backend actually answered
pages = WebRouter().extract(response.urls[:3], format="markdown")
for document in pages.documents:
print(document.url, len(document.content))
The full Quickstart adds a named provider, API keys, async usage, install extras and source setup.
Runnable examples cover each core method, routing, integrations and common errors. Most need no credentials.
Documentation
The docs site is the canonical guide for getting started and for the core methods. This README keeps the advanced and contributor-facing surfaces that have not moved there yet.
| Start here | Core methods | Reference |
|---|---|---|
| Introduction | Search | Configuration |
| Quickstart | Extract | Errors |
| How it works | Answer | Providers |
| Examples | Research | MCP server |
| Browser sessions and agents |
Provider support
Twelve search backends, seven extract backends, a live data catalogue, five answer backends, three agentic research backends (plus Exa's, retired upstream), five browser-session backends and three browser agents. One call each. Switching between them is one argument.
A provider name serves the methods it serves and no others: brave searches
and cannot extract, oxylabs extracts and cannot search, nimble searches,
extracts, runs live data and researches, and browserbase opens
sessions, runs browse tasks and extracts.
Ask a method for another's backend and it says so, naming the backends that
method does serve.
No comments yet.