Captcha bypass tutorials

Was this helpful?

How to bypass and solve GeeTest v4 captcha automatically

Kate Push

Technical engineer

Introduction

If you are automating interactions with websites protected by GeeTest version 4 captcha, this guide will help you set up integration with the 2Captcha service.

GeeTest V4 is a modern protection system that uses interactive tasks and behavioral analysis. Unlike version 3, V4 does not require extracting the dynamic challenge parameter, which simplifies request preparation and improves solving stability.

In this article, we will cover both methods of sending tasks: without proxy (GeeTestTaskProxyless) and with proxy (GeeTestTask), and show current JSON request examples.

General Information

What Is GeeTest V4

GeeTest V4 is an evolution of the popular captcha that combines visual tasks with user behavior analysis. Key features of version 4:

  • Simplified integration: no need to extract challenge
  • Static captcha_id identifier for each website
  • Returns a set of tokens: lot_number, pass_token, gen_time, captcha_output
  • Supports both proxyless and proxy modes

Task Types in 2Captcha API

Task Type Description When to Use
GeeTestTaskProxyless Solving via 2Captcha internal proxies If the site does not block data centers and does not require residential IPs
GeeTestTask Solving with your own proxy If the site checks geolocation, blocks cloud IPs, or requires sessions

GeeTest V4 Task Parameters

Parameter Type Required Description
type String Yes GeeTestTaskProxyless or GeeTestTask
websiteURL String Yes Full URL of the page where the captcha loads
version Integer Yes Must be set to 4 for GeeTest V4
initParameters Object Yes Parameters from initGeetest4, must contain captcha_id
proxyType String No* Proxy type: http, https, socks4, socks5 (only for GeeTestTask)
proxyAddress String No* Proxy IP address (only for GeeTestTask)
proxyPort String No* Proxy port (only for GeeTestTask)
proxyLogin String No* Proxy login if authentication is required
proxyPassword String No* Proxy password if authentication is required

* Required only when using GeeTestTask task type

Environment Setup

Request Requirements

To work with the 2Captcha API, you will need:

  • API key from your account dashboard at 2captcha.cn
  • HTTPS client for sending POST requests (curl, Postman, or a library in your language)
  • Valid captcha_id from the target site
  • Full page URL where the captcha is displayed

Getting Your API Key

  1. Log in to your 2Captcha account dashboard
  2. Go to the account settings section
  3. Copy your clientKey (API key)
  4. For security, store the key in an environment variable, not in your code

Page Analysis

Finding the captcha_id

For GeeTest V4, the captcha_id parameter is static and usually contained in the page source code.

Method 1: via DevTools

  1. Open the target page in your browser
  2. Press F12 to open developer tools
  3. Go to the Elements tab
  4. Find the element with the data-geetest attribute or the initGeetest4 call

Example HTML:

html Copy
<div id="geetest-captcha" data-geetest="e392e1d7fd421dc63325744d5a2b9c73"></div>

The attribute value is your captcha_id.

Method 2: via Network Tab

  1. In DevTools, go to the Network tab
  2. Refresh the page with the captcha
  3. Filter requests by geetest or captcha
  4. Find the request to gcaptcha4.geetest.com/load, the captcha_id parameter will be in the response or request parameters

Checking the websiteURL

Make sure you specify the full page URL, including the protocol:

  • Correct: https://2captcha.com/demo/geetest-v4
  • Incorrect: 2captcha.com/demo/geetest-v4 or /demo/geetest-v4

Implementation

Example Request: GeeTestTaskProxyless (without proxy)

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

json Copy
{
  "clientKey": "YOUR_API_KEY",
  "task": {
    "type": "GeeTestTaskProxyless",
    "websiteURL": "https://2captcha.com/demo/geetest-v4",
    "version": 4,
    "initParameters": {
      "captcha_id": "e392e1d7fd421dc63325744d5a2b9c73"
    }
  }
}

Example Request: GeeTestTask (with proxy)

json Copy
{
  "clientKey": "YOUR_API_KEY",
  "task": {
    "type": "GeeTestTask",
    "websiteURL": "https://2captcha.com/demo/geetest-v4",
    "version": 4,
    "initParameters": {
      "captcha_id": "e392e1d7fd421dc63325744d5a2b9c73"
    },
    "proxyType": "http",
    "proxyAddress": "1.2.3.4",
    "proxyPort": "8080",
    "proxyLogin": "user23",
    "proxyPassword": "p4$w0rd"
  }
}

Getting the Result

After creating the task, use the getTaskResult method to get the solution.

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

Request:

json Copy
{
  "clientKey": "YOUR_API_KEY",
  "taskId": 74455221488
}

Successful Response:

json Copy
{
  "errorId": 0,
  "status": "ready",
  "solution": {
    "captcha_id": "e392e1d7fd421dc63325744d5a2b9c73",
    "lot_number": "e6c3bed2854f41f880662c48afff5dcb",
    "pass_token": "fad5eb52fc83bf7617402fcccfb211a21e0aa1d1044",
    "gen_time": "1693924478",
    "captcha_output": "fN36ufW6cQN4SQ-JRDQC70nSq9UcQBg=="
  },
  "cost": "0.00299",
  "ip": "1.2.3.4",
  "createTime": 1692863536,
  "endTime": 1692863556,
  "solveCount": 1
}

Using the Solution on the Target Site

You need to send the received parameters to the target site in the same format that the original form expects. Usually this includes:

  • lot_number
  • pass_token
  • gen_time
  • captcha_output

These values are often passed in the POST request body or in headers. Intercept the original request via DevTools (Network tab) and reproduce it with the received tokens.

Handling API Errors

If errorId in the response is not 0, check the errorDescription field:

json Copy
{
  "errorId": 1,
  "errorCode": "ERROR_WRONG_USER_KEY",
  "errorDescription": "You've provided an invalid API key"
}

Common error codes:

Error Code Description Solution
ERROR_WRONG_USER_KEY Invalid API key Check your clientKey in the account dashboard
ERROR_ZERO_BALANCE Insufficient funds Top up your account balance
ERROR_BAD_PARAMETERS Invalid task parameters Check the format of captcha_id, websiteURL, version
ERROR_PROXY_CONNECT_REFUSED Could not connect to proxy Check proxy credentials and availability
ERROR_CAPTCHA_UNSOLVABLE Captcha cannot be solved Make sure captcha_id is current and the page is accessible

Additional Resources

Checklist

  • API key obtained and verified from 2Captcha account dashboard
  • Current captcha_id extracted from the target site source code
  • Full websiteURL specified with https:// protocol
  • Parameter "version": 4 set for GeeTest V4
  • initParameters object contains the captcha_id key
  • When using proxy, all fields checked: type, address, port, login, password
  • Error handling added for errorId and errorCode codes
  • Sending the received solution to the target site tested
  • Logging of requests and responses configured for debugging

Conclusion

GeeTest V4 offers simpler integration compared to the previous version: you do not need to extract the dynamic challenge, a static captcha_id and the full page URL are enough.

The 2Captcha service supports two solving methods: GeeTestTaskProxyless for a quick start and GeeTestTask for cases where proxy control is required. Both methods return the same set of tokens: lot_number, pass_token, gen_time, captcha_output, which must be passed to the target site for verification.

Integration with 2Captcha allows you to delegate the complex part of bypassing captchas to a specialized service, focusing your efforts on your application logic. By following the parameters in this guide, you will be able to reliably solve GeeTest V4 on any website.