startUrl to open pages at launch, connect with Playwright or Puppeteer to work with them, and stop the session when the job is complete. You can also omit startUrl and navigate after connecting.
Before You Start
Create or copy a Client API key from API keys, then set local environment variables.1. Create a Session
Every request field is optional. The smallest request,{}, uses a coherent Linux fingerprint, a residential proxy with sticky rotation, a 600-second timeout, and keepAlive: false. This example adds startUrl to open one page when the browser launches:
startUrl is a single string. Separate multiple URLs with commas without spaces; JSON arrays are not accepted. Each URL must be an absolute HTTP or HTTPS URL. The complete string, including commas, can contain up to 2,048 characters. Percent-encode commas inside an individual URL as %2C.
Send startUrl only when omitting settings.id. When reusing saved settings, omit startUrl and use your automation client to navigate if needed.
The response contains:
id: the browser session IDconnectUrl: a signed WebSocket URL for the active sessionsettings.id: an opaque ID for restoring saved identity and browser stateruntime: the effective timeout and reconnect behavior- lifecycle timestamps including
expiresAt
connectUrl as FLOPPY_CONNECT_URL in the process environment. Keep it out of source control and shell history.
2. Connect and Use the Opened Tabs
Choose either Playwright or Puppeteer below. Both examples use thehttps://example.com/ tab opened by either request in step 1. They select the tab by URL and wait for its heading before reading the title. A successful create response does not guarantee that page content has finished loading.
For other sites, match the destination URL if the page redirects, and wait for the content your task needs. With multiple start URLs, select each tab by its URL rather than relying on tab order.
Playwright
Puppeteer
page.goto('https://example.org/') before disconnecting. If you created the session without startUrl, create a tab with context.newPage() in Playwright or browser.newPage() in Puppeteer, then call page.goto() with your target URL.
The relay permits one active connection per session. Its heartbeat is handled by Floppydata; your client does not need to send a custom keepalive command.
3. Stop the Session
Explicitly stop the session after the job. The operation is idempotent and synchronizes saved browser state.keepAlive: false, closing the relay also stops the session. With keepAlive: true, disconnecting releases the connection so you can reconnect until expiresAt; call stop when the job is finished.
Customize a New Browser
Send only the groups you need. This example sets viewport and fingerprint preferences, targets a US residential proxy, extends the runtime, opens two pages at launch, and attaches caller-owned metadata.
For interval rotation, use
mode: "interval" with intervalMinutes set to 5, 10, 15, 20, or 60. Use mode: "perRequest" for a new proxy IP per request, or mode: "sticky" with an optional caller-defined stickyKey.
Import Cookies Before Launch
Cookie values are write-only. Import at most 100 cookies and provide exactly one ofurl or domain for each item.
merge. Use replace only when you intend to clear the saved cookies first. Never put real cookie values in documentation, logs, or support messages.
Reuse Saved Settings
Reusesettings.id to restore the same saved identity and browser state.
settings.id with browser, proxy, or startUrl. Use your automation client to navigate after connecting to the new session. You can still send cookies, runtime options, and metadata. One active session can use a settings ID at a time.
Each account can keep up to 20 saved settings. Session history includes settings.id, so you can recover an ID without a separate settings-list endpoint.
Inspect Sessions and Reconnect
Get one session to check its state and receive a freshly signedconnectUrl while it is active.
nextCursor back unchanged to load the next page. Session states are running, stopped, timedOut, and failed.
Open a Live View
Close any active Playwright or Puppeteer connection first, then request a fresh live-view URL.liveViewUrl in a browser. Treat it as a temporary secret and do not log or share it.
Delete Saved Settings
Stop any active session first, then delete the settings.204 when deletion succeeds. It returns settings_in_use instead of silently stopping an active session.
Errors and Recovery
Operational Limits
- Incoming WebSocket messages are limited to approximately 1 MiB. Very large CDP payloads, such as full-page screenshots or screencast frames, can close the relay.
- A Worker deployment can drop a live relay. With
keepAlive: true, get the session again and reconnect with the freshconnectUrlbeforeexpiresAt. - A signed connection URL admits one active relay and expires with its session.
Create a Session
Inspect every request field and response property.
List Sessions
Filter history and paginate with an opaque cursor.
API Conventions
Review authentication, errors, and WebSocket behavior.