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

This scraper is typically used as a plug-in component in other scrapers where image captcha solving may be required, for example:
SE::Yandex,
Check::RosKomNadzor, as well as in custom JavaScript scrapers.
The principle of this scraper 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 scraper is described in detail in the article Anti-captcha settings
Scraper use cases
🔗 Yandex Scraping
Retrieving Yandex search results and the result position number
🔗 Captcha in JS scrapers
Example of a JS scraper for working with captchas
Features
- 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
Usage scenarios
- Captcha recognition in built-in scrapers, where solving captchas is optionally or mandatory to obtain results
- Captcha recognition in custom JS scrapers
- Recognition of small text data from images (e.g., phone numbers)
Queries
You must specify a link to the captcha as a query, for example:
https://files.a-parser.com/img/get-captcha-image.png
Output results examples
$answer- captcha answer$error- if an error occurred, its description
Outputting recognized text
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 for captcha status |
| Max wait time | 300 | Maximum waiting time for a recognized captcha |
| NO_SLOT_AVAILABLE retries | 5 | Number of attempts to upload the captcha to the anti-captcha 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 scrapers |
| Report bad captchas | ☐ | If the option is disabled, time spent checking the captcha correctness request will be saved. Relevant for CapMonster and XEvil |
| Log captcha images | ☐ | Managing the output of captcha images to the log |
| Stop task on zero balance | ☑ | Stop the task if the solving service balance runs out of funds |