Cloudflare Challenge

The API can return the solution result as either a token or a cf_clearance cookie. Before getting started, review both options and choose the one that best fits your use case.
IMPORTANT: Some parameter values are dynamic — they change with each render of the page using Cloudflare Challenge. Extract them immediately before creating the task to avoid errors during solving.

Option 1: Challenge (token)

Attention!
Built-in proxies are used by default — their cost is already included in the service. You only need to specify your own proxies in cases where the website does not accept the token or access to the built-in services is restricted.

If you are using a proxy, please use a proxy with username and password authentication.

After solving, you will receive a token to confirm captcha completion.

Request Parameters (Option 1)

ParameterTypeRequiredDescription
type String Required TurnstileTask
websiteURL String Required The URL of the page where the captcha is solved.
websiteKey String Required Turnstile site key.
cloudflareTaskType String Required token
pageAction String Required The action field found in the callback function. If using cloudflareTaskType, action is usually "managed" or "non-interactive".
userAgent String Required Browser User-Agent. Pass only a valid UA from Windows OS.
data String Required The value of the data field, taken from cData.
pageData String Required The value of pageData, taken from chlPageData.
apiJsUrl String Optional String containing the captcha script URL.
proxyType String Optional http - standard http/https proxy;
https - try this if "http" doesn't work;
socks4 - socks4 proxy;
socks5 - socks5 proxy.
proxyAddress String Optional IP address of the proxy (IPv4/IPv6).
proxyPort Integer Optional Proxy port.
proxyLogin String Optional Proxy login.
proxyPassword String Optional Proxy password.

These parameters are in the object passed to window.turnstile.render(el, paramsObj) when creating the captcha. You can retrieve them by executing JavaScript before loading other scripts:

Show parameter extraction code
(function () {
  const obj = {
    render: function () {
      const { action, cData, chlPageData } = arguments[1];
        const params = [
          ["action", action],
          ["data", cData],
          ["pageData", chlPageData],
        ];
        console.table(params)
    }
  };

  Object.defineProperty(window, "turnstile", {
    get: () => {
      return obj;
    },
  });
})();

Create Task - Option 1 (token, without proxy)

POST https://captcha69.com/createTask
Content-Type: application/json

{
  "clientKey": "max1_YOUR_API_KEY",
  "task": {
    "type": "TurnstileTask",
    "websiteURL": "https://example.com",
    "websiteKey": "YOUR_WEBSITE_KEY_HERE",
    "cloudflareTaskType": "token",
    "userAgent": "userAgentPlaceholder",
    "pageAction": "managed",
    "pageData": "HUHDWUHuhuwfiweh32..uh2uhuhyugYUG=",
    "data": "874291f4retD1366"
  }
}

Response

{
  "errorId": 0,
  "taskId": 407533072
}

Create Task - Option 1 (token, with proxy)

POST https://captcha69.com/createTask
Content-Type: application/json

{
  "clientKey": "max1_YOUR_API_KEY",
  "task": {
    "type": "TurnstileTask",
    "websiteURL": "https://example.com",
    "websiteKey": "YOUR_WEBSITE_KEY_HERE",
    "cloudflareTaskType": "token",
    "userAgent": "userAgentPlaceholder",
    "pageAction": "managed",
    "pageData": "HUHDWUHuhuwfiweh32..uh2uhuhyugYUG=",
    "data": "874291f4retD1366",
    "proxyType": "http",
    "proxyAddress": "8.8.8.8",
    "proxyPort": 8080,
    "proxyLogin": "proxyLoginHere",
    "proxyPassword": "proxyPasswordHere"
  }
}

Get Task Result - Option 1 (token)

POST https://captcha69.com/getTaskResult
Content-Type: application/json

{
  "clientKey": "max1_YOUR_API_KEY",
  "taskId": 407533072
}

Response

{
  "errorId": 0,
  "status": "ready",
  "solution": {
    "userAgent": "userAgentPlaceholder",
    "token": "0.iGX3xsyFCkbGePM3jP4P4khLo6TrLukt8ZzBvwuQOvbC...f61f3082"
  }
}

Solution Properties (Option 1)

PropertyTypeDescription
token String Use this token when calling the callback function.

Option 2: Challenge (cookie)

Attention!
Use your own proxies for this task.

After solving, you will receive special cookies to add to your browser.

Request Parameters (Option 2)

ParameterTypeRequiredDescription
type String Required TurnstileTask
websiteURL String Required The URL of the page where the captcha is solved.
websiteKey String Required Turnstile site key (any string is acceptable).
cloudflareTaskType String Required cf_clearance
htmlPageBase64 String Required Base64-encoded HTML page of "Just a moment" shown with 403 response.
userAgent String Required Browser User-Agent. Pass only the current Windows UA.
proxyType String Required http - regular HTTP/HTTPS proxy;
https - use if http doesn't work;
socks4 - SOCKS4 proxy;
socks5 - SOCKS5 proxy.
proxyAddress String Required Proxy IP address (IPv4/IPv6).
proxyPort Integer Required Proxy port.
proxyLogin String Optional Proxy login.
proxyPassword String Optional Proxy password.

