HCaptchaTask: solve HCaptcha via a proxy

hCaptcha devs call their captcha “a drop-in replacement for Recaptcha”. We tried to create the same thing in our API, so task properties are absolutely the same as in RecaptchaV2Task except for the “type” property.

IMPORTANT: hCaptcha seems to have a limit on solved tasks from one IP: about 3 items per 12 hours. Take this into account when you build the solving process through your proxy.

hCaptcha example

Task object

PropertyTypeRequiredPurpose
typeStringYesHCaptchaTask
websiteURLStringYesAddress of a target web page. Can be located anywhere on the web site, even in a member area. Our workers don’t navigate there but simulate the visit instead.
websiteKeyStringYeshCaptcha sitekey
proxyTypeStringYesType of proxy
http – usual http/https proxy
socks4 – socks4 proxy
socks5 – socks5 proxy
proxyAddressStringYesProxy IP address ipv4/ipv6. No host names or IP addresses from local networks.
proxyPortIntegerYesProxy port
proxyLoginStringNoLogin for proxy which requires authorization (basic)
proxyPasswordStringNoProxy password
userAgentStringYesBrowser’s User-Agent used in emulation. You must use a modern-browser signature; otherwise, Google will ask you to “update your browser”.

Request example

curl -i -H "Accept: application/json" \
     -H "Content-Type: application/json" \
     -X POST -d '{
    "clientKey":"YOUR_API_KEY",
    "task":
        {
            "type":"HCaptchaTask",
            "websiteURL":"https://hcaptcha.com/",
            "websiteKey":"00000000-0000-0000-0000-000000000000",
            "proxyType":"http",
            "proxyAddress":"8.8.8.8",
            "proxyPort":8080,
            "proxyLogin":"proxyLoginHere",
            "proxyPassword":"proxyPasswordHere",
            "userAgent":"MODERN_USER_AGENT_HERE"
        }
}' https://api.ocrdatasolutions.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 the worker about 5 seconds before making your first request. If the worker is still busy, retry in 3 seconds.

Task solution object

PropertyTypePurpose
gRecaptchaResponseStringToken string required for interacting with the submit form on the target website.

Response example

{
    "errorId":0,
    "status":"ready",
    "solution":
    {
        "gRecaptchaResponse":"3AHJ_VuvYIBNBW5yyv0zRYJ75VkOKvhKj9_xGBJKnQimF72rfoq3Iy-DyGHMwLAo6a3"
    },
    "cost":"0.001500",
    "ip":"46.98.54.221",
    "createTime":1472205564,
    "endTime":1472205570,
    "solveCount":"0"
}