Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.





Example output of getTaskResult:

Code Block
themeMidnight
{
    "gRecaptchaResponse":"3AHJ_VuvYIBNBW5yyv0zRYJ75VkOKvhKj9_xGBJKnQimF72rfoq3Iy-DyGHMwLAo6a3"
}

With Google cookies:

Code Block
themeMidnight
{ "gRecaptchaResponse":"3AHJ_VuvYIBNBW5yyv0zRYJ75VkOKvhKj9_xGBJKnQimF72rfoq3Iy-DyGHMwLAo6a3", "cookies": { {"NID":"204=IVb1JejB0Jyh_ue6lhMAIJh1aZJRSgtSS_8yojbcjaD8nu7PSPE1lP1HE68y1t7CL0gP_LV4j1bMBTc-PYqPcd5sfKnZib5kv63fwss8h1hEEMqvyLCMAEn1g958ghuduaMNRtWU0X4JBf6qIW0omrWUr6nPs1tP5DuI8iH_-dU"} } }

ATTENTION

Documentation moved to a new place here.

Documentation at anticaptcha.atlassian.net is no longer updated and may be not actual.

* 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.

...

Image Removed

Image Removed

...

Object structure

...

Property

...

Type

...

Required

...

Value

...

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

Expand
titleMore information

Secret token is generated on Google server and inserted to web page every time a user visits the page. It looks something like this:

Code Block
<script type="text/javascript" src="...." data-type="normal"  data-ray="2ef1e98c77332d9b" async 
data-sitekey="6LfOYgoTAAAAAInWDVTLSc8Yblab-c9DaLblabla"
data-stoken="urFaI2UjzL9Q4gf4a-aeCNAePAZUuq7nYbX40BVb69aXVq-apf_k-kZ7i-iXE2WxkokWB9rZv-ofOJPjbEh4YN3SyoVrsIorNOpeGSWx2D0"></script>

Token is valid for a couple of minutes after generation, after that you need to grab it again from the page.

...

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

...

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...)

...

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

Format: cookiename1=cookievalue1; cookiename2=cookievalue2

...

Request example

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

Code Block
themeMidnight
{
    "clientKey":"dce6bcbb1a728ea8d871de6d169a2057",
    "task":
        {
            "type":"RecaptchaV2Task",
            "websiteURL":"http://mywebsite.com/recaptcha/test.php",
            "websiteKey":"6Lc_aCMTAAAAABx7u2N0D1XnVbI_v6ZdbM6rYf16",
            "proxyType":"http",
            "proxyAddress":"8.8.8.8",
            "proxyPort":8080,
            "proxyLogin":"proxyLoginHere",
            "proxyPassword":"proxyPasswordHere",
            "userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36"
        }
}

Response: 

Code Block
themeMidnight
{
    "errorId":0,
    "taskId":407533072
}

Grab the result

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

...

Property

...

Type

...

Description

...

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

...