Skip to main content
A session is a running browser, and it holds one concurrency slot until it stops. A one-time profile discards its state then; a persistent profile saves the state you select for later sessions.

One-time profiles

One request creates and starts the browser. Use a one-time profile when each task can begin fresh:
Set the environment variables as shown in the Quickstart. If you omit proxy, the browser uses an available account pool. Supply your own proxy if your account has none. The response has ws_url and internal_uuid. Connect to ws_url, then use internal_uuid to stop the session. Everything the browser stored is discarded with it.

Persistent profiles

Create a profile once:
Save data.uuid from the response and use it to start the profile:
Creation does not start a browser. Each start restores saved profile state. Settings supplied to /start apply to the running session. To change the stored settings, update the profile while it is stopped. A persistent profile runs one browser at a time. Starting it again returns the running session and ignores the settings sent with that request, so stop the session first when a run needs different ones. Use a separate profile for work that runs in parallel.

What gets saved

storage_options selects the data saved with the profile: Enable the storage your application uses. Cookies alone may not preserve a login that also depends on local storage. See Cookies. Tabs open at stop are saved with the profile. The next start reopens the most recent ones, never more than the page limit; the rest are forgotten.

Reuse a login

Sign in once in a persistent profile with the storage the site needs, through your automation or the session’s DevTools. Stop the session and wait for the response: that is what saves the state for the next start. The site can still expire its own session, and the exit IP can differ on the next run. Use session control when the IP has to stay the same.

Change the proxy

Change the proxy when the stored one stops working, which happens with residential and mobile peers, or when a run needs a different location. Replace the saved value for future runs, or override it for a single session. Change the stored proxy. Update the profile while it is stopped; the next start uses the new value.
When you save a pool selection, the profile stores one proxy from that pool and reuses it on every run. The exit IP behind a residential or mobile proxy still changes between sessions; use session control when the IP must stay the same. Saving the same selection again selects a different proxy. Surfsky does not re-check a stored pool proxy at startup, so save the selection again if it stops working. Send a URL to store your own proxy, or null to remove the stored proxy and let later starts select from an available account pool:
Edit a stopped profile. A running profile returns profile_is_running; see errors. Override for one session. Send the same proxy field in the start request instead. It applies to that browser only and leaves the stored proxy unchanged. A proxy URL, open_vpn, or wireguard also overrides the stored proxy for that run. A shared-tier override needs a country, for example {"proxy": {"tier": "shared", "country": "de"}}. Without a country, a shared request leaves the stored proxy in place. Read the profile with GET /profiles/{profile_uuid} to see its current connection. A site that tied its session to the previous IP or country can ask for verification again, so keep the country stable unless the account is meant to move. See proxies for targeting and session options.

Identifiers

Always use the identifier returned for the operation. Do not depend on profile and session identifiers being different, or on a persistent profile receiving a new identifier on every start.

How a session ends

Explicit stop. For persistent profiles, a normal stop saves the selected browser state. Wait for completion before starting the next run.
Inactivity. The browser stops after browser_settings.inactive_kill_timeout seconds without a CDP command, ChromeDriver request, or scrape. The default is 30 seconds; an open but idle connection does not count.
Set a longer timeout for work that includes pauses, such as manual input. An abandoned browser then also runs longer.
Failure. A browser or infrastructure failure can end the session before a normal stop completes. Recent unsaved state may be lost. Check active sessions before reconnecting or starting replacement work.

Billing

There are two kinds of plan. On an on-demand plan you pay for the time your browsers run, at the plan’s browser-hour rate, and the money comes out of your balance. PAYG is on-demand with nothing included. Starter, Base and Advanced are on-demand as well: their monthly fee is added to the balance as credit, which is spent before your top-ups and expires at renewal. A reserved plan is a fixed monthly price for a set number of browsers, and browser time is not counted at all. Rates are on the pricing page. Browser time is counted per session, from the moment the browser is ready until it stops, and rounded up to a whole minute: a 20-second session is billed as one minute, a 90-second one as two. The time a browser sits idle before inactive_kill_timeout stops it is part of the session, so stop it yourself when the work is done. A Scraping API request is counted the same way, in 10-second steps. Premium proxy traffic and paid CAPTCHA solves are charged separately on every plan. Traffic is charged per GB. A solve returns what it was charged in usage.cost_usd, and a scrape returns its CAPTCHA total in challenge.cost; Charges lists which solves are paid. In the dashboard, Sessions lists the newest 1,000 sessions with their duration and browser-time cost, and Billing keeps the history of all charges, traffic and CAPTCHA included. The API returns the same numbers: GET /billing/usage for totals over the last 24 hours to 90 days, GET /billing/sessions for each session, and GET /billing/balance for what is left.

Finding what is running

data lists the running sessions. Use one_time to identify disposable ones; do not infer the profile type from whether an identifier is present. This lists running browsers only. GET /profiles lists saved profiles page by page, each with a status of started or stopped. Stop sessions owned by completed or failed jobs. Age alone does not prove that a session is abandoned.
POST /profiles/stop stops every running browser on the account, including browsers used by other workers. Its response reports stopped and failed separately.

Browser capacity

A failed or interrupted start request can have an uncertain outcome, so check for an existing session before retrying it.