Skip to content

v0.15.0 - Data APIs, Optimized Routing, SpecStream & Oxylabs

Latest

Choose a tag to compare

@ilchemla ilchemla released this 24 Nov 09:48
ed7a090

Reach 100 more company APIs from the same router, choose whether each call is optimized for cost, speed or accuracy, and get two new backends: SpecStream and Oxylabs' ready-made scrapers.

Upgrade with pip install -U "webrouter[all]".

🚀 What's New

Data APIs (#317, #293, #294, #295, #314, #406, #415)

  • Vendor data from 0.13.0 is now called data APIs, and works the same way: one call to one company's own API (your Google Ads reports, IP lookups, company records, crypto prices) with your key, returning that API's own answer. call_vendor() is now call_data_api(), and the old names keep working
  • 100 more data APIs, 472 in all. Browse them in the new Web Catalog, each with its endpoints, an example and the key it needs (#319). Most are written from the company's docs and not yet called live, so tell us on GitHub Issues if one doesn't match
from web_router import WebRouter

router = WebRouter()
response = router.call_data_api("internetdata.ip.lookup", {"ip": "8.8.8.8"})  # no key needed
response.data

Routing optimized for cost, speed or accuracy (#416, #411, #418, #368, #413)

  • Tell the router what matters for your calls: the cheapest backend first (free ones before paid), the fastest by measured latency, or the most accurate by WebRouter's benchmark for search and answer. Your spending limit still applies. See Smart routing
from web_router import PreferredRouter, WebRouter

router = WebRouter(router=PreferredRouter("cheap"))  # or "fast", or "accurate"
router.search("rust async runtimes", max_results=5)

SpecStream (#332)

  • A new search and page-reading backend: compare it with the others, or let auto (the default when you name no backend) fall back on it. Add SPECSTREAM_API_KEY and call provider="specstream". See SpecStream
router.search("rust async runtimes", provider="specstream")
router.extract(["https://example.com"], provider="specstream")

Oxylabs scrapers (#322)

  • Get structured records from Amazon, Walmart, Target, Best Buy, Etsy, Google (Search, Shopping, Scholar, Trends), Bing and YouTube: an Oxylabs login now runs 25 of Oxylabs' ready-made scrapers. Set OXYLABS_USERNAME and OXYLABS_PASSWORD, the same login Oxylabs page reading already uses. See Live data
router.live_data("amazon_search", {"query": "standing desk"}, provider="oxylabs")

More features

  • Product data straight from online stores that publish a shopping interface for AI agents, at no cost, through the new merchant backend (#318)
  • Cost reports match your bill: free calls report $0, and a spending limit counts what each backend actually charged (#365, #363)
  • One slow backend no longer uses up your whole timeout: each gets at most half the time left, and one that keeps timing out is skipped for 30 seconds (#364)
  • Grade evaluations and benchmarks on the model you choose, including any model LiteLLM reaches (#361)

🐛 Fixes

  • plan() and run() find the URL in your prompt even next to curly quotes, Chinese or Japanese punctuation, markdown, or an uppercase HTTPS:// (#316, #376)
  • Fewer false errors: a search whose results hold a rare line-break character, a You.com search with no hits, and a retried page read now return results, in the order you asked (#353, #393, #354, #380)
  • No double billing on dead pages: a page Exa found gone is no longer fetched and billed again on every other backend (#377)
  • you-mcp refuses a domain filter it cannot honor, so auto moves to a backend that can (#394)
  • A backend that sent a malformed retry hint is no longer skipped for the rest of the run (#404)
  • Browser errors no longer include your session's connection URL (#395)
  • The MCP server no longer garbles results when WEB_ROUTER_MCP_MAX_CHARS is 0 or negative (#378)
  • The missing-key hint now reads a .env file saved by Windows PowerShell 5 (#379)
  • Eight data APIs that failed on their own examples now answer, among them Eurostat and OSV (#321)
  • Vendor modes picked by a router: a mode that times out now tries the backend's next mode, and spending limits hold in more cases (#357, #356)

🔄 Behaviour Change

  • Vendor data names become data API names: the other vendor methods (such as vendor_request(), now data_api_request()), the MCP tools and WEB_ROUTER_ALLOW_VENDOR_WRITES take the new name too. The old names still work, with a deprecation warning, until a later release
  • cheapest_first is deprecated: use PreferredRouter("cheap"). It still works this release and is removed in the next (#417)
  • Oxylabs live data class: OxylabsLiveDataProvider moved to web_router.providers.oxylabs_live_data_any, and the Web API class is now OxylabsWebApiLiveDataProvider. Code that imported the old class needs the new import

🛠️ For contributors

  • No more changelog conflicts: add your entry as one small file in changelog.d/ instead of editing CHANGELOG.md. See changelog.d/README.md (#407)
  • Clear merge rules: how pull requests are merged, and when auto-merge is used, is now in CONTRIBUTING.md (#405)
  • Fewer random CI failures: four flaky tests fixed (#400, #362, #359, #358)

🙌 New Contributors

Thank you to the ten people who made their first contribution to WebRouter in this release.

Full Changelog: v0.14.0...v0.15.0