Skip to main content

ComplexImageTask HCaptcha

The object contains data about the task for solving hCaptcha.

Request to create a task

Structure of the sent object

Method

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

ParameterTypeRequiredPossible valuesDescription
typeStringyesComplexImageTaskDefines the task object type.
classStringyeshcaptchaDefines the task object class.
imageUrlsArrayyes (if imagesBase64 is not filled)[ “https://i.postimg.cc/kg71cbRt/image-1.jpg”,… ]List with image addresses. Maximum 18 elements.
imagesBase64Arrayyes (if imageUrls is not filled)[ “/9j/4AAQSkZJRgABAQEAAAAAAAD…”,… ]List with images in base64 format. Maximum 18 elements.
metadata.TaskStringyesPlease click on the panda and othersTask text (in English).
exampleImageUrlsArraynot always[ “https://i.postimg.cc/GmBgwnDm/4type-example-image.png”]List with image addresses. Must contain 1 element.
exampleImagesBase64Arraynot always[ “/9j/4AAQSkZJRgABAQEAAAAAAAD…”]List with images in base64 format. Must contain 1 element.
metadata.ClassesArraynot always[ "shark", "chicken", "goat", "hedgehog" ] and othersA list with string values located on the right half of the captcha (in the same order as in the image).
userAgentStringno-Browser User-Agent used when loading images if links were passed to imageUrls. You should use a modern browser signature, otherwise Google will return an error asking you to update your browser.
websiteURLStringno-Address of the page on which the captcha is solved.

Request for a response

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.

Structure of the solution object

PropertyTypeDescription
answerArray of objectsList of answers to each of the sent images.
metadata.AnswerTypestringType of the returned response.

Grid response type

Response formatResponse exampleDescription
Array of boolean[true, false, true]List with boolean values, true - means that you need to click on the image corresponding to this position.

Response example:

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

Coordinate response type

Response formatResponse exampleDescription
Array of objects[{ "X":371, "Y":505.0000112 }, { "X":5, "Y":101.2 }]A list with coordinates to click on the corresponding image.

Response example:

{
"errorId":0,
"status":"ready",
"solution": {
"answer": [ { "X":371, "Y":505.0000112 }, { "X":5, "Y":101.2 } ],
"metadata": { "AnswerType": "Coordinate" }
}
}

Image example (first type)

Choose the right task type

This task type does not contain a reference image, such as fourth type

Request example

Method

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

{
"clientKey":"dce6bcbb1a728ea8d871de6d169a2057",
"task": {
"type": "ComplexImageTask",
"class": "hcaptcha",
"imageUrls":[ "https://i.postimg.cc/kg71cbRt/image-1.jpg", "https://i.postimg.cc/6381Zx2j/image.jpg" ],
"metadata": {
"Task": "Please click each image containing a mountain"
},
"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>

Type of received response - Grid.

Example:

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

Pricing

NameCost per 1000 images, $
hCaptcha0,02

Image example (second type)

Request example

Method

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

{
"clientKey":"dce6bcbb1a728ea8d871de6d169a2057",
"task": {
"type": "ComplexImageTask",
"class": "hcaptcha",
"imagesBase64": [ “/9j/4AAQSkZJRgABAQEAAAAAAAD…” ],
"metadata": {
"Task": "Please click on the panda"
},
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36."
}
}

Response example

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

Getting a result

Method

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

Type of received response - Coordinate.

Example:

{
"errorId":0,
"status":"ready",
"solution": {
"answer": [ { "X":371, "Y":505.0000112 } ],
"metadata": { "AnswerType": "Coordinate" }
}
}

Pricing:

NameCost per 1000 images, $
hCaptcha0,02

Image example (third type)

This type of captcha should contain the metadata.Classes field.

Request example

Method

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

{
"clientKey":"dce6bcbb1a728ea8d871de6d169a2057",
"task": {
"type": "ComplexImageTask",
"class": "hcaptcha",
"imagesBase64": [ “/9j/4AAQSkZJRgABAQEAAAAAAAD…” ],
"metadata": {
"Task": "What animal is shown in the image below?",
"Classes": [ "shark", "chicken", "goat", "hedgehog" ]
},
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36."
}
}

Response example

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

Getting a result

Method

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

Type of received response - Grid.

Example:

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

Pricing:

NameCost per 1000 images, $
hCaptcha0,02

Image example (fourth type)

For this request, the required field is exampleImageUrls or exampleImagesBase64. It should contain one image.

The imageUrls or imagesBase64 field should contain 9 images.

Request example

Method

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

{
"clientKey":"dce6bcbb1a728ea8d871de6d169a2057",
"task": {
"type": "ComplexImageTask",
"class": "hcaptcha",
"imageUrls": [
"https://i.postimg.cc/bwVVWbkG/4type-00.jpg",
"https://i.postimg.cc/nzBdXP57/4type-01.jpg",
"https://i.postimg.cc/zf9tXrd8/4type-02.jpg",
"https://i.postimg.cc/2yY0hxRt/4type-03.jpg",
"https://i.postimg.cc/rFQfRWhh/4type-04.jpg",
"https://i.postimg.cc/Jz0PNnvR/4type-05.jpg",
"https://i.postimg.cc/h48ygNVR/4type-06.jpg",
"https://i.postimg.cc/yY1yXdtk/4type-07.jpg",
"https://i.postimg.cc/Prt6qKMp/4type-08.jpg"
],
"exampleImageUrls": [ "https://i.postimg.cc/MpLtdwJV/4type-example.jpg" ],
"metadata": {
"Task": "Please select all images that appear warmer in comparison to other images"
}
}
}

Response example

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

Getting a result

Method

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

Type of received response - Grid.

Example:

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

Pricing

NameCost per 1000 images, $
hCaptcha0,02