anticaptcha.pro
  • Bắt đầu
  • Sử dụng API
    • Lấy danh sách method hỗ trợ
    • Lấy số dư
    • Giải captcha
      • Giải recaptcha v2
      • Giải recaptcha v3
      • Giải captcha cloudflare turnstile
      • Giải captcha hình ảnh
        • Các version của captcha hình ảnh
    • Lấy kết quả giải captcha
  • SDK và Extension
    • Page 1
Powered by GitBook
On this page
  • Endpoint
  • Các tham số body
  • Request mẫu
  • Kết quả trả về
  1. Sử dụng API
  2. Giải captcha

Giải captcha cloudflare turnstile

Endpoint

POST https://api.anticaptcha.pro/v1/createTask

Các tham số body

Tên trường
Kiểu dữ liệu
Bắt buộc
Mô tả

apiKey

string

✔️

Api key sử dụng dịch vụ

method

string

✔️

Giá trị turnstile

sitekey

string

✔️

Sitekey của website cần giải, ví dụ: 0x4AAAAAAA-SoSQqf-xXxxX

pageurl

string

✔️

version

string

Giá trị default

Request mẫu

curl --location 'https://api.anticaptcha.pro/v1/createTask' \
--header 'Content-Type: application/json' \
--data '{
    "apiKey": "d7aro666cxlpjx822ctvzwmq09x3y6mc",
    "method": "turnstile",
    "sitekey": "XXXX.DUMMY.TOKEN.XXXX",
    "pageurl": "https://demo.turnstile.workers.dev/",
    "version": "default"
}'
const myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");

const raw = JSON.stringify({
  "apiKey": "d7aro666cxlpjx822ctvzwmq09x3y6mc",
  "method": "turnstile",
  "sitekey": "XXXX.DUMMY.TOKEN.XXXX",
  "pageurl": "https://demo.turnstile.workers.dev/",
  "version": "default"
});

const requestOptions = {
  method: "POST",
  headers: myHeaders,
  body: raw,
  redirect: "follow"
};

fetch("https://api.anticaptcha.pro/v1/createTask", requestOptions)
  .then((response) => response.text())
  .then((result) => console.log(result))
  .catch((error) => console.error(error));
import requests
import json

url = "https://api.anticaptcha.pro/v1/createTask"

payload = json.dumps({
  "apiKey": "d7aro666cxlpjx822ctvzwmq09x3y6mc",
  "method": "turnstile",
  "sitekey": "XXXX.DUMMY.TOKEN.XXXX",
  "pageurl": "https://demo.turnstile.workers.dev/",
  "version": "default"
})
headers = {
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://api.anticaptcha.pro/v1/createTask");
var content = new StringContent("{\r\n    \"apiKey\": \"d7aro666cxlpjx822ctvzwmq09x3y6mc\",\r\n    \"method\": \"turnstile\",\r\n    \"sitekey\": \"XXXX.DUMMY.TOKEN.XXXX\",\r\n    \"pageurl\": \"https://demo.turnstile.workers.dev/\",\r\n    \"version\": \"default\"\r\n}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());

Kết quả trả về

{
    "success": true,
    "data": {
        "status": "idle",
        "taskId": "add42add-02c3-431b-91ce-e8646bd7eea4" //Bạn cần lưu taskId để có thể lấy kết quả của captcha
    }
}
{
    "success": false,
    "code": 404,
    "msg": "Apikey is invalid"
}
{
    "success": false,
    "code": 400,
    "msg": "Insufficient balance"
}
{
    "success": false,
    "code": 400,
    "msg": [
        "sitekey must be a string",
        "pageurl must be a string",
        "version must be one of the following values: default"
    ]
}
PreviousGiải recaptcha v3NextGiải captcha hình ảnh

Last updated 7 days ago

Url website cần giải, ví dụ:

https://demo.turnstile.workers.dev/