CloudflareWaitingRoom
Get through a Cloudflare Waiting Room queue page and receive the cookies that admit you to the origin.
A Cloudflare Waiting Room is a queue, not an anti-bot check. When a site expects more traffic than it wants to serve at once, Cloudflare holds visitors on a queue page and admits them in turn. The page says something like "You are now in line" and refreshes itself while it waits.
This task works through that page and returns the cookies that admit you to the origin.
It is a queue, so it takes queue time
This is the one Cloudflare task whose duration is set by the site rather than by the solve. If the operator has configured a twenty-minute queue, the wait is twenty minutes, and nothing in the request changes that. Size your own timeouts accordingly, and do not treat a long-running task here as a stuck one.
It also means retrying aggressively is counter-productive: each new attempt starts a new position in line.
htmlPageBase64
Required, and it must be the queue page you are currently being held on. The page carries the queue state the solve has to answer against, so a capture from an earlier visit describes a position that no longer exists.
const html = new XMLSerializer().serializeToString(document);
const htmlPageBase64 = btoa(unescape(encodeURIComponent(html)));If you are fetching rather than driving a browser, base64-encode the response body of the request that returned the queue page.
websiteKey and userAgent
The queue page renders a Turnstile widget; websiteKey is its data-sitekey, read from that page.
userAgent must be the agent you will use afterwards. Admission is bound to the client that queued, in the same way clearance is, so a mismatch puts you back outside.
Same exit, start to finish
Use a static or sticky proxy, and keep it for the requests you make after admission. A queue position earned on one address is not transferable to another.
Using the result
Admission rides on solution.cookies, which carries a cf_clearance cookie. Attach it to your subsequent requests along with the same user agent, exactly as with CloudflareChallengeCookie. solution.token is present only when the queue page issued a Turnstile token as well, so read the cookies and treat the token as a bonus.
Not the same as a challenge page
If the page says "Just a moment…" rather than describing a queue, it is a challenge and not a waiting room. Use
CloudflareChallengeCookie instead.
Supported Providers
| Provider | Price per 1,000 | Routing |
|---|---|---|
| $1.30 |
Request Schema
| Field | Type | Required | Description |
|---|---|---|---|
clientKey* | string | Yes | Your API key. Create one in the AnySolver dashboard. Example: |
task* | object | Yes | The task body. Required fields depend on the task type. See Tasks for per-task schemas. View task properties |
settings | object | No | Per-request settings for routing, auto retry, auto fallback, and proxy behavior. See Routing Strategies. View settings reference |
Task Object Properties
The task field accepts an object with the following properties:
| Field | Type | Required | Description |
|---|---|---|---|
type* | Yes | ||
websiteURL* | URL | Yes | Full URL of the page where the CAPTCHA is displayed. Example: |
websiteKey* | string | Yes | Site key of the Turnstile widget rendered on the waiting-room page. Example: |
proxy* | string | object | Yes | |
userAgent* | string | Yes | Browser User-Agent string. Must match the browser used on the target page. Not all providers properly support this parameter. Verify the compatibility with the provider you are using. Example: |
htmlPageBase64* | string | Yes | The waiting-room page you were served, base64-encoded. It carries the queue state the solve has to answer against, so capture it from the response you are holding rather than reusing an older one. Example: |
Optional fields are not guaranteed across providers
Response Schema
| Field | Type | Required | Description |
|---|---|---|---|
status* | Yes | Task status: "processing", "ready", or "failed". Example: | |
errorId* | Yes | 0 = success, 1 = external error, 2 = internal error. Example: | |
taskId | string | No | Unique identifier returned when the task was created. Example: |
errorCode | No | Machine-readable error code. Example: | |
errorDescription | string | No | Human-readable error message with resolution hints. Example: |
cost | number | No | Actual cost charged for this task in USD. Example: |
taskType | No | The type of CAPTCHA task to solve. Example: | |
provider | No | Provider that handled this task. While processing, the provider currently solving it. Example: | |
solution | object | No |
Solution Object Properties
The solution field contains an object with the following properties:
| Field | Type | Required | Description |
|---|---|---|---|
cookies* | Record<string, unknown> | Yes | Session cookies granted on leaving the queue, including cf_clearance, to replay on the target. Example: |
raw* | Record<string, unknown> | Yes | Raw provider response data for advanced use cases. |
token | string | No | Turnstile token, when the queue page issued one. Admission itself rides on the cookies. Example: |
userAgent | string | No | User-Agent string used during solving (if applicable). Example: |