Documentation menu

GeeTestTask: solve captcha from geetest.com with proxy

This type of task solves GeeTest captcha in our workers browsers. Your app submits website address, gt key, challenge key and after task completion receives a solution consisting of 3 tokens.

Examples

Task object

Property Type Required Purpose
type String Yes GeeTestTask
websiteURL String Yes Address of a target web page. Can be located anywhere at the web site, even in a member area. Our workers don't navigate there, but instead simulate the visit.
gt String Yes The domain public key, rarely updated.
challenge String Yes Changing token key. Make sure to grab fresh one for each captcha, otherwise you will be charged for error task.
geetestApiServerSubdomain String No Optional API subdomain. May be required for some implementations.
geetestGetLib String No Required for some implementations. Send the JSON encoded into a string. The value can be traced in browser developer tools. Put a breakpoint before call of the "initGeetest" function.
proxyType String Yes Type of the proxy
http - usual http/https proxy
socks4 - socks4 proxy
socks5 - socks5 proxy
proxyAddress String Yes Proxy IP address ipv4/ipv6. No host names or IP addresses from local networks.
proxyPort Integer Yes Proxy port
proxyLogin String No Login for proxy which requires authorization (basic)
proxyPassword String No Proxy password
userAgent String Yes Browser'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".

Request example

CURL
          curl -i -H "Accept: application/json" \
     -H "Content-Type: application/json" \
     -X POST -d '{
    "clientKey":"YOUR_API_KEY",
    "task":
        {
            "type":"GeeTestTask",
            "websiteURL":"http://mywebsite.com/geetest/test.php",
            "gt":"874703612e5cac182812a00e273aad0d",
            "challenge":"a559b82bca2c500101a1c8a4f4204742",
            "proxyType":"http",
            "proxyAddress":"8.8.8.8",
            "proxyPort":8080,
            "proxyLogin":"proxyLoginHere",
            "proxyPassword":"proxyPasswordHere",
            "userAgent":"MODERN_USER_AGENT_HERE"
        }
}' https://api.anti-captcha.com/createTask
        

Response example

JSON with no errors
          {
    "errorId": 0,
    "taskId": 7654321
}
        
JSON with an error
          {
    "errorId": 1,
    "errorCode": "ERROR_KEY_DOES_NOT_EXIST",
    "errorDescription": "Account authorization key not found in the system"
}
        

Retrieve the solution

Use method getTaskResult to request the solution. Give a worker some time, like 5 seconds, before making first request. If the worker is still busy, retry in 3 seconds.

Task solution object

Property Type Purpose
challenge String Hash string which is required for interacting with submit form on target website.
validate String Hash string which is required too.
seccode String Another required hash string, we have no idea why there are 3 of them.

Response example

JSON with no errors
          {
    "errorId":0,
    "status":"ready",
    "solution":
    {
        "challenge":"3c1c5153aa48011e92883aed820069f3hj",
        "validate":"47ad5a0a6eb98a95b2bcd9e9eecc8272",
        "seccode":"83fa4f2d23005fc91c3a015a1613f803|jordan"
    },
    "cost":"0.001500",
    "ip":"46.98.54.221",
    "createTime":1472205564,
    "endTime":1472205570,
    "solveCount":"0"
}
        

Token usage example