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.
1
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.
2
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.
3
Release a browser
When you’re done with a browser, release it back to the pool. This step is important; otherwise, the browser will continue to be in an
acquired state until it times out.Failing to release browsers may result in unexpected latency when acquiring future browsers.
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. A profile attached to a pool is loaded read-only: pooled browsers never persist changes back to the profile, sosave_changes does not apply to pools (it is silently ignored if sent). To capture profile state, use a single browser session with save_changes instead — see Profiles.
When a pool has a profile attached, refresh_on_profile_update is automatically enabled — the pool flushes idle browsers whenever the profile’s contents are updated, so it always picks up the latest profile data. See Refresh on profile update below.
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, existing idle browsers keep their current configuration and only newly created browsers use the new one. Passdiscard_all_idle: true to discard all idle browsers and rebuild them immediately 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), updating a pool leaves existing idle browsers untouched — they keep their original configuration, and only browsers created after the update use the new configuration. Set discard_all_idle: true to discard all idle browsers and rebuild them immediately with the new configuration.
Refresh on profile update
When a pool is configured with a profile, the profile data is loaded into each browser when it’s created. Normally, updating the profile’s contents (for example, re-saving cookies or auth state to the same profile) does not propagate to already-warmed browsers — only newly-filled browsers use the updated profile.refresh_on_profile_update is automatically set to true when a pool is created with a profile, or when an existing pool’s profile is changed. This ensures that acquired browsers always get the latest profile data without manual intervention. You can explicitly set it to false to opt out.
When a pool’s profile is removed (by passing { "id": "" }), refresh_on_profile_update is forced to false.
refresh_on_profile_update requires a profile to be set on the pool. Setting it explicitly to true on a pool without a profile returns a validation error. When created without a profile, it defaults to false.How it works
When a profile is saved (for example, after a successful Managed Auth login or asave_changes browser session), Kernel checks whether any browser pools use that profile with refresh_on_profile_update enabled. If so, all idle browsers in each matching pool are flushed — they are replaced with fresh browsers that load the updated profile. Acquired browsers are not affected; they continue running with the profile data they were created with.
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.