Logo of «GitHub»

createTask method

The method is used to create a new captcha recognition task for a selected captcha task type. Returns the id of the task or an error code

API Endpoint: https://api.2captcha.com/createTask
Method: POST
Content-Type: application/json

Request properties

Name Type Required Description
clientKey String Yes Your API key
task Object Yes Task object, see Captcha task types
languagePool String No Used to choose the workers for solving the captcha by their language. Applicable to image-based and text-based captchas.
Default: en.
en - English-speaking workers
rn - Russian-speaking workers.
callbackUrl String No URL of your web registered web server used to receive and process the captcha resolution result
softId Integer No The ID of your software registered in our Software catalog

Request example

{
    "clientKey":"YOUR_API_KEY",
    "task": {
        "type":"RecaptchaV2TaskProxyless",
        "websiteURL":"https://2captcha.com/demo/recaptcha-v2",
        "websiteKey":"6LfD3PIbAAAAAJs_eEHvoOl75_83eXSqpPSRFJ_u"
    }
}

Response example

{
    "errorId": 0,
    "taskId": 72345678901
}