Solve Geetest v4

Logo of Capsolver

CapSolver Blogger

How to use capsolver

17-May-2023

Solveing Geetest v4 CAPTCHA

Capsolver now supports the latest version of Geetest's CAPTCHA, v4. The CAPTCHA challenge remains quite similar to the previous version, requiring the user to move a slider to solve a puzzle. We've introduced a new method in our API that allows you to solve the CAPTCHA challenge automatically.

Collect the captcha parameters

To successfully solve the captcha, you'll need to gather a few values:

  • websiteURL - The URL of the website using Geetest (for example, https://geetest.com).
  • captchaId - The unique ID of the CAPTCHA on the website or page.
  • geetestApiServerSubdomain - Special API subdomain (optional).
  • proxy - This is required if you use the GeeTestTask type.

You can find the captchaId value in the HTML source of the page inside the <script> tag that includes the Geetest JavaScript code on the page.

Interact with our API

Submit a POST request to the https://api.capsolver.com/createTask endpoint of our API with the following JSON payload:

{
  "clientKey": "YOUR_API_KEY",
  "task": {
    "type": "GeeTestTask",
    "websiteURL": "http://mywebsite.com/geetest/test.php",
    "captchaId": "c8057b071d833a13502a172c38a0044e",
    "geetestApiServerSubdomain": "api-na.geetest.com",
    "proxy": ""
  }
}

Use the getTaskResult method to retrieve the result. Depending on the system load, you'll receive the result within an interval of 3 to 10 seconds. Once the CAPTCHA is solved, you'll receive a response in JSON format:

{
  "errorId": 0,
  "taskId": "e0ecaaa8-06f6-41fd-a02e-a0c79b957b15",
  "status": "ready",
  "solution": {
    "captcha_id": "c8057b071d833a13502a172c38a0044e",
    "captcha_output": "sW8mpqWPdtBwV4_GvgZZoTSnsoD...",
    "gen_time": "1671687196",
    "lot_number": "e5656ce24adf4ae58a5bf3f7bc847794",
    "pass_token": "09dd5cbebdd738d78b3287346003c8d5cec255b97b074ed64d9009345d3eac4a",
    "risk_type": "slide"
  }
}

your target website. The best way to do this is to observe how the data is sent when you solve the captcha manually. Then, you can replicate the same process, replacing the request content with the data received from our API.

Solve Geetest v4 with Python

If you prefer using our Python SDK, you can easily interact with our API using the following code:

#pip install --upgrade capsolver
#export CAPSOLVER_API_KEY='...'

import capsolver
# capsolver.api_key = "..."
# v4
solution = capsolver.solve({
        "type":"GeeTestTaskProxyLess",
        "websiteURL":"http://mywebsite.com/geetest/test.php", 
        "captchaId": "c8057b071d833a13502a172c38a0044e", 
        "geetestApiServerSubdomain":"api-na.geetest.com",
        "proxy":""
})

Pricing

For information on pricing, please visit our pricing page.

More Information of how to solve Geetest v3 / v4

Visit this page

Capsolver Team 💜

More