UNLOCK API
GeeTest v3 / v4

GeeTest v3 / v4

How to send a GeeTest v3 / v4 task to UNLOCK API with createTask or in.php: task type names, every parameter, the solution object, proxy fields and code samples in 7 languages.
Price
$0.70 $0.0007 per task
You send
Page URL with gt and challenge (v3) or captcha_id (v4)
You get
The values the GeeTest form submits

Overview and price

Task type names

Use the first name to solve without a proxy. Use the second name and add the proxy fields to solve through your own proxy. The price is the same.
GeeTestTaskProxylessWithout proxy
GeeTestTaskThrough your proxy

Task object

type
StringRequired
Task type name. Matched in any letter case. GeeTestTaskProxyless | GeeTestTask
websiteURL
StringRequired
Full address of the page where the CAPTCHA appears, starting with http:// or https://.
gt
StringOptional
GeeTest v3: the gt value from the page.
challenge
StringOptional
GeeTest v3: a fresh challenge value. Get a new one for every task.
geetestApiServerSubdomain
StringOptional
GeeTest API server, if the page uses its own.
version
IntegerOptional
4 for GeeTest v4. Default 3.
initParameters
ObjectOptional
GeeTest v4: an object with captcha_id.
userAgent
StringOptional
Browser User-Agent to use while solving. Send the same one when you submit the answer.

Fields not listed here are passed to the solver as sent.

Proxy fields

Only for the proxy type name. Send either the separate fields or one proxy string.
proxyType
StringRequired
http, https, socks4 or socks5.
proxyAddress
StringRequired
Proxy IP address or host name.
proxyPort
IntegerRequired
Proxy port.
proxyLogin
StringOptional
Proxy user name, if the proxy needs one.
proxyPassword
StringOptional
Proxy password, if the proxy needs one.
proxy
String
All proxy fields in one string, for example http://user:pass@1.2.3.4:8080.

Using a proxy

Request

POST /createTask
{
  "clientKey": "YOUR_API_KEY",
  "task": {
    "type": "GeeTestTaskProxyless",
    "websiteURL": "https://example.com/login",
    "gt": "81388ea1fc187e0c335c0a8907ff2625",
    "challenge": "2e2f0f65240058b683cb6ea21c303eea"
  }
}

Solution object

Returned in solution when status is ready.
challenge
String
GeeTest v3 challenge to submit.
validate
String
GeeTest v3 validate value.
seccode
String
GeeTest v3 seccode value.
captcha_id
String
GeeTest v4 captcha_id.
lot_number
String
GeeTest v4 lot_number.
pass_token
String
GeeTest v4 pass_token.
gen_time
String
GeeTest v4 gen_time.
captcha_output
String
GeeTest v4 captcha_output.
POST /getTaskResult
{
  "errorId": 0,
  "taskId": 1001,
  "status": "ready",
  "solution": {
    "challenge": "1ad03db8aff920037fb8117827eab171gu",
    "validate": "0e0ab9f2fdbf7b8e2c3c1a2d4f2c9b07",
    "seccode": "0e0ab9f2fdbf7b8e2c3c1a2d4f2c9b07|jordan",
    "captcha_id": "(v4) e392e1d7fd421dc63325744d5a2b9c73",
    "lot_number": "(v4) e6c3bed2854f41f880662c48afff5dcb",
    "pass_token": "(v4) fad5eb52fc83bf7617f4...",
    "gen_time": "(v4) 1693924478",
    "captcha_output": "(v4) fN36ufW6cQN2SQ-I..."
  },
  "cost": "0.0007",
  "createTime": 1791640000,
  "endTime": 1791640014,
  "solveCount": 1
}

Code samples

import time, requests

API = "https://unlock-api.com"
KEY = "YOUR_API_KEY"

task = requests.post(f"{API}/createTask", json={
    "clientKey": KEY,
    "task": {
      "type": "GeeTestTaskProxyless",
      "websiteURL": "https://example.com/login",
      "gt": "81388ea1fc187e0c335c0a8907ff2625",
      "challenge": "2e2f0f65240058b683cb6ea21c303eea"
    }
}).json()
if task["errorId"]:
    raise SystemExit(task["errorCode"])

for _ in range(60):   # 60 x 5 s = the 5 minute task limit
    time.sleep(5)
    r = requests.post(f"{API}/getTaskResult", json={"clientKey": KEY, "taskId": task["taskId"]}).json()
    if r["errorId"]:
        raise SystemExit(f"{r['errorCode']}: {r.get('errorDescription', '')}")   # failed tasks are refunded
    if r["status"] == "ready":
        print(r["solution"])
        break
else:
    raise SystemExit("timed out")

in.php form method

The same task with the classic form request. res.php returns the answer as text.
in.php, res.php
curl -s "https://unlock-api.com/in.php" -d "key=YOUR_API_KEY&method=geetest&gt=GT&challenge=CHALLENGE&pageurl=https://example.com/login&json=1"
# {"status":1,"request":"1001"}

curl -s "https://unlock-api.com/res.php?key=YOUR_API_KEY&action=get&id=1001&json=1"
# {"status":0,"request":"CAPCHA_NOT_READY"}  then  {"status":1,"request":"ANSWER"}

Form API: in.php and res.php