SurSolver

GeeTest captcha solver API

Solve GeeTest v3 and v4 slide challenges. Send the version-specific inputs and receive the verification fields your site expects.

Updated

$0.65 / 1K tasksCharged when a task is accepted

On this page

GeeTest task at a glance

GeeTestTokenProxyLess and GeeTestToken solve the GeeTest slide puzzle and return the verification fields the protected form or API expects. The version is chosen by the inputs you send, not by the task name.

Field v3 v4
websiteURL required required
userAgent required required
gt required, 32 lowercase hex do not send
challenge required, fresh, 32 lowercase hex do not send
captchaId do not send required, 32 lowercase hex
proxy GeeTestToken only GeeTestToken only

Send one input set per request. Custom API-host overrides, riskType and initParameters are not accepted. The GeeTest API reference lists the supported fields.

Identify GeeTest v3 or v4

v3 loads gt.js and calls initGeetest with a static gt key and a challenge that the site's server registers per page load. v4 loads gt4.js and calls initGeetest4 with a captchaId.

GeeTest slide widget and the page source showing initGeetest

The solver handles v3 slide3 and v4 slide puzzles. A site can serve a different GeeTest challenge type to a visitor, and those types are outside this integration.

Result fields

Version solution fields Where they go
v3 challenge, validate, seccode geetest_challenge, geetest_validate, geetest_seccode
v4 captcha_id, lot_number, pass_token, gen_time, captcha_output the site's verification request, under the names its widget submits

The values are already decoded; there is no JSON token to unpack. Keep them unchanged, submit every field of your version, and reuse the task's userAgent. No result returns a user agent.

Fresh v3 challenge

A v3 challenge identifies one verification attempt. Fetch it from the site's own register or init endpoint right before you create each task.

GeeTest register response with gt and challenge

A task is charged when it is accepted, and a failed or timed-out task returns its original charge once. A solved credential can still be refused by the site's session or application checks.

The GeeTest v3 vs v4 guide walks through detection on a live page, the register request, a full request and replay example, and the rejection causes.

v3 request and response

Copy gt and a fresh challenge from the site's current register response. Send the following to POST /createTask; every value is illustrative:

snippet.json
{
  "clientKey": "sur_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
  "task": {
    "type": "GeeTestTokenProxyLess",
    "websiteURL": "https://example.com/login",
    "userAgent": "YOUR_SUPPORTED_USER_AGENT",
    "gt": "0123456789abcdef0123456789abcdef",
    "challenge": "abcdef0123456789abcdef0123456789"
  }
}

Poll POST /getTaskResult with your clientKey and the returned taskId. A v3 ready result has this shape:

snippet.json
{
  "errorId": 0,
  "status": "ready",
  "solution": {
    "challenge": "<verified-challenge>",
    "validate": "<verification-value>",
    "seccode": "<verification-value>|jordan"
  }
}

Submit all three values as geetest_challenge, geetest_validate and geetest_seccode to the same form session. Do not replace the returned challenge with a newly registered one.

v4 request and response

Read captchaId from initGeetest4 or its /load request. Do not include v3's gt or challenge:

snippet.json
{
  "clientKey": "sur_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
  "task": {
    "type": "GeeTestTokenProxyLess",
    "websiteURL": "https://example.com/login",
    "userAgent": "YOUR_SUPPORTED_USER_AGENT",
    "captchaId": "0123456789abcdef0123456789abcdef"
  }
}

The v4 ready result contains five separate strings:

snippet.json
{
  "errorId": 0,
  "status": "ready",
  "solution": {
    "captcha_id": "0123456789abcdef0123456789abcdef",
    "lot_number": "<lot-number>",
    "pass_token": "<pass-token>",
    "gen_time": "<generation-time>",
    "captcha_output": "<captcha-output>"
  }
}

Send the complete five-field set through the site's verification request. Inspect an ordinary widget submission to determine whether the application expects form fields or a JSON wrapper. captchaId is a task input; captcha_id is a result field.

Examples in your language

The official client wraps createTask and polling in one solve call; each language tab is its Quick start with this captcha's request, and prints the whole solution. The tabs show a v3 task with gt and a fresh challenge; for v4 send captchaId instead of both. Post only a complete version-specific credential set, keep the page's current CSRF and session context, and adapt the submit transport when the site expects JSON instead of a form. For a v3 register endpoint that returns gt and challenge as JSON, fetch it in the session that submits the credential, so the registration cookies are retained.

quickstart.ts
npm install sursolver
import { SurSolver, TaskType } from 'sursolver';

const API_KEY = 'YOUR_API_KEY';
const USER_AGENT =
  'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/155.0.0.0 Safari/537.36';

const client = new SurSolver(API_KEY);

const { solution } = await client.solve({
  type: TaskType.GeeTestTokenProxyLess,
  websiteURL: 'https://example.com/login',
  userAgent: USER_AGENT,
  gt: '0123456789abcdef0123456789abcdef',
  challenge: 'abcdef0123456789abcdef0123456789',
});
console.log(solution);

Troubleshooting

Symptom Check Correction
Request rejected before solving Both versions were supplied, or a key is not 32 lowercase hex Send exactly one input set
v3 verification is rejected challenge came from an old register request or another session Register and solve immediately in the current session
v4 response is incomplete at the site Only pass_token or a JSON token was submitted Submit all five decoded result fields
The widget serves another puzzle A non-slide challenge was selected That challenge type is outside this integration
Ready result is refused by the application Session, User-Agent, proxy policy, field names or CSRF differ Preserve the submitting session and inspect its normal verification payload

FAQ

Which GeeTest challenge types are supported?

The current integration solves v3 slide3 and v4 slide challenges. A v4 widget can also pass without a puzzle. Other visual challenge types are not supported by this integration.

What is the difference between the v3 and v4 inputs?

v3 needs gt and a fresh challenge. v4 needs captchaId. These identifiers use 32 lowercase hexadecimal characters. Send one version only.

Does GeeTest require a proxy?

GeeTestTokenProxyLess uses SurSolver infrastructure. GeeTestToken requires your proxy. Keep the same userAgent when submitting the result.

What does the API return?

v3 returns challenge, validate and seccode. v4 returns captcha_id, lot_number, pass_token, gen_time and captcha_output. The result contains only the selected version.

Why does a fresh task still fail?

Check that the challenge belongs to the current page session, the key matches the site, and the widget serves a supported slide challenge. Failed tasks return their original charge once.