Skip to main content

Official Python SDK for WebUplink — the whole web, as function calls.

Project description

WebUplink

The whole web, as function calls.

PyPI version CI License: MIT

Official Python SDK for WebUplink.

Installation

pip install webuplink

Quickstart

from webuplink import WebUplink

client = WebUplink()  # reads WEBUPLINK_API_KEY from env

# Browse a page — get back structured, callable tools
page = client.browse("https://example.com")
print(page.summary)
print(page.tools)  # [Tool(name='...', description='...', params=[...]), ...]

# Execute a tool discovered on the page
tool = page.tools[0]
result = client.browse(
    session_id=page.session_id,
    tool=tool.name,
    params={tool.params[0].name: "some value"},
)

# Clean up
client.close_session(page.session_id)

Async

from webuplink import AsyncWebUplink

async with AsyncWebUplink() as client:
    page = await client.browse("https://example.com")
    print(page.tools)

What you can build

  • AI agents that act on the web — browse any site, get back named, callable tool definitions, execute actions
  • No selectors, no scraping — WebUplink understands pages and generates callable tools automatically
  • Multi-step workflows — sessions persist across navigations, so your agent can search → filter → select → checkout
  • Any website, zero configuration — works on sites you've never seen before

Error handling

Every non-2xx response raises a typed WebUplinkError carrying the machine-readable code, HTTP status_code, and request_id (cite it in support tickets):

from webuplink import WebUplink, WebUplinkError

client = WebUplink()

try:
    page = client.browse("https://example.com")
except WebUplinkError as err:
    print(err.code)         # e.g. 'QUOTA_EXCEEDED', 'SITE_BLOCKED'
    print(err.status_code)  # e.g. 429, 502
    print(err.request_id)   # 'req-abc-123'

Transient errors that carry retry_after (e.g. BROWSER_ERROR, AI_PROCESSING_ERROR) are retried automatically for observe-only requests. SITE_BLOCKED — the site served a bot-verification challenge or access-denied page; the request is not billed — carries no retry_after and is never auto-retried. Tool executions are never auto-retried (non-idempotent).

Full error reference at webuplink.ai/docs/errors.

Documentation

Full reference at webuplink.ai/docs.

Contributing

git clone https://github.com/webuplink-dev/webuplink-python.git
cd webuplink-python
pip install -e ".[dev]"
pytest

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

webuplink-0.1.1.tar.gz (16.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

webuplink-0.1.1-py3-none-any.whl (13.4 kB view details)

Uploaded Python 3

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page