Python SDK
pip install webx-sdkZero dependencies — stdlib urllib only. Works in sandboxes, lambdas, and anywhere you can’t install heavy clients. Import as webx_sdk:
from webx_sdk import WebX
wx = WebX("http://localhost:8080") # api_key="webx_..." if the server requires oneScrape
Section titled “Scrape”doc = wx.scrape("https://example.com")print(doc["data"]["markdown"])
# render + act on JS pagesdoc = wx.scrape("https://spa.example.com", render=True, actions="click:.accept | scroll | screenshot", formats=["markdown", "a11y"])Search
Section titled “Search”res = wx.search("go generics tutorial", limit=5)Crawl (async job — polls until done)
Section titled “Crawl (async job — polls until done)”job = wx.crawl("https://docs.example.com", goal="authentication docs", limit=20, semantic=True)for page in job.data: print(page["url"])Extraction — deterministic CSS or LLM schema
Section titled “Extraction — deterministic CSS or LLM schema”data = wx.extract("https://shop.example.com/p/1", css={"title": "h1", "price": ".price"})Tenancy (admin key)
Section titled “Tenancy (admin key)”key = wx.create_key("agent-1", rpm=120, monthly_units=5000)print(key["key"]) # webx_... — shown onceprint(wx.usage(days=7))
wx.schedule("nightly docs crawl", "0 3 * * *", "crawl", {"url": "https://docs.example.com", "limit": 50}, webhook_url="https://me.example/hook")Errors
Section titled “Errors”Raise WebXError with .status, .code (payment_required, quota_exceeded, concurrency_limit, …), and .payment metadata for 402-gated targets — upgrade paths are data, not dead ends.
Source: sdk/python/ — PyPI: webx-sdk.