什么是 Cloudflare Challenge 验证码?
Cloudflare Challenge 是进入网站前出现的 “Just a moment” 验证页面。通过后会得到 cf_clearance Cookie,即可继续浏览该网站。
获得的 cf_clearance Cookie 和 userAgent 必须在与请求所用代理相同的 IP 下一起使用。
Cloudflare Challenge
< 10s · $0.84 / 1k
为什么用 GateSolver 识别 Cloudflare Challenge
稳定识别
持续优化 Cloudflare Challenge 识别模型,题型变化也能稳定识别。
只为成功的任务付费
只为出结果的任务付费。失败或超时的任务不扣费。
AI 自动识别
无需人工等待,AI 即时识别。通常 10 秒 内出结果。
随处接入
基于 REST API,任何语言、任何自动化工具都以相同方式调用。
兼容 in.php
使用 in.php 和 res.php 格式的程序只需更换地址。
大批量处理
单个密钥 1 分钟内最多请求 600 次,并发任务数不设上限。
价格与速度
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"])const API = "https://gatesolver.com", KEY = "YOUR_API_KEY";
const post = (p, b) => fetch(API + p, { method: "POST", headers: { "content-type": "application/json" }, body: JSON.stringify(b) }).then((r) => r.json());
const { taskId } = await post("/createTask", { clientKey: KEY, task: {"type":"AntiCloudflareTask","websiteURL":"https://example.com/login","proxy":"http://user:pass@1.2.3.4:8080"} });
let res;
do {
await new Promise((s) => setTimeout(s, 3000));
res = await post("/getTaskResult", { clientKey: KEY, taskId });
} while (res.status === "processing");
console.log(res.solution);curl -X POST https://gatesolver.com/createTask \
-H "Content-Type: application/json" \
-d '{"clientKey":"YOUR_API_KEY","task":{"type":"AntiCloudflareTask","websiteURL":"https://example.com/login","proxy":"http://user:pass@1.2.3.4:8080"}}'Cloudflare Challenge 常见问题
Cloudflare Challenge 1,000 次多少钱?
Cloudflare Challenge 价格:1,000 次 $0.84。每 1 次任务从余额扣除,只为出结果的任务付费。
Cloudflare Challenge 多快能出结果?
通常 10 秒 内出结果。每隔几秒调用 getTaskResult,status 变为 ready 后即可使用答案。
Cloudflare Challenge 任务使用哪个 type?
默认 type:AntiCloudflareTask。其他名称(如使用代理的版本)也按相同价格接收。
失败会扣费吗?
不会。未识别成功或超时的任务不收费。