Skip to main content

Util::AntiGate - CAPTCHA recognition via the AntiGate service

Scraper overview

antigate

This scraper is usually used as a plug-in component in other scrapers where it may be necessary to solve image captchas, for example: SE::YandexSE::Yandex, Check::RosKomNadzorCheck::RosKomNadzor, as well as 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 solving depends only on the solving service and sometimes on the captcha settings.

The process of connecting and configuring this scraper is described in detail in the Anti-captcha settings article.

Scraper use cases

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 options

  • Captcha recognition in built-in scrapers where captcha solving is optional or mandatory to obtain results
  • Captcha recognition in custom JS scrapers
  • 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

ParameterDefault valueDescription
ProviderAntiCaptchaChoice of solving service, automatically sets the correct service address (url)
Provider urlSolving service domain, allows overriding the service domain, can be empty
Client keyService access key
HTTP errors retries5Number of attempts to recognize captcha in case of network failures
HTTP timeout60server response timeout in seconds
Wait between get status5Delay between polling the antigate service about the captcha status
Max wait time300Maximum waiting time for a recognized captcha
NO_SLOT_AVAILABLE retries5Number of attempts to upload captcha to the anti-captcha service if the service reports overload
NO_SLOT_AVAILABLE interval2Wait 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 digits. 2 = Captcha has no digits
Param "calc"00 = default value. 1 = mathematical action from digits on the captcha
Param "min_len"00 = default value. >0 = minimum captcha text length that the worker must enter
Param "max_len"00 = default value (unlimited). >0 = maximum captcha text length that the worker must enter
Param "is_russian"00 = default value. 1 = show captcha to a worker with knowledge of the Russian language
Fake answerFake answer, does not use the service but immediately returns a random string as an answer, used for testing scrapers
Report bad captchasIf the option is disabled, time spent checking the captcha correctness request will be saved. Relevant for CapMonster and XEvil
Log captcha imagesManage captcha image output to the log
Stop task on zero balanceStop the task if the solving service balance runs out of funds