NeuroCaptcha

CloudflareChallengeTaskProxyless

Parameters, request and response for Cloudflare Challenge without a proxy: the CloudflareChallengeTaskProxyless task type.

On this page

Cloudflare Challenge: the “Just a moment…” page Cloudflare shows before the site. The answer is the cf_clearance cookie that lets you through. The task is solved from our IP addresses — no proxy needed.

Price$1.20 per 1000 tasks ($0.0012 per task), only for solved tasks — pricing
Proxynot needed
Queue in getQueueStats—
Also accepted asCloudflareTaskProxyless

Parameters#

Fields of the task object in createTask:

type
stringrequired
CloudflareChallengeTaskProxyless
websiteURL
stringrequired
Full address of the page with the captcha: http(s), up to 2048 characters, a public site.
userAgent
string
User-Agent to solve with, up to 512 characters. The clearance works only with the User-Agent returned in solution.userAgent.
cookies
string
Cookies of the target site for the solving browser: name=value; name2=value2, up to 8192 characters. Stored encrypted.

Request#

POST /createTask
{
  "clientKey": "YOUR_API_KEY",
  "task": {
    "type": "CloudflareChallengeTaskProxyless",
    "websiteURL": "https://example.com/"
  }
}

Complete example#

Create the task, poll every 2 seconds, print the solution:

import os
import time

import requests

API = "https://neurocaptcha.com"
KEY = os.environ["API_KEY"]


def call(method, payload):
    data = requests.post(f"{API}/{method}", json={"clientKey": KEY, **payload}, timeout=30).json()
    if data.get("errorId"):
        raise RuntimeError(f'{data["errorCode"]}: {data.get("errorDescription", "")}')
    return data


task = {
    "type": "CloudflareChallengeTaskProxyless",
    "websiteURL": "https://example.com/",
}

# 1. create the task: its price is held, not charged
task_id = call("createTask", {"task": task})["taskId"]

# 2. poll every 2 s; a failed task raises with its error code and costs nothing
deadline = time.time() + 300
while time.time() < deadline:
    time.sleep(2)
    result = call("getTaskResult", {"taskId": task_id})
    if result["status"] == "ready":
        print(result["solution"])
        break
else:
    raise TimeoutError("the task was not solved in time")

Response#

getTaskResult once the task is solved:

getTaskResult
{
  "errorId": 0,
  "status": "ready",
  "solution": {
    "token": "Gx1d0e7qXr8…",
    "cookies": {
      "cf_clearance": "Gx1d0e7qXr8…"
    },
    "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36"
  },
  "cost": "0.001200",
  "ip": "198.51.100.7",
  "createTime": 1793370000,
  "endTime": 1793370007,
  "solveCount": 1
}

Tips#

  • The cf_clearance cookie works only from the IP address and with the User-Agent that passed the check: use CloudflareChallengeTask with your own proxy and send requests through it.
  • Send your requests with solution.userAgent and all cookies from solution.cookies.
  • The cookie expires after a while (the site decides how long); create a new task when the challenge comes back.