Skip to main content

Util::AntiGate - captcha recognition via AntiGate service

Util::AntiGate parser overview


This parser is usually used as a connectable component in other parsers where it may be necessary to solve image captchas, for example: SE::YandexSE::Yandex, Check::RosKomNadzorCheck::RosKomNadzor, as well as custom JavaScript parsers.

The principle of operation of this parser is to send the captcha image to the solving service and receive a text value in response, which is shown on the captcha. The correctness of solving depends only 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 AntiGate setup

Util::AntiGate use cases

Parsing Yandex

Get Yandex search results and the position number of the result

Captcha in JS parsers

Example of a JS parser for working with captchas


  • Supports working with all AntiGate-compatible services: AntiCaptcha, RuCaptcha, 2captcha, XEvil, CapMonster,, CapSolver,, etc.
  • Ability to flexibly configure the response waiting time, captcha parameters and notify the solving service about the incorrectly solved captcha.

Usage options

  • Captcha recognition in built-in parsers, where it is optional or mandatory to solve captchas to get results
  • Captcha recognition in your own JS parsers
  • Recognition of small text data from images (for example, phones)


The request must specify a link to the captcha, for example:


The recognized text will be output as a result:


Possible results

  • $answer - captcha response
  • $error - if an error occurred, its description

Possible settings

ParameterDefault valueDescription
AntiGate Domainantigate.comSolving service domain, allows you to specify the domain of the service that supports the Antigate API
Key-Access key to the service
HTTP errors retries5Number of attempts to solve the captcha in case of network failures
HTTP timeout60server response timeout in seconds
Wait between get status5Delay between polling the anti-gate service about the captcha status
Max wait time300Maximum waiting time for the solved captcha
NO_SLOT_AVAILABLE retries5Number of attempts to upload the captcha to the anti-captcha service if the service issues a message about overload
NO_SLOT_AVAILABLE interval2Waiting interval between attempts in seconds
Param "phrase"00 = default value (one word). 1 = captcha has two words
Param "regsense"00 = default value (case insensitive). 1 = case sensitive
Param "numeric"00 = default value. 1 = captcha consists only of numbers. 2 = Captcha has no numbers
Param "calc"00 = default value. 1 = mathematical operation from numbers on the captcha
Param "min_len"00 = default value. >0 = minimum length of text on the captcha that the worker must enter
Param "max_len"00 = default value (unlimited). >0 = maximum length of text on the captcha that the worker must enter
Param "is_russian"00 = default value. 1 = show the captcha to the worker with knowledge of the Russian language
Fake answerFalse answer, does not use the service and immediately returns a random string as an answer, used for testing parsers
Report bad captchasIf the option is disabled, the time spent on checking the correctness of the captcha request will be saved. Relevant for CapMonster and XEvil