Util::AntiGate - captcha recognition via the AntiGate service
Parser overview

This parser is typically used as a plug-in component in other parsers where it may be necessary to solve image-based captchas, for example:
SE::Yandex,
Check::RosKomNadzor, as well as in custom JavaScript parsers.
The principle of this parser's operation is to send a captcha image to a solving service and receive the text value shown on the captcha in response. The accuracy of the solving depends solely on the solving service and sometimes on the captcha settings.
The process of connecting and configuring this parser is described in detail in the article Anticaptcha settings
Parser use cases
🔗 Yandex Parsing
Retrieving Yandex search results and the result position number
🔗 Captcha in JS parsers
Example of a JS parser for working with captchas
Capabilities
- Supports all AntiGate-compatible services: AntiCaptcha, RuCaptcha, 2captcha, XEvil, CapMonster, CapMonster.cloud, CapSolver, captchas.io, ApiBar, etc.
- Ability to flexibly configure response timeout, captcha parameters, and notify the solving service about an incorrectly solved captcha
Use cases
- Captcha recognition in built-in parsers where solving captchas is optionally or mandatory to obtain results
- Captcha recognition in custom JS parsers
- Recognition of small text data from images (e.g., phone numbers)
Queries
A link to the captcha must be specified as a query, example:
https://files.a-parser.com/img/get-captcha-image.png
Output results examples
$answer- captcha answer$error- if an error occurred, its description
Recognized text output
Result format:
$answer
Result example:
332822
Possible settings
| Parameter | Default value | Description |
|---|---|---|
| Provider | AntiCaptcha | Solving service selection, automatically sets the correct service address (url) |
| Provider url | Solving service domain, allows overriding the service domain, can be empty | |
| Client key | Service access key | |
| HTTP errors retries | 5 | Number of attempts to recognize the captcha in case of network failures |
| HTTP timeout | 60 | server response timeout in seconds |
| Wait between get status | 5 | Delay between polling the antigate service about the captcha status |
| Max wait time | 300 | Maximum wait time for a recognized captcha |
| NO_SLOT_AVAILABLE retries | 5 | Number of attempts to upload a captcha to the anticaptcha service if the service reports an overload |
| NO_SLOT_AVAILABLE interval | 2 | Wait interval between attempts in seconds |
| Param "phrase" | 0 | 0 = default value (one word). 1 = captcha has two words |
| Param "regsense" | 0 | 0 = default value (case-insensitive). 1 = case-sensitive |
| Param "numeric" | 0 | 0 = default value. 1 = captcha consists only of digits. 2 = Captcha has no digits |
| Param "calc" | 0 | 0 = default value. 1 = mathematical operation with digits on the captcha |
| Param "min_len" | 0 | 0 = default value. >0 = minimum text length on the captcha that the worker must enter |
| Param "max_len" | 0 | 0 = default value (unlimited). >0 = maximum text length on the captcha that the worker must enter |
| Param "is_russian" | 0 | 0 = default value. 1 = show captcha to a worker with knowledge of the Russian language |
| Fake answer | ☐ | Fake answer, does not use the service but immediately returns a random string as an answer, used for testing parsers |
| Report bad captchas | ☐ | If the option is disabled, time spent on checking the captcha correctness request will be saved. Relevant for CapMonster and XEvil |
| Log captcha images | ☐ | Management of captcha image output to the log |
| Stop task on zero balance | ☑ | Stop the task if the solving service balance runs out of funds |