NEW與 createTask、in.php 相同的 API,只需更改地址即可連接查看 API 文件
GATESOLVER
立即開始

最簡單的 Cloudflare Challenge 驗證碼識別 API

GateSolver 以 AI 自動識別 Cloudflare Challenge 驗證碼。每 1,000 個任務 $0.84,通常 10 秒 內得出答案,只為成功的任務付費。

甚麼是 Cloudflare Challenge 驗證碼?

Cloudflare Challenge 是進入網站前出現的「Just a moment」驗證頁面。通過後會取得 cf_clearance Cookie,可繼續瀏覽該網站。

收到的 cf_clearance Cookie 和 userAgent 必須一併使用,並使用與請求時代理相同的 IP。

Cloudflare Challenge

< 10s · $0.84 / 1k

選用 GateSolver 識別 Cloudflare Challenge 的原因

價格與速度

任務 type速度價格
AntiCloudflareTask< 10s$0.84 / 1k

Cloudflare Challenge 識別方法:API 指南

只需兩次請求:用 createTask 建立任務,再用 getTaskResult 取得答案。

第 1 步:建立任務

POST https://gatesolver.com/createTask

欄位必填說明
type是AntiCloudflareTask
websiteURL是出現驗證頁面的地址
proxy是我的代理(Cookie 只在此 IP 有效)
userAgent否使用的瀏覽器 User-Agent

請求

{
  "clientKey": "YOUR_API_KEY",
  "task": {
    "type": "AntiCloudflareTask",
    "websiteURL": "https://example.com/login",
    "proxy": "http://user:pass@1.2.3.4:8080"
  }
}

回應

{
  "errorId": 0,
  "taskId": "61138bb6-19fb-11ec-a9c8-0242ac110006"
}

第 2 步:取得結果

POST https://gatesolver.com/getTaskResult

以 taskId 每 3 秒查詢一次結果。status 為 processing 時繼續等待,變為 ready 後使用 solution。

請求

{
  "clientKey": "YOUR_API_KEY",
  "taskId": "61138bb6-19fb-11ec-a9c8-0242ac110006"
}

回應

{
  "errorId": 0,
  "taskId": "61138bb6-19fb-11ec-a9c8-0242ac110006",
  "status": "ready",
  "solution": {
    "cookies": {
      "cf_clearance": "Bcg6jNLz..."
    },
    "token": "Bcg6jNLz...",
    "userAgent": "Mozilla/5.0 ..."
  }
}

收到的 cf_clearance Cookie 和 userAgent 必須一併使用,並使用與請求時代理相同的 IP。

程式碼範例

import requests, time

API = "https://gatesolver.com"
KEY = "YOUR_API_KEY"
task = {
    "type": "AntiCloudflareTask",
    "websiteURL": "https://example.com/login",
    "proxy": "http://user:pass@1.2.3.4:8080"
}

r = requests.post(f"{API}/createTask", json={"clientKey": KEY, "task": task}).json()
task_id = r["taskId"]
while True:
    time.sleep(3)
    res = requests.post(f"{API}/getTaskResult", json={"clientKey": KEY, "taskId": task_id}).json()
    if res.get("status") == "ready":
        print(res["solution"])
        break
    if res.get("errorId"):
        raise RuntimeError(res["errorCode"])

Cloudflare Challenge 常見問題

Cloudflare Challenge 每 1,000 個任務多少錢?

Cloudflare Challenge 價格:每 1,000 個任務 $0.84。每個任務從餘額扣除,只為已解出的任務付費。

Cloudflare Challenge 的答案多快得出?

通常 10 秒 內得出。每隔數秒呼叫 getTaskResult,status 變為 ready 後使用答案。

Cloudflare Challenge 任務應使用哪個 type?

預設 type:AntiCloudflareTask。其他名稱(如使用代理的版本)亦以相同價格接受。

失敗會扣款嗎?

不會。未能識別及逾時的任務都不收費。

支援的其他驗證碼