Tutorials

GeeTest v3 Slider Parameter Extraction and Solving

GeeTest v3 slider CAPTCHAs require two parameters to solve: gt (a static site identifier) and challenge (a dynamic session token). This guide shows how to extract both from any page and submit them to CaptchaAI.


GeeTest v3 parameters explained

Parameter Description Static/Dynamic Example
gt Site identifier (32-char hex) Static per site 019924a82c70bb123aae90d483b6a0ed
challenge Session token (32-char hex) Dynamic per page load a3f5c8d2e1b04a6789012345678abcdf
api_server GeeTest API subdomain (optional) Static per site api-na.geetest.com

The gt value stays the same across requests. The challenge value changes every time the CAPTCHA loads — you must extract a fresh one for each solve attempt.


Method 1: Intercept the register API call

Most GeeTest v3 implementations fetch the challenge from a registration endpoint. The response looks like:

{
  "success": 1,
  "challenge": "a3f5c8d2e1b04a6789012345678abcdf",
  "gt": "019924a82c70bb123aae90d483b6a0ed",
  "new_captcha": true
}

Python (requests)

import requests
import re

session = requests.Session()
html = session.get("https://example.com/login").text

# Find the register endpoint
register_url = re.search(
    r'(https?://[^"\']+(?:register|captcha|geetest)[^"\']*)',
    html
)

if register_url:
    resp = session.get(register_url.group(1)).json()
    gt = resp["gt"]
    challenge = resp["challenge"]
    print(f"gt: {gt}")
    print(f"challenge: {challenge}")

JavaScript (Puppeteer network interception)

const puppeteer = require('puppeteer');

const browser = await puppeteer.launch();
const page = await browser.newPage();

let geetestParams = {};

page.on('response', async (response) => {
  const url = response.url();
  if (url.includes('register') || url.includes('captcha')) {
    try {
      const json = await response.json();
      if (json.gt && json.challenge) {
        geetestParams = {
          gt: json.gt,
          challenge: json.challenge,
        };
        console.log('Captured GeeTest params:', geetestParams);
      }
    } catch (e) {}
  }
});

await page.goto('https://example.com/login', { waitUntil: 'networkidle2' });
console.log('Final params:', geetestParams);

Method 2: Extract from page source

Some sites embed the parameters directly in HTML or inline scripts:

import re

# From data attributes
gt_match = re.search(r'data-gt=["\']([a-f0-9]{32})', html)
challenge_match = re.search(r'data-challenge=["\']([a-f0-9]{32})', html)

# From JavaScript variables
if not gt_match:
    gt_match = re.search(r'gt\s*[=:]\s*["\']([a-f0-9]{32})', html)
if not challenge_match:
    challenge_match = re.search(r'challenge\s*[=:]\s*["\']([a-f0-9]{32})', html)

gt = gt_match.group(1) if gt_match else None
challenge = challenge_match.group(1) if challenge_match else None
print(f"gt={gt}, challenge={challenge}")

Method 3: Hook initGeetest

GeeTest v3 initializes via initGeetest(). Intercept it before the page scripts run:

// Puppeteer: inject before page scripts
await page.evaluateOnNewDocument(() => {
  window.__geetestConfig = null;
  const origInit = window.initGeetest;

  Object.defineProperty(window, 'initGeetest', {
    set(fn) {
      this._initGeetest = function(config, callback) {
        window.__geetestConfig = config;
        console.log('GeeTest config:', JSON.stringify(config));
        return fn(config, callback);
      };
    },
    get() { return this._initGeetest; }
  });
});

await page.goto('https://example.com/login', { waitUntil: 'networkidle2' });

const config = await page.evaluate(() => window.__geetestConfig);
// config = { gt: "019924a...", challenge: "a3f5c8d...", product: "bind", ... }

Solving GeeTest v3 with CaptchaAI

Python

import requests
import time

API_KEY = "YOUR_API_KEY"

# Submit
resp = requests.post("https://ocr.captchaai.com/in.php", data={
    "key": API_KEY,
    "method": "geetest",
    "gt": gt,
    "challenge": challenge,
    "pageurl": "https://example.com/login",
    "json": "1",
}).json()

if resp["status"] != 1:
    raise Exception(f"Submit error: {resp['request']}")

task_id = resp["request"]

# Poll
for _ in range(30):
    time.sleep(5)
    result = requests.get("https://ocr.captchaai.com/res.php", params={
        "key": API_KEY, "action": "get", "id": task_id, "json": "1"
    }).json()

    if result["status"] == 1:
        solution = result["request"]
        print(f"Solution: {solution}")
        break
    if result["request"] != "CAPCHA_NOT_READY":
        raise Exception(f"Error: {result['request']}")

JavaScript

const submit = await axios.post('https://ocr.captchaai.com/in.php', null, {
  params: {
    key: 'YOUR_API_KEY',
    method: 'geetest',
    gt: geetestParams.gt,
    challenge: geetestParams.challenge,
    pageurl: 'https://example.com/login',
    json: 1,
  }
});
const taskId = submit.data.request;

let solution = null;
for (let i = 0; i < 30; i++) {
  await new Promise(r => setTimeout(r, 5000));
  const poll = await axios.get('https://ocr.captchaai.com/res.php', {
    params: { key: 'YOUR_API_KEY', action: 'get', id: taskId, json: 1 }
  });
  if (poll.data.status === 1) {
    solution = poll.data.request;
    break;
  }
}
console.log('Solution:', solution);

Injecting the GeeTest solution

The CaptchaAI response for GeeTest v3 includes challenge, validate, and seccode:

# solution is a pipe-delimited string or JSON object
# Parse and inject into the form
import json

