UNLOCK API
KeyCaptcha

KeyCaptcha

How to send a KeyCaptcha 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
$1.495 $0.001495 per task
You send
Page URL and the four s_s_c values from the page
You get
Token for the KeyCaptcha field

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.
KeyCaptchaTaskProxylessWithout proxy
KeyCaptchaTaskThrough your proxy

Task object

type
StringRequired
Task type name. Matched in any letter case. KeyCaptchaTaskProxyless | KeyCaptchaTask
websiteURL
StringRequired
Full address of the page where the CAPTCHA appears, starting with http:// or https://.
s_s_c_user_id
StringRequired
s_s_c_user_id value from the page.
s_s_c_session_id
StringRequired
s_s_c_session_id value from the page.
s_s_c_web_server_sign
StringRequired
s_s_c_web_server_sign value from the page.
s_s_c_web_server_sign2
StringRequired
s_s_c_web_server_sign2 value from the page.

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": "KeyCaptchaTaskProxyless",
    "websiteURL": "https://example.com/login",
    "s_s_c_user_id": "184015",
    "s_s_c_session_id": "9ff29e0176e78eb7ba59314f92dbac1b",
    "s_s_c_web_server_sign": "964635241a3e5e76980f2572e5f63452",
    "s_s_c_web_server_sign2": "3ca802a38ffc5831fa293ac2819b1204"
  }
}

Solution object

Returned in solution when status is ready.
token
String
The token to submit with the page form.
POST /getTaskResult
{
  "errorId": 0,
  "taskId": 1001,
  "status": "ready",
  "solution": {
    "token": "d58e5a5bb1e2f58a3b2e6c6d6f8a1b2c|..."
  },
  "cost": "0.001495",
  "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": "KeyCaptchaTaskProxyless",
      "websiteURL": "https://example.com/login",
      "s_s_c_user_id": "184015",
      "s_s_c_session_id": "9ff29e0176e78eb7ba59314f92dbac1b",
      "s_s_c_web_server_sign": "964635241a3e5e76980f2572e5f63452",
      "s_s_c_web_server_sign2": "3ca802a38ffc5831fa293ac2819b1204"
    }
}).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"]["token"])
        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=keycaptcha&s_s_c_user_id=ID&s_s_c_session_id=SID&s_s_c_web_server_sign=S1&s_s_c_web_server_sign2=S2&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