Cutcaptcha

Cutcaptcha

Token-based method to bypass Cutcaptcha.

The token received must be set as the value attribute of the input#cap_token element and/or passed to the callback function.

Task types

  • CutCaptchaTaskProxyless - we use our own pool of proxies
  • CutCaptchaTask - we use your proxies

CutCaptchaTaskProxyless task type specification

Property Type Required Description
type String Yes Task type:
CutCaptchaTaskProxyless
CutCaptchaTask
websiteURL String Yes The full URL of target web page where the captcha is loaded. We do not open the page, not a problem if it is available only for authenticated users
miseryKey String Yes The value of CUTCAPTCHA_MISERY_KEY variable defined on page.
apiKey String Yes The value of data-apikey attribute of iframe's body. Also the name of javascript file included on the page

CutCaptchaTask task type specification

CutCaptchaTask extends CutCaptchaTaskProxyless adding a set of proxy-related parameters listed below

Property Type Required Description
proxyType String Yes Proxy type:
http
socks4
socks5
proxyAddress String Yes Proxy IP address or hostname
proxyPort Integer Yes Proxy port
proxyLogin String No Login for basic authentication on the proxy
proxyPassword String No Password for basic authentication on the proxy

Request examples

Method: createTask
API endpoint: https://api.2captcha.com/createTask

CutCaptchaTaskProxyless

{
    "clientKey": "YOUR_API_KEY",
    "task": {
        "type": "CutCaptchaTaskProxyless",
        "miseryKey": "a1488b66da00bf332a1488993a5443c79047e752",
        "apiKey": "SAb83IIB",
        "websiteURL": "https://example.cc/foo/bar.html"
    }
}

CutCaptchaTask

{
    "clientKey": "YOUR_API_KEY",
    "task": {
        "type": "CutCaptchaTask",
        "miseryKey": "a1488b66da00bf332a1488993a5443c79047e752",
        "apiKey": "SAb83IIB",
        "websiteURL": "https://example.cc/foo/bar.html",
        "proxyType": "http",
        "proxyAddress": "1.2.3.4",
        "proxyPort": "8080",
        "proxyLogin": "user23",
        "proxyPassword": "p4$w0rd"
    }
}

Response example

Method: getTaskResult
API endpoint: https://api.2captcha.com/getTaskResult

{
    "errorId": 0,
    "status": "ready",
    "solution": {
        "token": "BazM23cpFUUyAAAdqPwNEDZx0REtH3ss"
    },
    "cost": "0.00299",
    "ip": "1.2.3.4",
    "createTime": 1692863536,
    "endTime": 1692863556,
    "solveCount": 1
}

Using the token

Use the returned token as a value for input with id = cap_token, then submit it's parent form, for example:

document.querySelector('input#cap_token').value='BazM23cpFUUyAAAdqPwNEDZx0REtH3ss'
document.querySelector('form').submit()

If there's a callback function defined, you can call it passing the token as argument:

capResponseCallback('BazM23cpFUUyAAAdqPwNEDZx0REtH3ss')