NeuroCaptcha

createTask

Creates a task and returns taskId at once. The price is held and charged only if the task is solved.

本节内容以英文显示。

本页内容
Endpoint
POST https://neurocaptcha.com/createTask

Creates a task and answers at once with taskId. Get the solution with getTaskResult or receive it at callbackUrl.

Request#

clientKey
string必填
Your API key.
task
object必填
The task: its type and parameters (below).
callbackUrl
string
Public http(s) URL for a signed webhook when the task is finished. Private addresses are rejected.
softId
integer
Your application id in the developer program: you get a share of the spending of clients who use your application.
languagePool
string
Accepted for compatibility with Anti-Captcha; ignored.

The task object#

Which fields matter depends on the task type; unknown fields are ignored.

type
string必填
Task type, see task types.
websiteURL
string必填
Full address of the page where the reCAPTCHA is shown: http(s), up to 2048 characters. The page, not the address of the reCAPTCHA iframe.
websiteKey
string必填
Site key: the data-sitekey attribute of the widget or the k parameter of the anchor request in DevTools → Network. Up to 256 characters, no spaces.
isInvisible
boolean
true for invisible reCAPTCHA v2 (the widget has data-size="invisible" and shows only a badge). Default false.
recaptchaDataSValue
string
The data-s value if the page passes one (some Google services do). Up to 4096 characters.
pageAction
string
The action the page passes to grecaptcha.execute(sitekey, {action: …}), e.g. login. Up to 128 characters.
minScore
number
Minimum score of the token from 0 to 1, usually 0.3, 0.7 or 0.9.
enterprisePayload
object
Extra parameters of grecaptcha.enterprise.render / execute, e.g. {"s": "…"}, up to 8 KiB of JSON. If recaptchaDataSValue or pageAction is empty, the s and action keys are used instead.
isEnterprise
boolean
Compatibility flag of Anti-Captcha clients: true turns a regular reCAPTCHA type into its Enterprise twin (solved and billed as Enterprise). Prefer the Enterprise task types.
apiDomain
string
Domain the widget is loaded from: www.google.com (default) or www.recaptcha.net.
userAgent
string
User-Agent of the browser that will submit the token, up to 512 characters. It is returned in solution.userAgent.
cookies
string
Cookies of the target site for the solving browser: name=value; name2=value2, up to 8192 characters. Stored encrypted.
proxyType
string
http (default), https, socks4 or socks5.
proxyAddress
string仅代理类型
IP address or host name of the proxy. Private and local addresses are rejected.
proxyPort
integer仅代理类型
Proxy port, 1–65535.
proxyLogin
string
Proxy login, up to 256 characters. Stored encrypted.
proxyPassword
string
Proxy password, up to 256 characters. Stored encrypted.

Example#

import requests

response = requests.post("https://neurocaptcha.com/createTask", json={
    "clientKey": "YOUR_API_KEY",
    "task": {
        "type": "RecaptchaV2TaskProxyless",
        "websiteURL": "https://www.google.com/recaptcha/api2/demo",
        "websiteKey": "6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-",
    },
}, timeout=30)
print(response.json())

Response#

Success
{
  "errorId": 0,
  "taskId": 7781
}
Error
{
  "errorId": 22,
  "errorCode": "ERROR_TASK_ABSENT",
  "errorDescription": "websiteURL must be an absolute http(s) URL."
}

Billing#

  • The task price (after your volume discount) is held on createTask. getBalance shows the balance without held amounts.
  • The money is charged only when the task becomes ready. A failed or expired task releases the hold — it costs nothing.
  • Test keys are free.
  • Got a token the site rejected? reportIncorrectRecaptcha within 24 h returns the money.

Limits#

  • 30 createTask per second per key (bursts up to 60) — above it ERROR_TOO_MUCH_REQUESTS.
  • 200 tasks in progress per key (can be changed per key) — above it ERROR_NO_SLOT_AVAILABLE.
  • Request body up to 1 MiB.

Errors#

errorIderrorCodeWhen
1ERROR_KEY_DOES_NOT_EXISTwrong or revoked key
2ERROR_NO_SLOT_AVAILABLEtoo many tasks of the key in progress
10ERROR_ZERO_BALANCEthe available balance is below the task price
11ERROR_IP_NOT_ALLOWEDthe IP is not in the key's allowlist
14ERROR_NO_SUCH_METHODthe body is not valid JSON
22ERROR_TASK_ABSENTtask is missing or a field is invalid — see errorDescription
23ERROR_TASK_NOT_SUPPORTEDunknown or disabled task type
55ERROR_ACCOUNT_SUSPENDEDthe account is suspended
90ERROR_INTERNALtemporary failure, retry
91ERROR_TOO_MUCH_REQUESTSrate limit of the key or IP
92ERROR_SPENDING_LIMITdaily or monthly cap of the key reached

Try it#

在线调试

从您的浏览器发送真实的 createTask 请求,随后每 2 秒调用一次 getTaskResult,并原样显示 JSON 响应。

请使用测试密钥:完全免费,几秒内即可返回模拟的 TEST_ token。密钥不会被保存。 获取密钥

更多参数
可以发送

请求发送到本站自身的地址;密钥和响应只保留在您的浏览器中。

请求

POST /createTask
{
  "clientKey": "YOUR_API_KEY",
  "task": {
    "type": "RecaptchaV2TaskProxyless",
    "websiteURL": "https://www.google.com/recaptcha/api2/demo",
    "websiteKey": "6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-"
  }
}

响应

createTask
// …