How to Solve GeeTest V3 with CaptchaAI. Step-by-Step Tutorial

Learn how to solve Geetest v3 captchas instantly using CaptchaAI’s high-accuracy, unlimited, and automated solution.

2 views ·Updated 2 hours ago ·6 min read

Note: This tutorial assumes you’re using CaptchaAI API to bypass GeeTest V3 challenges programmatically (e.g., in a script).

Prerequisites

  • A CaptchaAI API key.
  • Web automation tool/framework.
  • HTTP client (e.g., curl, Postman, Python requests, etc.).
  • Target website with GeeTest V3 challenge.
  • Basic understanding of HTML/JavaScript and browser developer tools.

Step 1: Identify the GeeTest V3 Parameters

To solve GeeTest v3 we need to extract these values: - gt (public key) - challenge (dynamic challenge token)

In your automation tool/framework, navigate to the target site (e.g., https://examples.captchaai.com/geetest_v3.html). Inject the following JS function before the captcha widget is loaded.

This will prevent the widget from loading and return all needed parameters:

(async function() {
   if (window.__geetest_completely_blocked) return;
   window.__geetest_completely_blocked = true;

   const resolver = {};
   const capturedPromise = new Promise(resolve => resolver.resolve = resolve);

   window.initGeetest = function(config, callback) {
      console.log('[BLOCKER] initGeetest BLOCKED');

      let p = {
         method: "geetest",
         gt: config.gt,
         challenge: config.challenge,
         pageurl: window.location.href,
         userAgent: navigator.userAgent
      }
      console.log('[BLOCKER] Parameters:\n' + JSON.stringify(p, null, 4));
      
      window.__blocked_geetest_params = p;
      window.__blocked_geetest_config = config;
      window.__blocked_geetest_callback = callback;

      resolver.resolve(p);
      
      const mockCaptcha = {
         appendTo: function(selector) {
               const container = document.querySelector(selector);
               if (container) {
                  // Create a simple placeholder
                  const placeholder = document.createElement('div');
                  placeholder.innerHTML = `
                     <div style="border: 2px solid #ff4444; padding: 15px; border-radius: 16px; border-style: dashed; background: #fff5f5; text-align: center; margin: 10px 0;">
                           <h4 style="color: #cc0000; margin: 0 0 8px 0;">🚫 CAPTCHA BLOCKED</h4>
                           <div style="font-size: 12px; color: #555;"><div>GT: <strong>${config.gt}</strong></div><div>Challenge: <strong>${config.challenge}</strong></div></div>    
                     </div>
                  `;
                  container.appendChild(placeholder);
               }
         },
         onReady: function(cb) {
               console.log('[BLOCKER] onReady called (fake)');
               setTimeout(cb, 10);
         },
         onSuccess: function(cb) {
               console.log('[BLOCKER] onSuccess callback stored');
               window.__blocked_success_cb = cb;
         },
         onError: function(cb) {
               window.__blocked_error_cb = cb;
         },
         getValidate: function() {
               console.log('[BLOCKER] getValidate called');
               return window.geetestSolution || {
                  geetest_challenge: config.challenge || '',
                  geetest_validate: '',
                  geetest_seccode: ''
               };
         },
         destroy: function() {
               console.log('[BLOCKER] destroy called');
         },
         reset: function() {
               console.log('[BLOCKER] reset called');
         },
         verify: function() {
               console.log('[BLOCKER] verify called');
               if (window.__blocked_success_cb) {
                  window.__blocked_success_cb();
               }
         }
      };
      
      if (callback && typeof callback === 'function') {
         setTimeout(() => { callback(mockCaptcha); }, 0);  
      }
      
      return mockCaptcha;
   };
   
   if (window.GeeTest) { window.GeeTest = undefined; }

   return await capturedPromise;
})();

This function will print and return all parameters needed to solve the GeeTest v3 once it’s available like this:

{
   "method": "geetest",
    "gt": "7a67bed0cd1n18b999899921c6c4x89x",
    "challenge": "60d27571a7033abfc80ffc23a2c9d7cd",
    "pageurl": "https://examples.captchaai.com/geetest_v3.html",
    "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36"
}

Screenshot of chromium browser after executing the blocker function

It also defines them as window.__blocked_geetest_params.

Step 2: Submit GeeTest V3 Task to CaptchaAI

Use the CaptchaAI API to request solving.

API Request (POST)

POST https://ocr.captchaai.com/in.php

Form Data:

key=YOUR_API_KEY
method=geetest
gt=7a67bed0cd1n18b999899921c6c4x89x
challenge=60d27571a7033abfc80ffc23a2c9d7cd
pageurl=https://examples.captchaai.com/geetest_v3.html

Replace:

  • YOUR_API_KEY with your actual CaptchaAI API key
  • gt and challenge with values from Step 1
  • pageurl with the full URL where the GeeTest appears

Example (curl)

curl -F "key=YOUR_API_KEY" \
     -F "method=geetest" \
     -F "gt=7a67bed0cd1n18b999899921c6c4x89x" \
     -F "challenge=60d27571a7033abfc80ffc23a2c9d7cd" \
     -F "pageurl=https://examples.captchaai.com/geetest_v3.html" \
     https://ocr.captchaai.com/in.php

Expected Response

If successful, you’ll get a response like:

OK|1234567890

Save the numeric ID (1234567890) — it’s your task ID.

Step 3: Poll for the Solved Response

CaptchaAI needs a few seconds to solve the challenge. Poll the result endpoint:

API Request (GET)

GET https://ocr.captchaai.com/res.php?key=YOUR_API_KEY&action=get&id=1234567890

Polling Logic

  • Send this request every 5 seconds.
  • If response is CAPCHA_NOT_READY, wait and retry.
  • If response starts with OK|, you’ve got your solution!

Example Response

{
    "challenge": "1f21dc50e6aa207d4b1fa34188513a024h",
    "validate": "ed5fb009b23a5adf5c111ba29ea523e6",
    "seccode": "ed5fb009b23a5adf5c111ba29ea523e6|jordan"
}

The response contains: - challenge: Challenge string (usually same as input) - validate: The validation token you must submit - seccode: Security code (often used alongside validate)

Step 4: Submit the Solution to the Target Website

GeeTest V3 usually submits three parameters in the form: - geetest_challenge - geetest_validate - geetest_seccode

You can use this JS function to inject the solution received from CaptchaAI (via JavaScript in DevTools or automation script):

(sol) => {
   console.log('Injecting solution into BLOCKED widget:', sol);
   window.geetestSolution = sol;
   
   const fields = ['geetest_challenge', 'geetest_validate', 'geetest_seccode'];
   fields.forEach(name => {
      const field = document.querySelector(`input[name="${name}"]`);
      if (field) {
            field.value = sol[name] || '';
            console.log('Set field:', name, '=', sol[name]);
            field.dispatchEvent(new Event('change', { bubbles: true }));
            field.dispatchEvent(new Event('input', { bubbles: true }));
      }
   });
   
   if (window.__blocked_success_cb) {
      try {
            console.log('Triggering blocked success callback');
            window.__blocked_success_cb();
      } catch(e) { console.log('Blocked callback error:', e); }      
   }
}

It takes a dictionary like this:

{
   "geetest_challenge": challenge,
   "geetest_validate": validate,
   "geetest_seccode": seccode
}

Now, if the page has a submit button, click it.

Screenshot of chromium browser after executing the solution injection function

Step 5: Verify Success

  • If the server accepts your request → success!
  • If you get an error or another challenge → the solution may be expired or invalid. Repeat from Step 2.

Tips

  • GeeTest tokens are time-sensitive—submit immediately after solving.
  • Never poll faster than every 3 seconds—you may get rate-limited.
  • Always use HTTPS for API requests. > Need more help? Explore other articles at CaptchaAI Help Center or contact support.