Skip to main content

ComplexImageTask Recaptcha

The object contains data about the task for solving ReCaptcha2 from Google.

Object structure

ParameterTypeRequiredPossible valuesDescription
typeStringyesComplexImageTaskSpecifies the task object type.
classStringyesrecaptchaSpecifies the task object class.
imageUrlsArrayyes (if imagesBase64 is not filled)[ “https://i.postimg.cc/yYjg75Kv/img1.jpg”]Single image 4x4, 3x3 or a new 1x1 captcha part (in an array).
imagesBase64Arrayyes (if imageUrls is not filled)[ “/9j/4AAQSkZJRgABAQEAAAAAAAD…”]Single image 4x4, 3x3 or a new 1x1 captcha part in base64 format (in an array).
metadata.GridStringyes4x4, 3x3, 1x1Image grid size.
metadata.TaskDefinitionStringyes (if metadata.Task is not filled)/m/015qff and others

Technical value that defines the task type

How to get TaskDefinition

The data can be found in responses to /recaptcha/{recaptchaApi}/reload or /recaptcha/{recaptchaApi}/userverify requests, where recaptchaApi is "enterprise" or "api2" depending on the Recaptcha type. The response contains json, in which one can take a list of TaskDefinitions for loaded captchas.

metadata.TaskStringyes (if metadata.TaskDefinition is not filled)Click on traffic lights and othersTask text (in English).
userAgentStringno-The browser User-Agent to use when loading images if links were passed in imageUrls. It is required to use a modern browser signature, otherwise Google will return an error asking for a browser update.
websiteURLStringno-URL of the page where the captcha is solved.

Request example

Method

<https://api.capmonster.cloud/createTask>

{
"clientKey":"dce6bcbb1a728ea8d871de6d169a2057",
"task": {
"type": "ComplexImageTask",
"class": "recaptcha",
"imageUrls":[ "https://i.postimg.cc/yYjg75Kv/payloadtraffic.jpg" ],
"metadata": {
"Task": "Click on traffic lights",
"Grid": "3x3",
"TaskDefinition": "/m/015qff"
},
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36.",
"websiteUrl": "https://lessons.zennolab.com/captchas/recaptcha/v2_simple.php?level=middle"
}
}

Response example

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

Getting a result

Method

<https://api.capmonster.cloud/getTaskResult>

Use the getTaskResult method to get the captcha solution. Depending on the system load, you will receive a response after a time ranging from 300ms to 6s.

PropertyTypeDescription
answerArrayList with boolean values, "true" means that you need to click on the image corresponding to this position.

Example:

{
"errorId":0,
"status":"ready",
"solution": {
"answer": [ false, false, false, false, true, false, false, false, false ]
}
}

Pricing:

NameCost per 1000 images, $Cost per 1000 new dynamic images, $
1

reCAPTCHA 2 (3*3)

0,20,04
2

reCAPTCHA 2 (4*4)

0,1not applicable