NeuroCaptcha

createTask

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

Questa sezione è mostrata in inglese.

In questa pagina
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
stringobbligatorio
Your API key.
task
objectobbligatorio
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
stringobbligatorio
Task type, see task types.
websiteURL
stringobbligatorio
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
stringobbligatorio
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
stringper i tipi con proxy
IP address or host name of the proxy. Private and local addresses are rejected.
proxyPort
integerper i tipi con proxy
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#

Playground

Invia una vera richiesta createTask dal browser, poi chiama getTaskResult ogni 2 secondi e mostra le risposte JSON così come arrivano.

Conviene usare una chiave di test: è gratuita e restituisce un token fittizio TEST_ in un paio di secondi. La chiave non viene salvata da nessuna parte. Ottieni una chiave

Altri parametri
Pronto per l’invio

Le richieste vanno all’indirizzo di questo stesso sito; la chiave e le risposte restano nel browser.

Richiesta

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

Risposta

createTask
// …