Repository navigation
Search the web and read pages through Apify, and choose to use only the API keys you pass in code.
Upgrade with pip install -U webrouter. Nothing in your code needs to change to upgrade; every detail is in the CHANGELOG.
🚀 What's New
Apify search and extract (#480)
Your APIFY_TOKEN (used for Apify live data since 0.13.0) now also searches the web (Google, or DuckDuckGo) and reads pages that block plain requests. Ask for it with provider="apify"; auto also tries it once the token is set. See Providers
from web_router import WebRouter
router = WebRouter() # reads APIFY_TOKEN
router.search("rust async runtimes", provider="apify", max_results=5)
router.search("rust async runtimes", provider="apify", provider_options={"provider": "duckduckgo"}) # DuckDuckGo instead of Google
router.extract("https://example.com", provider="apify")Keys from code only (#492)
By default, WebRouter picks up backend API keys from environment variables such as TAVILY_API_KEY. Pass use_environment=False and it uses only the keys you give it in provider_config, plus the backends that need no key. Handy when your app calls WebRouter with each of your users' own keys: a call can never fall back on yours. See Keys from code only
from web_router import Provider, WebRouter
router = WebRouter(
provider_config={Provider.TAVILY: {"api_key": "<your user's Tavily key>"}},
use_environment=False,
)
router.search("rust async runtimes", max_results=5) # this Tavily key, then the keyless backendsAlso in this release
- Read a GitHub repository, issue or pull request in one call with
router.github_read(url)(#497) - Oxylabs reads pages with just its Web API key (
OXYLABS_WEB_API_KEY) (#490) - Read a public YouTube video's captions as text with no API key:
provider="youtube-captions", with yt-dlp installed (docs) (#496) - Run the MCP server in Docker over stdio:
docker build --target stdio -t webrouter-mcp-stdio .(docs) (#493) - Agents that cut long tool output, like Codex CLI, can read a large MCP result page by page (#488)
- MCP status checks wait for the job to finish instead of making the agent ask again and again (#479)
- The MCP server hides more secrets in links, such as passwords and private keys (#472)
- WebIQ domain filters no longer hurt result quality and take up to 250 domains (#448)
- Large
extract()batches, MCP secret cleanup and data API catalog search run 8 to 147 times faster (#466, #467, #468) - Data API errors report their HTTP status, and a 401, 403 or 404 is no longer retried (#497)
🐛 Fixes
- Nimble live data returns every item of a listing instead of an error (#484)
- Nimble live data keeps the warnings Nimble sends (#452)
- A page returned under a slightly different URL is no longer reported as missing (#471)
- Nimble research citations drop stray list numbers (#453)
- You.com rejects too many domains up front, so
automoves on (#485)
🙌 Contributors
Thank you to everyone who built this release: @nicklamonov for Apify search and extract (#480, first contribution), @eilamc14 for MCP paging and status waits (#479, #488), @walsykerem for the speedups (#466, #467, #468), @vadimb013 for WebIQ domain filters (#448, first contribution), @tuval10 for the Nimble live data fixes (#452, #453, #484, first contribution), @koreng-nimble for safer MCP links and the missing-page fix (#471, #472, first contribution), @TheNimbleSapMan for the You.com fix (#485), @yuvalbrt for Oxylabs (#490) and @yogev-nimble for keys from code only, GitHub reading, the Docker image and YouTube captions (#492, #497, #493, #496).
Full Changelog: v0.16.0...v0.17.0