Skip to main content

Install

Python 3.9+ required. Depends only on httpx.

Configuration

Running tasks

The sync-feeling happy path: submit + poll in one call.
run() blocks until the task terminates. If you’d rather drive the poll loop yourself (for progress UI, concurrent submission, etc.):

All task options

Sessions / follow-ups

Fetch every turn in a session:

Design extraction

Pull a site’s images, fonts, colors, icons, design tokens, and logo as structured data. See Design extraction for what each extractor returns.
run() submits + polls until the extraction terminates (typically 5–15 seconds). For manual control:

Options

enable_ip_rotation defaults to False. Set it to True to route the extraction through the residential proxy/IP rotation pool. task.design is the raw JSON the server returns — see the response schema. Asset URLs are signed S3 links valid for 7 days; re-submit the task to refresh.

End-user credentials

Python uses snake_case keyword arguments; the SDK maps them to the API’s camelCase field names on the wire.

API key management

Create and revoke API keys in the dashboard under Settings → API Keys. Key lifecycle is dashboard-only by design — so a leaked key can’t mint more.

Exceptions

  • TaskFailed and TaskTimeout both extend StablebrowseError and carry the (failed / in-progress) Task record on .task.
  • StablebrowseError for everything else — catch this for a blanket handler.

Typed results

Every response model is a lightweight @dataclass with typed fields. Unknown fields from the server are preserved on .raw so a server-side addition doesn’t break your client:

Version pinning

The SDK follows semver:
  • 0.x.y — API may change on minor bumps. Pin conservatively while we stabilize.
  • 1.x.y — breaking changes only on major bumps (post-1.0).

Source

Package source lives on PyPI. The full client is a thin wrapper over the HTTP API — if you hit a bug or want a feature, reach out at team@stablebrowse.ai.