API Tutorials

Solve GeeTest v3 CAPTCHA with Node.js and CaptchaAI

GeeTest v3 uses interactive challenges — slide puzzles, click sequences, or gap fills — that return three values (challenge, validate, seccode) instead of a single token. This tutorial shows you how to solve GeeTest v3 from Node.js using the CaptchaAI API.


Prerequisites

Item Value
CaptchaAI API key From captchaai.com
Node.js 14+
Library axios (npm install axios)
Target page A page with GeeTest v3 CAPTCHA

Step 1: Extract GeeTest parameters

Locate the gt (public key) and challenge (dynamic token) from the target page.

const axios = require('axios');

// Many sites expose GeeTest params via an API endpoint
const { data } = await axios.get('https://example.com/api/geetest/register');

const gt = data.gt;               // e.g., "f1ab2cdefa3456116012345b6c78d99e"
const challenge = data.challenge;  // e.g., "12345678abc90123d45678ef90123a456b"
const apiServer = data.api_server || 'api.geetest.com';

Step 2: Submit to CaptchaAI

const API_KEY = 'YOUR_API_KEY';

const submitRes = await axios.get('https://ocr.captchaai.com/in.php', {
  params: {
    key: API_KEY,
    method: 'geetest',
    gt: gt,
    challenge: challenge,
    api_server: apiServer,
    pageurl: 'https://example.com/login',
    json: 1,
  },
});

if (submitRes.data.status !== 1) {
  throw new Error(`Submit failed: ${submitRes.data.request}`);
}

const taskId = submitRes.data.request;
console.log(`Task submitted: ${taskId}`);

Step 3: Poll for the solution

const sleep = (ms) => new Promise((r) => setTimeout(r, ms));

await sleep(15000);

let solution;
for (let i = 0; i < 30; i++) {
  const pollRes = await axios.get('https://ocr.captchaai.com/res.php', {
    params: {
      key: API_KEY,
      action: 'get',
      id: taskId,
      json: 1,
    },
  });

  if (pollRes.data.status === 1) {
    solution = JSON.parse(pollRes.data.request);
    console.log('Challenge:', solution.challenge);
    console.log('Validate:', solution.validate);
    console.log('Seccode:', solution.seccode);
    break;
  }

  if (pollRes.data.request !== 'CAPCHA_NOT_READY') {
    throw new Error(`Error: ${pollRes.data.request}`);
  }

  await sleep(5000);
}

Step 4: Inject the solution

// Submit the solved values to the target site
const loginRes = await axios.post('https://example.com/api/login', {
  username: 'user@example.com',
  password: 'your_password',
  geetest_challenge: solution.challenge,
  geetest_validate: solution.validate,
  geetest_seccode: solution.seccode,
});

console.log(`Login status: ${loginRes.status}`);

Complete working example

const axios = require('axios');

const API_KEY = 'YOUR_API_KEY';
const sleep = (ms) => new Promise((r) => setTimeout(r, ms));

async function solveGeeTestV3() {
  // 1. Get fresh GeeTest parameters
  const { data: geeData } = await axios.get('https://example.com/api/geetest/register');

  // 2. Submit to CaptchaAI
  const { data: submitData } = await axios.get('https://ocr.captchaai.com/in.php', {
    params: {
      key: API_KEY,
      method: 'geetest',
      gt: geeData.gt,
      challenge: geeData.challenge,
      pageurl: 'https://example.com/login',
      json: 1,
    },
  });
  const taskId = submitData.request;

  // 3. Poll for result
  await sleep(15000);
  for (let i = 0; i < 30; i++) {
    const { data: pollData } = await axios.get('https://ocr.captchaai.com/res.php', {
      params: { key: API_KEY, action: 'get', id: taskId, json: 1 },
    });
    if (pollData.status === 1) {
      const solution = JSON.parse(pollData.request);
      console.log('Challenge:', solution.challenge);
      console.log('Validate:', solution.validate);
      console.log('Seccode:', solution.seccode);
      return solution;
    }
    if (pollData.request !== 'CAPCHA_NOT_READY') throw new Error(pollData.request);
    await sleep(5000);
  }
  throw new Error('Timeout waiting for solution');
}

solveGeeTestV3().catch(console.error);

Expected output:

