UNLOCK API
Cloudflare Challenge page

Cloudflare Challenge page

How to send a Cloudflare Challenge page task to UNLOCK API with createTask or in.php: task type names, every parameter, the solution object, proxy fields and code samples in 7 languages.
Price
$0.725 $0.000725 per task
You send
Page URL of the challenge, your user agent and a proxy
You get
A cf_clearance cookie

Overview and price

Task type names

This type always runs through your proxy, so the proxy fields are required.
AntiCloudflareTaskThrough your proxy

Also accepted: CloudflareChallengeTask

Task object

type
StringRequired
Task type name. Matched in any letter case. AntiCloudflareTask
websiteURL
StringRequired
Full address of the page where the CAPTCHA appears, starting with http:// or https://.
userAgent
StringRequired
Browser User-Agent to use while solving. Send the same one when you submit the answer.

Fields not listed here are passed to the solver as sent.

Proxy fields

This type always runs through your proxy, so the proxy fields are required.
proxyType
StringRequired
http, https, socks4 or socks5.
proxyAddress
StringRequired
Proxy IP address or host name.
proxyPort
IntegerRequired
Proxy port.
proxyLogin
StringOptional
Proxy user name, if the proxy needs one.
proxyPassword
StringOptional
Proxy password, if the proxy needs one.
proxy
String
All proxy fields in one string, for example http://user:pass@1.2.3.4:8080.

Using a proxy

Request

POST /createTask
{
  "clientKey": "YOUR_API_KEY",
  "task": {
    "type": "AntiCloudflareTask",
    "websiteURL": "https://example.com/login",
    "userAgent": "Mozilla/5.0 ...",
    "proxyType": "http",
    "proxyAddress": "1.2.3.4",
    "proxyPort": 8080
  }
}

Solution object

Returned in solution when status is ready.
cf_clearance
String
The cf_clearance cookie. Use it with the same User-Agent and proxy.
POST /getTaskResult
{
  "errorId": 0,
  "taskId": 1001,
  "status": "ready",
  "solution": {
    "cf_clearance": "Bi2Gmx0hTtMjhXAH_4WNDHgDTsAbqUqrlXy1q6p..."
  },
  "cost": "0.000725",
  "createTime": 1791640000,
  "endTime": 1791640014,
  "solveCount": 1
}

Code samples

import time, requests

API = "https://unlock-api.com"
KEY = "YOUR_API_KEY"

task = requests.post(f"{API}/createTask", json={
    "clientKey": KEY,
    "task": {
      "type": "AntiCloudflareTask",
      "websiteURL": "https://example.com/login",
      "userAgent": "Mozilla/5.0 ...",
      "proxyType": "http",
      "proxyAddress": "1.2.3.4",
      "proxyPort": 8080
    }
}).json()
if task["errorId"]:
    raise SystemExit(task["errorCode"])

for _ in range(60):   # 60 x 5 s = the 5 minute task limit
    time.sleep(5)
    r = requests.post(f"{API}/getTaskResult", json={"clientKey": KEY, "taskId": task["taskId"]}).json()
    if r["errorId"]:
        raise SystemExit(f"{r['errorCode']}: {r.get('errorDescription', '')}")   # failed tasks are refunded
    if r["status"] == "ready":
        print(r["solution"])
        break
else:
    raise SystemExit("timed out")

in.php form method

This type is available with the JSON methods only.