sol = json.loads(solution) if isinstance(solution, str) else solution

driver.execute_script("""
    const form = document.querySelector('form');
    function addHidden(name, value) {
        let input = form.querySelector(`input[name="${name}"]`);
        if (!input) {
            input = document.createElement('input');
            input.type = 'hidden';
            input.name = name;
            form.appendChild(input);
        }
        input.value = value;
    }
    addHidden('geetest_challenge', arguments[0]);
    addHidden('geetest_validate', arguments[1]);
    addHidden('geetest_seccode', arguments[2]);
""", sol["challenge"], sol["validate"], sol["seccode"])

Troubleshooting

Problem Cause Fix
ERROR_BAD_PARAMETERS Missing gt or challenge Both are required; extract fresh values
Stale challenge Challenge token expired Extract a new challenge immediately before submitting
Wrong gt value Copied from different site gt is site-specific; re-extract from the target
Solution rejected by site Challenge expired during solve Reduce time between extraction and submission

FAQ

How long is a GeeTest challenge valid?

Typically 60-120 seconds. Extract the challenge and submit to CaptchaAI immediately.

What's the difference between GeeTest v3 and v4?

GeeTest v3 uses gt/challenge parameters and a slider. GeeTest v4 uses captcha_id and has multiple challenge types (click, match, slide).


Solve GeeTest v3 CAPTCHAs with CaptchaAI

Get your API key at captchaai.com.


Discussions (0)

No comments yet.

Related Posts

Integrations Selenium Wire + CaptchaAI: Request Interception for CAPTCHA Solving
Complete guide to using Selenium Wire for request interception, proxy routing, and automated CAPTCHA solving with Captcha AI in Python.

Complete guide to using Selenium Wire for request interception, proxy routing, and automated CAPTCHA solving w...

Python reCAPTCHA v2 Cloudflare Turnstile
Mar 13, 2026
Explainers GeeTest v4 CAPTCHA Changes and Solving Guide
Understand Gee Test v 4 changes from v 3, new challenge types, and how to solve Gee Test v 4 CAPTCHAs with Captcha AI's API.

Understand Gee Test v 4 changes from v 3, new challenge types, and how to solve Gee Test v 4 CAPTCHAs with Cap...

Python Web Scraping Testing
Feb 03, 2026
Comparisons GeeTest vs Cloudflare Turnstile: CAPTCHA Comparison
Compare Gee Test and Cloudflare Turnstile CAPTCHAs — architecture, difficulty, solving approach, and when each is used.

Compare Gee Test and Cloudflare Turnstile CAPTCHAs — architecture, difficulty, solving approach, and when each...

Python Web Scraping Testing
Jan 16, 2026
API Tutorials GeeTest Slide CAPTCHA Parameters and API Guide
Deep dive into Gee Test slide CAPTCHA parameters, API submission fields, and solving patterns with Captcha AI.

Deep dive into Gee Test slide CAPTCHA parameters, API submission fields, and solving patterns with Captcha AI.

Python Web Scraping Testing
Jan 15, 2026
Tutorials GeeTest Token Injection in Browser Automation Frameworks
how to inject Gee Test v 3 solution tokens into Playwright, Puppeteer, and Selenium — including the three-value response, callback triggering, and form submissi...

Learn how to inject Gee Test v 3 solution tokens into Playwright, Puppeteer, and Selenium — including the thre...

Automation Python Testing
Jan 18, 2026
API Tutorials Solve GeeTest v3 CAPTCHA with Python and CaptchaAI
Step-by-step Python tutorial for solving Gee Test v 3 slide puzzle CAPTCHAs using the Captcha AI API.

Step-by-step Python tutorial for solving Gee Test v 3 slide puzzle CAPTCHAs using the Captcha AI API. Includes...

Automation Python Testing
Mar 23, 2026
Troubleshooting CaptchaAI Wrong CAPTCHA Type Error: How to Fix
Fix wrong CAPTCHA type errors when using Captcha AI.

Fix wrong CAPTCHA type errors when using Captcha AI. Learn how to identify the correct CAPTCHA type on a page...

Automation Python reCAPTCHA v2
Feb 28, 2026
Comparisons GeeTest vs BLS CAPTCHA: Comparison Guide
Compare Gee Test and BLS CAPTCHAs — challenge types, difficulty, API parameters, and solving approach with Captcha AI.

Compare Gee Test and BLS CAPTCHAs — challenge types, difficulty, API parameters, and solving approach with Cap...

Python Web Scraping Testing
Jan 10, 2026
Troubleshooting GeeTest v3 Error Codes: Complete Troubleshooting Reference
Complete reference for Gee Test v 3 error codes — from registration failures to validation errors — with causes, fixes, and Captcha AI-specific troubleshooting.

Complete reference for Gee Test v 3 error codes — from registration failures to validation errors — with cause...

Automation Testing GeeTest v3
Apr 08, 2026
Tutorials Pytest Fixtures for CaptchaAI API Testing
Build reusable pytest fixtures to test CAPTCHA-solving workflows with Captcha AI.

Build reusable pytest fixtures to test CAPTCHA-solving workflows with Captcha AI. Covers mocking, live integra...

Automation Python reCAPTCHA v2
Apr 08, 2026
Tutorials Using Fiddler to Inspect CaptchaAI API Traffic
How to use Fiddler Everywhere and Fiddler Classic to capture, inspect, and debug Captcha AI API requests and responses — filters, breakpoints, and replay for tr...

How to use Fiddler Everywhere and Fiddler Classic to capture, inspect, and debug Captcha AI API requests and r...

Automation Python All CAPTCHA Types
Mar 05, 2026