Session Management
Reusing Sessions
To optimize your costs, consider reusing browser sessions since there is a one-minute minimum billing period for each session creation. For short tasks, reusing sessions helps avoid multiple minimum charges. For longer workflows, you can disconnect and reconnect to the same session as needed, maintaining efficiency while managing resource usage. To reuse a session:- Store the session ID from your initial session creation
-
Use the
sessionId
query parameter when connecting to specify the existing session - Continue using the same session for similar workloads
Proxy Optimization
Proxy usage can impacts costs. Implement these strategies to minimize proxy-related expenses:Selective Proxy Usage
Proxies are a powerful tool if you need to access geo-restricted content, have load balancing requirements, or need anonymity, but if those aren’t necessary, avoiding proxies will save on costs. You can also implement domain-specific proxy routing. For more information, see Proxy Configuration.Image Loading Optimization
When using proxies, control image loading to reduce bandwidth costs. Ensure images are disabled for non-visual automation:- Node.js
- Python