打码服务 / reCAPTCHA v2(自带代理)
reCAPTCHA v2(自带代理)
协议接口 ·
NoCaptchaTask和「reCAPTCHA v2」同一个题,但由**你指定的出口**去打。
参数与不带代理版完全一样,只多一组代理字段。什么时候需要它:目标站把令牌和出口 IP 绑在一起,用平台自己的机房 IP 打出来的令牌,换到你这边提交会被判无效。
请求
POST /v1/captcha/solve?timeout=180
Authorization: Bearer arp_xxx
Content-Type: application/json请求参数
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
type | string | 是 | 固定填 NoCaptchaTask |
websiteURL | string | 是 | 验证码所在页面的完整地址 |
websiteKey | string | 是 | 页面 data-sitekey 的值 |
isInvisible | boolean | 否 | 隐形 reCAPTCHA 传 true |
userAgent | string | 否 | 与真实请求一致的 UA |
proxyType | string | 是 | http / https / socks5 |
proxyAddress | string | 是 | 代理主机名或 IP |
proxyPort | integer | 是 | 代理端口 |
proxyLogin | string | 否 | 代理用户名(有认证才填) |
proxyPassword | string | 否 | 代理密码 |
只传上表列出的参数即可,认证由网关自动处理。
请求示例
{
"type": "NoCaptchaTask",
"websiteURL": "https://example.com/login",
"websiteKey": "6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-",
"proxyType": "http", "proxyAddress": "proxy.example.net", "proxyPort": 3000,
"proxyLogin": "user-region-US-sid-abc-t-30", "proxyPassword": "secret"
}响应示例
{ "ok": true, "ready": true, "token": "03AGdBq27gCf7UkBFO7Nsl5OqK6kiL911...", "price": 15, "balance": 985 }怎么取结果:取
token,并且提交时**仍从这个代理出去**。完整调用
curl -X POST 'https://api.xiaobaicap.com/v1/captcha/solve?timeout=180' \
-H "Authorization: Bearer arp_xxx" \
-H 'Content-Type: application/json' \
-d '{
"type": "NoCaptchaTask",
"websiteURL": "https://example.com/login",
"websiteKey": "6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-",
"proxyType": "http", "proxyAddress": "proxy.example.net", "proxyPort": 3000,
"proxyLogin": "user-region-US-sid-abc-t-30", "proxyPassword": "secret"
}'
import requests
r = requests.post(
"https://api.xiaobaicap.com/v1/captcha/solve",
headers={"Authorization": "Bearer arp_xxx"},
params={"timeout": 180},
json={
"type": "NoCaptchaTask",
"websiteURL": "https://example.com/login",
"websiteKey": "6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-",
"proxyType": "http", "proxyAddress": "proxy.example.net", "proxyPort": 3000,
"proxyLogin": "user-region-US-sid-abc-t-30", "proxyPassword": "secret"
},
timeout=200,
)
d = r.json()
if not d.get("ok"):
raise SystemExit(d)
print(d.get("token") or d.get("text") or d.get("objects"))注意事项
- 代理用用户名 + 密码认证,不要用 IP 白名单。
- 出口必须**粘性**:打码和提交要同一个 IP。
- 与不带代理版**同价**。
错误
失败时返回 502,积分全额退回,可以安全重试:
{"error":"识别失败,已全额退回 10 积分:...","code":"mint_failed"}
| code | 含义 | 处理 |
|---|---|---|
insufficient_credits | 积分不足(402,未扣费) | 充值后重试 |
bad_request | 参数不合法或类型不支持(400) | 对照上方参数表改 |
mint_failed | 识别失败(502,已退回) | 退避 2~3 秒重试 |
rate_limited | 触发限流(429) | 按 Retry-After 退避 |