Getting htmlPageBase64

var serializer = new XMLSerializer();
var fullHtml = serializer.serializeToString(document);

var htmlBase64 = btoa(unescape(encodeURIComponent(fullHtml)));
console.log(htmlBase64);

Create Task - Option 2 (cookie)

POST https://captcha69.com/createTask
Content-Type: application/json

{
  "clientKey": "max1_YOUR_API_KEY",
  "task": {
    "type": "TurnstileTask",
    "websiteURL": "https://example.com",
    "websiteKey": "xxxxxxxxxx",
    "cloudflareTaskType": "cf_clearance",
    "htmlPageBase64": "PCFET0NUWVBFIGh0...vYm9keT48L2h0bWw+",
    "userAgent": "userAgentPlaceholder",
    "proxyType": "http",
    "proxyAddress": "8.8.8.8",
    "proxyPort": 8080,
    "proxyLogin": "proxyLoginHere",
    "proxyPassword": "proxyPasswordHere"
  }
}

Response

{
  "errorId": 0,
  "taskId": 407533072
}

Get Task Result - Option 2 (cookie)

POST https://captcha69.com/getTaskResult
Content-Type: application/json

{
  "clientKey": "max1_YOUR_API_KEY",
  "taskId": 407533072
}

Response

{
  "errorId": 0,
  "status": "ready",
  "solution": {
    "cf_clearance": "1tarGvbY2_ZhQdYxpSBloao.FoOn9VtcJtmb_IQ_hCE-1761217338-1.2.1.1-..."
  }
}

Solution Properties (Option 2)

PropertyTypeDescription
cf_clearance String Special Cloudflare cookies that you can set in your browser.

How to Differentiate Challenge from Turnstile

Differences between Challenge and Turnstile

Standard Turnstile:

Stylized variants:

The challenge is seamlessly integrated into the website.

Looks like a normal Turnstile captcha, but it is actually a Cloudflare challenge.

To confirm Challenge presence, open developer tools, inspect network traffic, and check the page source:

  • The first request to the site returns a 403 status code.
  • The form with id challenge-form has an action attribute containing __cf_chl_f_tk=.
  • The page contains two similar <script> tags that create new values in the window object.

Code Examples

Node.js - Option 1 (token) Extract Parameters
import { chromium } from "playwright";

(async () => {
  const browser = await chromium.launch({ headless: false });
  const page = await browser.newPage();

  let params = null;

  try {
    while (!params) {
      await page.goto("https://example.com");

      await page.evaluate(() => {
        window.turnstile = new Proxy(window.turnstile, {
          get(target, prop) {
            if (prop === "render") {
              return function (a, b) {
                const p = {
                  websiteKey: b.sitekey,
                  websiteURL: window.location.href,
                  data: b.cData,
                  pagedata: b.chlPageData,
                  action: b.action,
                  userAgent: navigator.userAgent,
                };
                window.params = p;
                return target.render.apply(this, arguments);
              };
            }
            return target[prop];
          },
        });
      });

      params = await page.evaluate(() => {
        return new Promise((resolve) => {
          setTimeout(() => resolve(window.params || null), 5000);
        });
      });

      if (!params) {
        await page.waitForTimeout(3000);
      }
    }

    console.log("Turnstile Params:", params);
  } finally {
    await browser.close();
  }
})();
Node.js - Option 2 (cf_clearance) Extract Parameters
import { chromium } from "playwright";
import { Buffer } from "buffer";

(async () => {
  const browser = await chromium.launch({ headless: false });
  const page = await browser.newPage();

  let websiteKey = null;

  while (!websiteKey) {
    await page.goto("https://example.com");

    await page.evaluate(() => {
      window.turnstile = new Proxy(window.turnstile, {
        get(target, prop) {
          if (prop === "render") {
            return function (a, b) {
              window.websiteKey = b.sitekey;
              return target.render.apply(this, arguments);
            };
          }
          return target[prop];
        },
      });
    });

    websiteKey = await page.evaluate(() => {
      return new Promise((resolve) => {
        setTimeout(() => resolve(window.websiteKey || null), 5000);
      });
    });

    if (!websiteKey) {
      await page.waitForTimeout(3000);
    }
  }

  const html = await page.content();
  const htmlPageBase64 = Buffer.from(html).toString("base64");

  const result = {
    websiteKey,
    htmlPageBase64,
  };

  console.log(result);

  await browser.close();
})();