How browser pools work
Browser pools are a way to pre-configure a fixed set of browsers without being charged for them until they are used (i.e.acquired). All browsers in the pool share the same settings upon instantiation.
Declare a pool
First, declare a pool of browsers with your specified configuration. The pool takes time to fill (see fill rate per minute), so declare your pool outside your browser automation / agent runtime logic.
Pool declarations should be decoupled from browser runtime logic for the best performance.
Acquire a browser
You can acquire a browser as soon as you’ve created a pool. The request returns immediately if a browser is available, or waits until one becomes available.The total number of browsers is fixed to the
size specified upon browser pool creation. When you acquire a browser, the pool’s available count is decremented by one. When you release a browser, the pool’s available count is incremented by one.Put differently, the pool does not top up when you acquire a browser: browsers are “borrowed” from the pool and must be returned when you’re done with them, either by releasing them or allowing them to timeout.
Create a pool of reserved browsers
Create a browser pool with a specified size and configuration. All browsers in the pool share the same settings.Pool configuration options
Pools can be pre-configured with options like start url, custom extensions, supported viewports, residential proxies, profiles, and more. See the API reference for more details.Acquire a browser
Acquire a browser from the pool. The request returns immediately if a browser is available, or waits until one becomes available. Theacquire_timeout_seconds parameter controls how long to wait; it defaults to the calculated time it would take to fill the pool at the pool’s configured fill rate.
cdp_ws_url for CDP connections and browser_live_view_url for live viewing.
Timeout behavior
Browsers remain in the pool indefinitely until acquired. Once acquired, the pool’stimeout_seconds applies just like a regular browser timeout—if the browser is idle (no CDP or live view connection) for longer than the timeout, it is destroyed and not returned to the pool. The pool will automatically create a replacement browser at the pool’s configured fill rate.
Release a browser
When you’re done with a browser, release it back to the pool. By default, the browser instance is reused. Setreuse: false to destroy it and create a fresh one.
Update a pool
Update the pool configuration. By default, all idle browsers are discarded and rebuilt with the new configuration.The
size parameter is always required when updating a pool, even if you only want to change other settings.discard_all_idle: false to keep existing idle browsers and only apply the new configuration to newly created browsers.
Flush idle browsers
Destroy all idle browsers in the pool. Acquired browsers are not affected. The pool will automatically refill with the pool’s specified configuration.Get pool details
Retrieve the current status and configuration of a pool.List pools
List all browser pools in your organization.Delete a pool
Delete a browser pool and all browsers in it. By default, deletion is blocked if browsers are currently acquired. Useforce: true to terminate acquired browsers and force deletion.
Full example
This example assumes you’ve already created a pool named “my-pool”. In practice, you’d create pools once (via the SDK, CLI, or dashboard) and then acquire from them repeatedly.API reference
For more details on all available endpoints and parameters, see the Browser Pools API reference.Pool sizing calculator
Use the calculator below to estimate a pool size for your workload. It assumesreuse: false on release, so every acquisition ends in destruction and triggers a refill.
How the calculation works
Two constraints have to be satisfied at the same time, so the recommended size is the larger of the two. Concurrency floor. With a peak acquisition rateλ (per minute) and an average acquired duration d (minutes), the number of browsers held simultaneously trends toward λ × d. We multiply by a 1.25× safety factor to keep ~10–20% of the pool available during normal load (see the pool sizing guidance in the FAQ).
fill_rate_per_minute is a percentage of pool size and is capped at 25. With reuse: false, browsers are destroyed at the acquisition rate, so the refill rate must keep up:
d ≈ 3.2 minutes. Below that, the refill ceiling sets the floor; above it, concurrency does.