Yidun

Yidun

A token-based method for bypassing Yidun NECaptcha.

Task Types

  • YidunTaskProxyless - we use our own proxy pool to solve captchas
  • YidunTask - we use the proxy you provide

Specification for YidunTaskProxyless Task Type

Property Type Required Description
type String Yes Task type:
YidunTaskProxyless
YidunTask
websiteURL String Yes Full URL of the target web page where the captcha loads
websiteKey String Yes Value of the id or sitekey parameter in the site's source code
userAgent String No Browser User-Agent used to open the page
yidunGetLib String No Full URL of the JavaScript file that loads the captcha. Recommended for Enterprise version
yidunApiServerSubdomain String No Yidun API server subdomain without the https:// prefix. Specify if using a custom server
challenge String No Dynamic challenge parameter from network requests
hcg String No Captcha hash, used when forming the request
hct Number No Numeric timestamp identifier for Enterprise version validation

Specification for YidunTask Task Type

The YidunTask task extends YidunTaskProxyless, 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 server IP address or hostname
proxyPort Number Yes Proxy server port
proxyLogin String No Login for proxy server authentication
proxyPassword String No Password for proxy server authentication

Request Examples

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

YidunTaskProxyless Request Example

json Copy
{
    "clientKey": "YOUR_API_KEY",
    "task": {
        "type": "YidunTaskProxyless",
        "websiteURL": "https://example.com/page-with-yidun",
        "websiteKey": "0f743r3g1g...rz3grz0ym5",
        "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36"
    }
}

Request Example with Enterprise Version Parameters

json Copy
{
    "clientKey": "YOUR_API_KEY",
    "task": {
        "type": "YidunTaskProxyless",
        "websiteURL": "https://example.com/page-with-yidun",
        "websiteKey": "0f743r3g1...rz3grz0ym5",
        "yidunGetLib": "https://example.com/yidun/load.min.js",
        "yidunApiServerSubdomain": "c.dun.163.com",
        "challenge": "0c59ba0da6e95...e3961a7b141fb1d",
        "hcg": "2c78a773...d7041f98228b28",
        "hct": 1779358333191
    }
}

YidunTask Request Example with Proxy

json Copy
{
    "clientKey": "YOUR_API_KEY",
    "task": {
        "type": "YidunTask",
        "websiteURL": "https://example.com/page-with-yidun",
        "websiteKey": "0f743r3...0ym5",
        "proxyType": "http",
        "proxyAddress": "1.2.3.4",
        "proxyPort": 8080,
        "proxyLogin": "login",
        "proxyPassword": "password"
    }
}

Response Example

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

json Copy
{
    "errorId": 0,
    "status": "ready",
    "solution": {
        "token": "D19scz7n4VCU7b_...fRyEY-tXQ0cmS6laRKp_tZEyei_EUzc5M1IW0oxUHnZ4fBMH2a0jMPjOReiHVWBgkrcRYaOkQRasHlFejEToe7HZJy2jaGkxiB9b"
    },
    "cost": "0.003",
    "ip": "1.2.3.4",
    "createTime": 1692863536,
    "endTime": 1692863556,
    "solveCount": 1
}

How to Find the Required Parameters

  1. Open Developer Tools and go to the Network tab.
  2. Trigger the captcha on the page.
  3. Find a request that starts with get?referer= or check?referer=.
  4. The referer value is your websiteURL. If it's encoded, decode it first.
  5. The id value in that request is your websiteKey.
  6. If you see challenge, hcg, or hct parameters in requests like cscPreprocess?reflushCode=, you're dealing with the Enterprise version. Include these in your task along with yidunGetLib and yidunApiServerSubdomain.

Tip: The challenge, hcg, and hct parameters change dynamically. Pull them right before you submit your task, or the solution might not work.