Task type
Cloudflare Clearance (cf_clearance) solver API
Cloudflare Clearance is the full-page “Just a moment…” check Cloudflare puts in front of a site, and passing it sets the cf_clearance cookie that lets your requests through. VoidCaptcha solves it through your proxy and returns that cf_clearance cookie, plus __cf_bm, the other cookies the site set, and the exact User-Agent and client hints it was earned with, at $1.20 per 1,000 successful solves.
This is the full-page "Checking your browser" interstitial rather than the widget, and it yields a cf_clearance cookie instead of a token. The cookie is not a password: Cloudflare binds it to the exit IP that earned it and re-checks the browser identity on every request carrying it, so it only works when you replay it from the same proxy with the same User-Agent and client hints. All of those come back in the response. A proxy is required and cannot be omitted — there is no proxyless variant, because a cookie minted from our address would be useless to you.
A Turnstile widget inside a form, not a full-page check? That is a different task type: Cloudflare Turnstile.
Tip
task.type as CFClearance and the solution arrives in solution.cf_clearance, with solution.user_agent and solution.sec_ch_ua and solution.sec_ch_ua_platform and solution.cf_bm and solution.cookies beside it.Before you integrate
- Use a sticky proxy, and keep using it. The cookie is bound to the exit IP that earned it, so a rotating or per-request proxy breaks it between the solve and your next call — pin one session for the cookie’s lifetime.
- Replay the whole identity, not just the cookie. Send the returned user_agent, sec_ch_ua and sec_ch_ua_platform exactly as given; a 403 means the IP, the User-Agent or the hints did not match. Only the Chrome 154 / Windows profile exists, so omit user_agent or send the one you get back.
A site that will not solve is worth telling us about — coverage is per target as much as per type. The quickest route is Telegram (@VoidCaptchaSupport), where someone usually answers within minutes. You can also open a ticket from your dashboard or email [email protected]. Send the URL and the site key either way.
Solve request#
Solving Cloudflare Clearance is a single synchronous call. You post one task object and the response carries the finished solution — no task id to store, nothing to poll for.
The connection is held open for the whole solve, which for this type runs a median of 16s. Set a client timeout that covers it — the default socket timeout in most HTTP libraries is shorter than the work. If holding a connection that long does not suit your worker fleet, the same task goes to /v1/createTask and you collect it from /v1/checkTask instead.
When to use it#
- Restoring a crawl that has hit a managed challenge
- Availability monitoring behind an interstitial
- Archiving public pages that gate on a browser check
Task object structure#
These fields go inside task. The envelope around it — clientKey and the optional softId — is the same for every type and is described in the API reference.
| Property | Type | Required | Description |
|---|---|---|---|
type | string | Required | Literal "CFClearance". Matching is case-insensitive. |
url | string | Required | The URL showing the interstitial.e.g. https://example.com/ |
proxy | string | Required | Required, and it must be sticky — the cookie is bound to this exit IP and you have to keep using it afterwards.e.g. proxy.example.com:9090:user:pass |
user_agent | string | Optional | Optional. Omit it and you get the Chrome 154 / Windows profile back in the response. Only that profile is available, so any other value is refused.e.g. Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 … |
timeout | number | Optional | Milliseconds to wait for the interstitial to clear. Default 90000, capped at 180000.e.g. 90000 |
Example payload#
The whole body, assembled from the table above — copy it formatted to read, or on one line to paste straight into a terminal or a REST client. The values are placeholders: swap the key for your own and the URL and site key for the page you are solving.
https://api.voidcaptcha.com/v1/getResult{
"clientKey": "void_a1b2c3d4e5f60718293a4b5c6d7e8f90",
"task": {
"type": "CFClearance",
"url": "https://example.com/",
"proxy": "proxy.example.com:9090:user:pass"
}
}Example request#
The smallest thing that gets a token back, in your language. Python and Node.js use the official client (pip install voidcaptcha, npm install voidcaptcha); every other language makes the HTTP call its standard library already has. The complete version, with the key read from the environment and the error envelope checked, is in Sample code at the bottom of this page.
Language choice is remembered across the whole site, so switching here carries to every other sample in the docs.
# pip install voidcaptcha
from voidcaptcha import VoidCaptcha
client = VoidCaptcha("void_a1b2c3d4e5f60718293a4b5c6d7e8f90")
result = client.cf_clearance(
url="https://example.com/",
proxy="proxy.example.com:9090:user:pass",
)
print(result.value)Example response#
A successful solve returns errorId: 0 and a solution object. The result is in solution.cf_clearance; alongside it is the userAgent the solve ran under.
solution carries those and nothing else — the gateway copies the result field, anything extra this type returns, and userAgent across, and drops the rest of whatever the solver sent. Timing arrives at the top level as elapsedMs, present only when the duration is known, beside cost and your remaining balance. The figures below are illustrative: nothing here is a published median.
This type also returns solution.user_agent. The exact User-Agent the cookie was earned with. Send this verbatim on every request carrying the cookie; the response also repeats it as userAgent.
This type also returns solution.sec_ch_ua. The sec-ch-ua client hint that went with the solve. Cloudflare checks the hints against the User-Agent, so sending one without the others is worse than sending neither.
This type also returns solution.sec_ch_ua_platform. The sec-ch-ua-platform hint for the same identity. The solve is a Windows profile end to end.
This type also returns solution.cf_bm. The __cf_bm Bot Management cookie the site set during the solve. Some sites check it as well as, or instead of, cf_clearance; send it with the other cookies.
This type also returns solution.cookies. Every cookie the site set during the solve, name to value, cf_clearance and __cf_bm included. The simplest thing to replay is all of them.
{
"errorId": 0,
"status": "ready",
"solution": {
"cf_clearance": "9pQzR2.LmXv1…",
"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/154.0.0.0 Safari/537.36",
"sec_ch_ua": ""Chromium";v="154", "Not=A?Brand";v="24", "Google Chrome";v="154"",
"sec_ch_ua_platform": ""Windows"",
"cf_bm": "…",
"cookies": { "cf_clearance": "…", "__cf_bm": "…" },
"userAgent": "Mozilla/5.0 …"
},
"cost": "$0.0012",
"balance": "$411.24",
"elapsedMs": 4820
}Send that userAgent on your downstream request as well — for the cookie-based types the result is bound to it and will be rejected under a different one.
Errors for this type#
The codes Cloudflare Clearance can return, on top of the shared authentication and billing set. Branch on errorCode, not on the HTTP status.
| Code | HTTP | Meaning | Retry |
|---|---|---|---|
ERROR_KEY_MISSING | 401 | No clientKey was supplied. | Do not retry |
ERROR_KEY_INVALID | 401 | The key does not exist or has been revoked. | Do not retry |
ERROR_KEY_SUSPENDED | 403 | The account attached to this key is suspended. | Do not retry |
ERROR_TYPE_NOT_ENABLED | 403 | This account is not enabled for the requested task type. | Do not retry |
ERROR_PROXY_FORMAT | 400 | The proxy string could not be parsed. | Do not retry |
ERROR_CAPTCHA_UNSOLVABLE | 200 | The challenge was served but could not be completed. | Retry |
ERROR_TIMEOUT | 200 | The solve exceeded the maximum time for this type. | Retry with backoff |
ERROR_INSUFFICIENT_BALANCE | 402 | Your balance will not cover this solve. | Do not retry |
ERROR_THREAD_LIMIT | 429 | You have more solves in flight than your key permits. | Retry with backoff |
ERROR_RATE_LIMITED | 429 | Too many requests in a short window. | Retry with backoff |
Every code, with the fix for each, is on the error reference. A failed solve is never charged.
Sample code#
A complete file: key from the environment, task built, error envelope checked, result used. It calls the endpoint directly rather than through an SDK, so it works as a starting point in any language.
import os
import sys
import requests
API = "https://api.voidcaptcha.com/v1/getResult"
payload = {
"clientKey": os.environ["VOIDCAPTCHA_KEY"],
"task": {
"type": "CFClearance",
"url": "https://example.com/",
"proxy": "proxy.example.com:9090:user:pass"
},
}
# The endpoint is synchronous: it holds the connection open for the whole
# solve, so the read timeout has to cover it, not just the handshake.
res = requests.post(API, json=payload, timeout=180).json()
if res["errorId"] != 0:
sys.exit(f"{res['errorCode']}: {res['errorDescription']}")
solution = res["solution"]
# Carry the User-Agent downstream — the result was earned under it.
print(solution["cf_clearance"])
print(solution["userAgent"])Questions#
What is the cf_clearance cookie?
It is the cookie Cloudflare sets after a browser passes its challenge page. Cloudflare checks it on every later request, together with the IP address and the browser identity that earned it.
Can I use cf_clearance from a different IP or User-Agent?
No. The cookie is bound to the exit IP that earned it, and Cloudflare re-checks the User-Agent and client hints on every request. Replay it through the same sticky proxy you sent with the task, with the user_agent, sec_ch_ua and sec_ch_ua_platform from the response.
Does the response include __cf_bm?
Yes. solution.cf_bm carries the __cf_bm cookie and solution.cookies carries every cookie the site set during the solve, for sites that check more than cf_clearance.
Do I need my own proxy?
Yes, for every solve. A cookie earned from our IP address would be refused from yours, so there is no proxyless variant.
Is this the same as Cloudflare Turnstile?
No. Cloudflare Turnstile is a widget inside a form and returns a token. Cloudflare Clearance is the full-page check in front of the whole site and returns a cookie. Each has its own task type.
How much does a cf_clearance cookie cost?
$1.20 per 1,000 successful solves. A failed solve is never charged.
Last updated on 2 August 2026