Yandex SmartCaptcha
We offer two methods for solving Yandex SmartCaptcha in API v2: token-based and image coordinates.
Use the
https://api.2captcha.com/createTaskendpoint to work with this method and get the result viahttps://api.2captcha.com/getTaskResult.
Method specifications
- YandexSmartCaptchaTaskProxyless — solving using our proxies
- YandexSmartCaptchaTask — solving using your proxies
- SmartCaptchaTask — solving Smart Captcha by image, returning coordinates
- PazlCaptchaTask — solving Kaleidoscope (puzzle) captcha by image
Token-based solving
YandexSmartCaptchaTaskProxyless / YandexSmartCaptchaTask
| Property | Type | Required | Description |
|---|---|---|---|
| type | String | Yes | Task type: YandexSmartCaptchaTaskProxyless or YandexSmartCaptchaTask |
| websiteURL | String | Yes | Full URL of the page where the captcha is loaded |
| websiteKey | String | Yes | The sitekey value from the page code or captcha iframe |
| userAgent | String | No | Your userAgent to be used during solving |
| cookies | String | No | Cookies to send in the request, format: name1=value1;name2=value2 |
Proxy parameters (only for YandexSmartCaptchaTask)
| Property | Type | Required | Description |
|---|---|---|---|
| proxyType | String | Yes | Proxy type: http, https, socks4, socks5 |
| proxyAddress | String | Yes | IP address or hostname of the proxy server |
| proxyPort | Number | Yes | Proxy server port |
| proxyLogin | String | No | Login for proxy authorization |
| proxyPassword | String | No | Password for proxy authorization |
Request example
Method: createTask
Endpoint: https://api.2captcha.com/createTask
json
{
"clientKey": "YOUR_API_KEY",
"task": {
"type": "YandexSmartCaptchaTaskProxyless",
"websiteURL": "https://mysite.com/",
"websiteKey": "Y5Lh0ti..."
}
}
Response example
Method: getTaskResult
Endpoint: https://api.2captcha.com/getTaskResult
json
{
"errorId": 0,
"status": "ready",
"solution": {
"token": "dV9xNjYyNTU3NjkxO4k9OTQuNVMuMjkuMjM9O9Q9MVEzQUEwMURERTY3RkUxQ9U3MTlEQzE3RjhYNTJCQUFFN9YyQTc3QUNFQjk9NzhVOTZGNjVCOEUyOVM4RTg9Q9VEQzY9NzY4O3U9MTY4MjU3NTY5MTQ4MTI3MVUyNVTo2ImVWMmQ4NWQzNjdlNzM9MVYhOGI5NWMxNWZlM4E4"
}
}
Use the received token in the
smart-tokenfield or pass it to the site backend similar to manual captcha solving.
Image-based solving
Suitable for visual Yandex SmartCaptcha tasks. Depending on the captcha variant, use
SmartCaptchaTask(Smart Captcha) orPazlCaptchaTask(Kaleidoscope).
Task specification: SmartCaptchaTask (Smart Captcha)
| Property | Type | Required | Description |
|---|---|---|---|
| type | String | Yes | Task type: SmartCaptchaTask |
| image | String | Yes | Main captcha image in Base64 format, 320×180 |
| imgInstructions | String | Yes | Instruction image in Base64 format, 480×180 |
| comment | String | No* | Text hint for the worker. * Recommended, e.g., select objects in the order of the instruction |
Request example (SmartCaptchaTask)
Method: createTask
Endpoint: https://api.2captcha.com/createTask
json
{
"clientKey": "YOUR_API_KEY",
"task": {
"type": "SmartCaptchaTask",
"image": "BASE64_IMAGE",
"imgInstructions": "BASE64_INSTRUCTION_IMAGE",
"comment": "select objects in the order of the instruction"
}
}
Response example (SmartCaptchaTask)
Method: getTaskResult
Endpoint: https://api.2captcha.com/getTaskResult
json
{
"errorId": 0,
"status": "ready",
"solution": {
"coordinates": [
{"x": 57, "y": 82},
{"x": 239, "y": 75},
{"x": 138, "y": 113},
{"x": 154, "y": 42},
{"x": 230, "y": 155}
]
}
}
Always pass
imgInstructions— without it, the worker may misunderstand the task. Thecommentparameter helps clarify the action order, especially if the instruction on the image is not obvious.
Task specification: PazlCaptchaTask (Kaleidoscope)
| Property | Type | Required | Description |
|---|---|---|---|
| type | String | Yes | Task type: PazlCaptchaTask |
| image | String | Yes | Main captcha image in Base64 format, 320×180 |
| task | String | Yes | Puzzle steps, as a JSON-stringified array (e.g. "[15,24,4,13,10,...]") |
Request example (PazlCaptchaTask)
Method: createTask
Endpoint: https://api.2captcha.com/createTask
json
{
"clientKey": "YOUR_API_KEY",
"task": {
"type": "PazlCaptchaTask",
"image": "BASE64_IMAGE",
"task": "[15,24,4,13,10,...]"
}
}
Response example (PazlCaptchaTask)
Method: getTaskResult
Endpoint: https://api.2captcha.com/getTaskResult
json
{
"errorId": 0,
"status": "ready",
"solution": "8",
"cost": "0.0012",
"ip": "1.2.3.4",
"createTime": 1692863536,
"endTime": 1692863556,
"solveCount": 1
}
solution is a string containing the number of clicks on the slider arrow needed to solve the captcha.