Challenge: 1a2b3456cd67890e12345fab678901c2de
Validate:  09fe8d7c6ba54f32e1dcb0a9fedc8765
Seccode:   12fe3d4c56789ba01f2e345d6789c012|jordan

Common errors

Error Cause Fix
ERROR_BAD_PARAMETERS Missing gt or challenge Verify both parameters are present
ERROR_CAPTCHA_UNSOLVABLE Challenge expired Get a fresh challenge and retry
CAPCHA_NOT_READY Still processing Keep polling every 5 seconds
ERROR_ZERO_BALANCE No funds Top up your CaptchaAI account

FAQ

How long does GeeTest v3 solving take?

Typically 15–30 seconds. The challenge must remain valid during this window.

Can I use fetch instead of axios?

Yes. Replace axios.get() with fetch() and parse the JSON response manually. The API parameters are the same.

What if the challenge token expires before CaptchaAI solves it?

You'll get ERROR_CAPTCHA_UNSOLVABLE. Request a new challenge from the target site and resubmit.



Start solving GeeTest v3 with CaptchaAI →

Discussions (0)

No comments yet.

Related Posts

Tutorials Solving GeeTest v3 with Node.js and CaptchaAI API
Complete Node.js tutorial for solving Gee Test v 3 slide puzzles with Captcha AI.

Complete Node.js tutorial for solving Gee Test v 3 slide puzzles with Captcha AI. Extract gt/challenge paramet...

Automation Testing GeeTest v3
Apr 01, 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
Troubleshooting Common GeeTest v3 Errors and Fixes
Diagnose the most common Gee Test v 3 errors — stale challenge, bad parameters, validation failures — and fix them with practical troubleshooting steps.

Diagnose the most common Gee Test v 3 errors — stale challenge, bad parameters, validation failures — and fix...

Automation Testing GeeTest v3
Jan 24, 2026
Explainers GeeTest v3 Challenge-Response Workflow: Technical Deep Dive
A technical deep dive into Gee Test v 3's challenge-response workflow — the registration API, challenge token exchange, slider verification, and how Captcha AI...

A technical deep dive into Gee Test v 3's challenge-response workflow — the registration API, challenge token...

Automation Testing GeeTest v3
Mar 02, 2026
Explainers How GeeTest v3 CAPTCHA Works
how Gee Test v 3 CAPTCHA works.

Learn how Gee Test v 3 CAPTCHA works. Understand slide puzzles, icon challenges, the verification flow, and ho...

Automation Testing GeeTest v3
Feb 13, 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
Tutorials Browser Console CAPTCHA Detection: Finding Sitekeys and Parameters
Use browser Dev Tools to detect CAPTCHA types, extract sitekeys, and find parameters needed for Captcha AI API requests.

Use browser Dev Tools to detect CAPTCHA types, extract sitekeys, and find all parameters needed for Captcha AI...

Automation reCAPTCHA v2 Cloudflare Turnstile
Mar 25, 2026
API Tutorials How to Solve GeeTest v3 Using API
Complete guide to solving Gee Test v 3 slide CAPTCHAs with Captcha AI.

Complete guide to solving Gee Test v 3 slide CAPTCHAs with Captcha AI. Includes parameter extraction, Python a...

Automation Testing GeeTest v3
Jan 13, 2026
API Tutorials How to Solve reCAPTCHA v2 Callback Using API
how to solve re CAPTCHA v 2 callback implementations using Captcha AI API.

Learn how to solve re CAPTCHA v 2 callback implementations using Captcha AI API. Detect the callback function,...

Automation reCAPTCHA v2 Webhooks
Mar 01, 2026
API Tutorials Case-Sensitive CAPTCHA API Parameter Guide
How to use the regsense parameter for case-sensitive CAPTCHA solving with Captcha AI.

How to use the regsense parameter for case-sensitive CAPTCHA solving with Captcha AI. Covers when to use, comm...

Python Web Scraping Image OCR
Apr 09, 2026
API Tutorials Solve Image CAPTCHA with Python OCR and CaptchaAI
Solve distorted text image CAPTCHAs using Captcha AI's OCR API from Python.

Solve distorted text image CAPTCHAs using Captcha AI's OCR API from Python. Covers file upload, base 64 submis...

Automation Python Image OCR