Cloudflare Turnstile

We currently only support Turnstile with user provided proxy, and all its types

  • Manual

  • Non-Interactive

  • Invisible

Creating the task

creating the task using the createTask

Task object

Key
Type
Optional?
Description

type

String

No

has to be "TurnstileTask" for cloudflare task types.

subtask_type

String

No

has to be "token" for this type.

websiteURL

String

No

the target website address.

websiteKey

String

No

Turnstile website key.

metadata

Map<String,String>

Yes

Turnstile extra data Check Documentation

metadata.data_action

String

Yes

The value of data-action attribute of the captcha if available.

metadata.data_cdata

String

Yes

The value of data-cdata attribute of the captcha if available.

proxyType

String

No

input is http/socks5 only.

proxyAddress

String

No

the proxy address.

proxyPort

Integer

No

proxy port as int.

proxyLogin

String

No

proxy login.

proxyPassword

String

No

proxy password.

Example request

POST https://api.crabtcha.com/createTask
Host: api.crabtcha.com
Content-Type: application/json
{
  "clientKey": "YOUR_API_KEY",
  "task": {
    "type": "TurnstileTask",
    "websiteURL": "https://www.yourwebsite.com",
    "websiteKey" :"0x4AAAAAAA02-XXXIXXXuiaW",
    "subtask_type": "token",
    "metadata" : {
    "data-action" : "signup",
    "data-cdata" : "XXXX"},
    "proxyType": "http",
    "proxyAddress": "192.155.55.3",
    "proxyPort": 69,
    "proxyLogin" : "user",
    "proxyPassword" : "somepassword"
  }
}

Example response

{
  "taskId": "df944101-64ac-468d-bc9f-41baecc3b8ca"
}

Getting result

Use the getTaskResult method to get the task results.

Depending on several factors you will get task results from 2 seconds to 20 seconds.

such factors include:

  • Proxy speed

  • target website location

  • Server load

Example request

POST https://api.crabtcha.com/getTaskResult
Host: api.crabtcha.com
Content-Type: application/json
{
  "clientKey": "THE API KEY",
  "taskId": "df944101-64ac-468d-bc9f-41baecc3b8ca"
}

Example response

{
  "task": {
    "type": "TurnstileTask",
    "status": "SUCCESS",
    "solution": {
      "token": "0.wP7XnyNEhAJ7LviolqelxHqHoePTs-GYLnaZoopwbLhRvvpGFr2aGIbWd79n3jCSN,
      "elapsed_ms": 5008
    },
    "websiteURL": "https://www.example.com/",
    "subtask_type": "token"
  },
  "taskId": "96bbe282-fab2-4105-bf8f-599efca38caa",
  "errorId": 0
}

Last updated