NeuroCaptcha

任务类型

reCAPTCHA v2

RecaptchaV2TaskProxyless无需代理

reCAPTCHA v2 就是“我不是机器人”复选框及其隐形版本。API 返回 gRecaptchaResponse token,您需要将其随页面表单一起提交。

无需代理:我们使用自有基础设施解决。适用于目标网站不将 token 与 IP 绑定的情况。

价格

US$0.60每 1000 个任务

每个任务 US$0.0006

获取 API 密钥

实时指标(24 小时)

该类型的实时指标将在上线后显示在状态页上。

任务参数

参数类型必填任务参数
typestring必填RecaptchaV2TaskProxyless
websiteURLstring必填包含验证码的页面完整 URL。
websiteKeystring必填网站密钥(data-sitekey 或 anchor 请求中的 k 参数)。
isInvisibleboolean可选隐形 reCAPTCHA v2(无复选框)时设为 true。
recaptchaDataSValuestring可选data-s 的值,仅当页面使用该参数时需要(部分 Google 服务)。
userAgentstring可选解决时使用的 User-Agent;提交 token 时请使用相同的值。
cookiesstring可选目标网站的 Cookie,格式为 key1=value1; key2=value2。

示例

import time
import requests

API = "https://api.neurocaptcha.com"
KEY = "YOUR_API_KEY"

# 1. create a task: the price is held, not charged
task = requests.post(f"{API}/createTask", json={
    "clientKey": KEY,
    "task": {
        "type": "RecaptchaV2TaskProxyless",
        "websiteURL": "https://example.com/login",
        "websiteKey": "6Le-SITE-KEY",
    },
}).json()
if task["errorId"]:
    raise RuntimeError(task["errorCode"])

# 2. poll the result (or pass "callbackUrl" and get a signed webhook)
while True:
    time.sleep(3)
    res = requests.post(f"{API}/getTaskResult",
                        json={"clientKey": KEY, "taskId": task["taskId"]}).json()
    if res["errorId"]:
        raise RuntimeError(res["errorCode"])
    if res["status"] == "ready":
        print(res["solution"]["gRecaptchaResponse"])
        break

其他任务类型