Skip to main content

Installation

Sync & Async

Both LobstrClient and AsyncLobstrClient with identical API surfaces.

Typed Models

Dataclass models for every response — no raw dicts in the public API.

Auto-Pagination

Lazy PageIterator streams all pages on demand with .iter() method.

Automatic Auth

Token resolved from explicit param, LOBSTR_TOKEN env, or ~/.config/lobstr/config.toml.

Authentication

The SDK resolves your API token in this order:
  1. Explicit parameterLobstrClient(token="your_token")
  2. Environment variableLOBSTR_TOKEN=your_token
  3. CLI config file~/.config/lobstr/config.toml (written by the lobstr CLI on login)
If LOBSTR_TOKEN is not set, the SDK silently falls back to the CLI config file — which may belong to a different account. There is no warning when the env var is absent. Always set LOBSTR_TOKEN explicitly in production environments.

Quick Start

API Reference

User

Balance.available is your plan’s total allotment, not credits remaining. Remaining credits = available − consumed. Example: Balance(available=100, consumed=64) means 36 credits left.

Crawlers

Squids

Tasks

Runs

Results

Accounts

Delivery