Proxy and Session Binding
When a request succeeds using Scrapingbypass API V2, the proxy IP and the session partition (x-cb-part) are bound together for 10 minutes. This mechanism "locks" the session state to that specific IP to ensure stable bypass performance.
- Session Refresh: Every successful request resets the 10-minute timer.
- Proxy Consistency: You cannot change the proxy IP within an active session unless you switch the session partition.
- Mandatory Synchronization: If your logic rotates the proxy IP, you must rotate the
x-cb-partvalue simultaneously.
x-cb-part Configurations
The header x-cb-part determines how session cookies are stored and managed:
| Configuration | Storage Location | Behavior |
|---|---|---|
Set x-cb-part | Server-side | Cookies are stored on the server. The proxy IP acts as the access key. Matching the proxy and partition avoids re-validation. |
Unset x-cb-part | Client-side | Cookies are encrypted and returned to the client. The client is responsible for maintaining and sending cookies in subsequent requests. |
Advanced Session Control
- Partition Range: Valid values for
x-cb-partrange from0to999(1,000 total partitions). - Forcing Proxy Changes: If you need to exceed 1,000 concurrent sessions or rotate proxies within an active partition, use the header
x-cb-options: Force.- Note: Using
Forceallows unmatching proxies to access a partition but may trigger re-validation (JS challenges).
- Note: Using
- Cookie Handling: V2 does not return Cloudflare-specific cookies (such as
cf_clearance) to the client. All challenge resolution is handled internally by the Scrapingbypass API engine.
Implementation Best Practices
- Maintain State: To minimize credit consumption and latency, reuse the same proxy and
x-cb-partfor the duration of your task. - Immediate Rotation: If an immediate proxy change is required before the 10-minute window expires, switch to a different
x-cb-partvalue. - Concurrency: Distribute high-concurrency tasks across different partitions to avoid session interference.