RecaptchaV2Task : Google Recaptcha puzzle with proxy

* Previous task name: NoCaptchaTask. We will continue supporting old task name forever, no need to update your code.

This object of type Task contains data required to solve Google Recaptcha on a worker's computer. To provide solid universality for solving this type of task we have reproduce every piece of environment used for an automation task you plan to complete. This includes:

  • proxy access
  • browser's user-agent
  • (optionally) cookies

This approach will eliminate all possible obstacles which Google might implement in the future. 

Our system is build in a way that worker's browser doesn't have access to your proxy servers, cookies, etc. These data is stored on our server and gets removed right after task completion. Worker's computer interacts only with our servers.

Before performing this type of task our proxy checker might check your proxy parameters for validity by making a test request. If this test request fails, your task will be marked with ERROR_PROXY_TIMEOUT error and will be canceled.

This type of captcha might be solved a bit longer than usual image captcha, but this issue is compensated by the fact that g-captcha-response value we send to you is valid for the next 120 seconds after a worker solves your Recaptcha.

captcha example


Object structure

Property
Type
Required
Value
typeStringYesRecaptchaV2Task
websiteURLStringYesAddress of target web page
websiteKeyStringYesRecaptcha website key
<div class="g-recaptchadata-sitekey="THAT_ONE"></div> 
Learn how to retrieve it when it is not included in HTML.
websiteSTokenStringNo

Secret token for previous version of Recaptcha (now deprecated). In most cases websites use newer version and this token is not required.

recaptchaDataSValueStringNoSome custom implementations may contain additional "data-s" parameter in Recaptcha div, which is in fact a one-time token and must be grabbed every time you want to solve a Recaptcha.
<div class="g-recaptchadata-sitekey="some sitekey" data-s="THIS_ONE"></div>
If you're solving Recaptcha at google.com websites and using browser-less approach, then use "cookies" in getTaskResult response.
proxyTypeStringYes

Type of the proxy

http - usual http/https proxy
https - try this only if "http" doesn't work (required by some custom proxy servers)
socks4 - socks4 proxy
socks5 - socks5 proxy

proxyAddressStringYes

Proxy IP address ipv4/ipv6. Not allowed to use:

  • host names instead of IPs
  • transparent proxies (where client IP is visible)
  • proxies from local networks (192.., 10.., 127...)
proxyPortIntegerYesProxy port
proxyLoginStringNoLogin for proxy which requires authorizaiton (basic)
proxyPasswordStringNoProxy password
userAgentStringYesBrowser's User-Agent which is used in emulation. It is required that you use a signature of a modern browser,
otherwise Google will ask you to "update your browser".
cookiesStringNo

Additional cookies which we must use during interaction with target page or Google.

Format: cookiename1=cookievalue1; cookiename2=cookievalue2

isInvisibleBooleanNoSpecify if Recaptcha is invisible. This will render an appropriate widget for our workers.
Note that this parameter is not required, as system detects invisible sitekeys automatically, but needs several 10s of recaptchas for automated training and analysis.


Request example

Address https://api.anti-captcha.com/createTask

Response: 

Grab the result

Use method getTaskResult to request solution. Give worker a time like 10 seconds before requesting it.

Property

Type

Description

gRecaptchaResponseStringHash string which is required for interacting with submit form on target website. It looks like this:
<textarea id="g-recaptcha-response" ..></textarea>
cookiesArray

Optional array of cookies which were used for Recaptcha solving.
Applicable only for google.com domains and subdomains.

gRecaptchaResponseMD5StringControl sum of gRecaptchaResponse value in MD5. It may present in API output only while sending isExtended proprety with true value in getTaskResult method.
This property is made for specially for debugging, just to make sure your application receives exact google hash.

Example output of getTaskResult:

With Google cookies: