Proxy Requirements
There is a fundamental difference in how proxies are handled between the two versions of Scrapingbypass API.
- V1 API (Stateless/Optional Proxy):
- Designed for stateless requests.
- If no proxy is provided via the
X-Cb-Proxyheader, the system utilizes a default dynamic proxy pool. - Suitable for simple scraping tasks where session consistency is not required.
- V2 API (Stateful/Mandatory Proxy):
- Mandatory Requirement: You must provide a static or time-limited (sticky) proxy via the
X-Cb-Proxyheader. - Logic: V2 relies on maintaining a consistent IP address to successfully solve and reuse Cloudflare JS challenges. The V2 engine will not function without a user-defined proxy.
- Mandatory Requirement: You must provide a static or time-limited (sticky) proxy via the
Automatic Session Management (V2 Only)
The V2 engine is optimized for high-success rate bypasses through automated session hosting:
- Initial Challenge: When a request encounters a Cloudflare JS challenge, Scrapingbypass API automatically executes the challenge logic.
- Session Creation: Upon success, the system stores the Cloudflare session (including cookies and clearance tokens) for 10 minutes.
- Automatic Reuse: Subsequent requests using the same proxy and parameters will automatically inherit this session, bypassing the WAF without re-triggering challenges.
- Session Extension: Every successful request within the active window automatically extends the 10-minute expiration timer.
Session Isolation with X-Cb-Part
To manage multiple concurrent sessions or separate user contexts, use the X-Cb-Part parameter:
- Function: Acts as a namespace for your sessions.
- Isolation: Requests with different
X-Cb-Partvalues are treated as independent environments, even if they use the same proxy. - Usage: Set
X-Cb-Part="0",X-Cb-Part="1", etc., to isolate cookie jars and clearance states across different tasks.
Configuration Summary
| Feature | V1 API | V2 API |
|---|---|---|
| Proxy Requirement | Optional (Defaults to internal pool) | Mandatory (Static or Sticky ISP) |
| Header | X-Cb-Proxy | X-Cb-Proxy |
| Statefulness | Stateless | Stateful (10-minute persistence) |
| Challenge Handling | Basic | Advanced (JS Polling/Turnstile) |
| Session Isolation | N/A | Supported via X-Cb-Part |
Warning: V2 Proxy Stability
For V2, ensure your proxy provider supports a "sticky" duration of at least 10 minutes. If the IP rotates during a session, the Cloudflare clearance will immediately invalidate, causing a 403 error.