API 文件
請求格式為 JSON,地址只有一個(https://gatesolver.com)。把在帳戶頁面建立的 API 密鑰作為 clientKey 發送。先建立任務(createTask),數秒後取得結果(getTaskResult)。
- 基本地址
- https://gatesolver.com
- 驗證
- 請求內容中的 clientKey
- 請求限制
- 每個密鑰每分鐘 600 次
- 格式
- JSON (POST)
立即開始
- 註冊並充值餘額。
- 在帳戶頁面的 API 密鑰選單建立密鑰。密鑰只在建立時顯示一次。
- 用 createTask 建立任務,再以收到的 taskId 每隔數秒呼叫 getTaskResult。
- status 變為 ready 後,把 solution 填入頁面。
createTask 格式的客戶端只需更改 API 地址即可直接使用。新地址:https://gatesolver.com
createTask
POST https://gatesolver.com/createTask
建立任務並傳回 taskId。此時不會扣款。
| 欄位 | 格式 | 必填 | 說明 |
|---|---|---|---|
| clientKey | string | 是 | API 密鑰 |
| task | object | 是 | 任務內容:type 及各類型的欄位(見下方任務 type 表及各類型頁面) |
| callbackUrl | string | 否 | 不接受。請用 getTaskResult 取得結果。 |
請求
{
"clientKey": "YOUR_API_KEY",
"task": {
"type": "ReCaptchaV2TaskProxyLess",
"websiteURL": "https://www.google.com/recaptcha/api2/demo",
"websiteKey": "6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-"
}
}回應
{ "errorId": 0, "taskId": "61138bb6-19fb-11ec-a9c8-0242ac110006" }getTaskResult
POST https://gatesolver.com/getTaskResult
傳回任務結果。建議 Token 型每 3 秒、圖片識別每 1 秒查詢一次。得出答案的一刻,會從餘額扣除 1 個任務的費用。
| 欄位 | 說明 |
|---|---|
| status | processing(等待中)、ready(已得出答案)、failed(失敗,不扣款) |
| solution | 答案。欄位因類型而異(gRecaptchaResponse、token、cookie、text 等) |
| cost | 此任務扣除的金額(美元) |
| createTime / endTime | 建立時間及完成時間(毫秒) |
{
"errorId": 0,
"taskId": "61138bb6-19fb-11ec-a9c8-0242ac110006",
"status": "ready",
"solution": { "gRecaptchaResponse": "03AFcWeA6...", "userAgent": "Mozilla/5.0 ..." },
"cost": "0.000560"
}getBalance
POST https://gatesolver.com/getBalance
以美元傳回餘額。
{ "clientKey": "YOUR_API_KEY" }
{ "errorId": 0, "balance": 42.5 }任務 type
type 名稱不分大小寫。各類型的欄位及範例見各類型頁面。
| type | 類型 | 1,000 個任務 |
|---|---|---|
| ReCaptchaV2TaskProxyLess | reCAPTCHA v2 | $0.56 |
| ReCaptchaV2Task | reCAPTCHA v2 | $0.56 |
| ReCaptchaV2EnterpriseTaskProxyLess | reCAPTCHA v2 Enterprise | $0.70 |
| ReCaptchaV2EnterpriseTask | reCAPTCHA v2 Enterprise | $0.70 |
| ReCaptchaV3TaskProxyLess | reCAPTCHA v3 | $0.70 |
| ReCaptchaV3Task | reCAPTCHA v3 | $0.70 |
| ReCaptchaV3EnterpriseTaskProxyLess | reCAPTCHA v3 Enterprise | $2.10 |
| ReCaptchaV3EnterpriseTask | reCAPTCHA v3 Enterprise | $2.10 |
| AntiTurnstileTaskProxyLess | Cloudflare Turnstile | $0.84 |
| TurnstileTaskProxyless | Cloudflare Turnstile | $0.84 |
| AntiCloudflareTask | Cloudflare Challenge | $0.84 |
| AntiAwsWafTaskProxyLess | AWS WAF | $1.40 |
| AntiAwsWafTask | AWS WAF | $1.40 |
| GeeTestTaskProxyLess | GeeTest v3 / v4 | $0.84 |
| GeeTestTask | GeeTest v3 / v4 | $0.84 |
| MtCaptchaTaskProxyLess | MTCaptcha | $2.10 |
| MtCaptchaTask | MTCaptcha | $2.10 |
| DatadomeSliderTask | DataDome Slider | $1.75 |
| ImageToTextTask | Image to Text | $0.28 |
| ReCaptchaV2Classification | reCAPTCHA Image Classification | $0.28 |
| AwsWafClassification | AWS WAF Image Classification | $0.42 |
| VisionEngine | Vision Engine | $1.05 |
錯誤碼
出錯時 errorId 為 1,並附上 errorCode 及 errorDescription。錯誤回應不會扣款。
| errorCode | 意思 |
|---|---|
| ERROR_KEY_DENIED_ACCESS | 缺少 clientKey 或 clientKey 錯誤。 |
| ERROR_ZERO_BALANCE | 餘額不足。請充值後再發送請求。 |
| ERROR_TASK_NOT_SUPPORTED | 不支援此任務 type。 |
| ERROR_INVALID_TASK_DATA | 缺少必填欄位。errorDescription 中會列出缺少的欄位名稱。 |
| ERROR_TASKID_INVALID | taskId 不存在,或並非由此密鑰建立。 |
| ERROR_CAPTCHA_UNSOLVABLE | 未能識別,未有扣款。請重新發送請求。 |
| ERROR_SERVICE_UNAVAILABLE | 網絡錯誤,未有扣款。請稍後再發送請求。 |
| ERROR_RATE_LIMIT | 已超過每分鐘 600 次請求。請拉長請求間隔。 |
| ERROR_ACCOUNT_SUSPENDED | 帳戶已被停用。 |
兼容 in.php
in.php 格式的程式只需更改地址。支援的 method:userrecaptcha (reCAPTCHA v2)、turnstile、geetest、base64、post(圖片文字)。
GET https://gatesolver.com/in.php?key=YOUR_API_KEY&method=userrecaptcha&googlekey=6Le...&pageurl=https://example.com
OK|61138bb6-19fb-11ec-a9c8-0242ac110006
GET https://gatesolver.com/res.php?key=YOUR_API_KEY&action=get&id=61138bb6-19fb-11ec-a9c8-0242ac110006
CAPCHA_NOT_READY
OK|03AFcWeA6...
GET https://gatesolver.com/res.php?key=YOUR_API_KEY&action=getbalance
42.50000加上 json=1,會以 {"status":1,"request":"..."} 格式回應。
範例
import requests, time
API, KEY = "https://gatesolver.com", "YOUR_API_KEY"
def solve(task, wait=3, timeout=120):
r = requests.post(f"{API}/createTask", json={"clientKey": KEY, "task": task}, timeout=30).json()
if r.get("errorId"):
raise RuntimeError(r["errorCode"])
end = time.time() + timeout
while time.time() < end:
time.sleep(wait)
res = requests.post(f"{API}/getTaskResult", json={"clientKey": KEY, "taskId": r["taskId"]}, timeout=30).json()
if res.get("errorId"):
raise RuntimeError(res["errorCode"])
if res["status"] == "ready":
return res["solution"]
raise TimeoutError("task timed out")
print(solve({"type": "ReCaptchaV2TaskProxyLess", "websiteURL": "https://example.com", "websiteKey": "6Le..."}))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());
export async function solve(task, wait = 3000) {
const r = await post("/createTask", { clientKey: KEY, task });
if (r.errorId) throw new Error(r.errorCode);
for (;;) {
await new Promise((s) => setTimeout(s, wait));
const res = await post("/getTaskResult", { clientKey: KEY, taskId: r.taskId });
if (res.errorId) throw new Error(res.errorCode);
if (res.status === "ready") return res.solution;
}
}body, _ := json.Marshal(map[string]any{"clientKey": "YOUR_API_KEY", "task": map[string]any{
"type": "AntiTurnstileTaskProxyLess", "websiteURL": "https://example.com", "websiteKey": "0x4AAAAAAA..."}})
res, err := http.Post("https://gatesolver.com/createTask", "application/json", bytes.NewReader(body))$ch = curl_init("https://gatesolver.com/createTask");
curl_setopt_array($ch, [CURLOPT_POST => true, CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Content-Type: application/json"],
CURLOPT_POSTFIELDS => json_encode(["clientKey" => "YOUR_API_KEY", "task" => [
"type" => "ReCaptchaV3TaskProxyLess", "websiteURL" => "https://example.com", "websiteKey" => "6Lc...", "pageAction" => "login"]])]);
$task = json_decode(curl_exec($ch), true);curl -X POST https://gatesolver.com/createTask -H "Content-Type: application/json" \
-d '{"clientKey":"YOUR_API_KEY","task":{"type":"ImageToTextTask","body":"iVBORw0KGgo..."}}'