Browser pools let you maintain a set of reserved, identical browsers ready for immediate use. Use them to set your preferred browser configuration in advance, allowing you to minimize browser start-up latency and scale your workloads in production.Documentation Index
Fetch the complete documentation index at: https://tbd-6fc993ce-hypeship-document-pool-profile-update-behavior.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
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 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.