UNLOCK API
atbCAPTCHA

atbCAPTCHA

createTaskまたはin.phpでUNLOCK APIにatbCAPTCHAタスクを送信する方法です。タスクの種類名、すべてのパラメータ、solutionオブジェクト、プロキシフィールド、7言語のコードサンプルを掲載しています。
料金
$0.725 1タスク $0.000725
送信するもの
ページURL、ウィジェットのapp idとAPIサーバー
受け取るもの
atbCAPTCHAフィールド用のトークン

概要と料金

タスクの種類名

プロキシなしで解決するには1つ目の名前を使います。ご自身のプロキシ経由で解決するには2つ目の名前を使い、プロキシフィールドを追加します。料金は同じです。
AtbCaptchaTaskProxylessプロキシなし
AtbCaptchaTask自分のプロキシを使用

taskオブジェクト

type
String必須
タスクの種類名です。大文字と小文字は区別しません。 AtbCaptchaTaskProxyless | AtbCaptchaTask
websiteURL
String必須
CAPTCHAが表示されるページの完全なアドレスです。http://またはhttps://で始まります。
appId
String必須
ウィジェットのapp idです。ページのソースにあります。
apiServer
String必須
ウィジェットが使うAPIサーバーのアドレスです。ページのソースにあります。

ここにないフィールドは、送信されたままソルバーに渡されます。

プロキシフィールド

プロキシ用の種類名の場合のみ使います。個別のフィールドか、1つのproxy文字列のどちらかで送信してください。
proxyType
String必須
http、https、socks4、socks5のいずれかです。
proxyAddress
String必須
プロキシのIPアドレスまたはホスト名です。
proxyPort
Integer必須
プロキシのポートです。
proxyLogin
String任意
プロキシのユーザー名です(プロキシで必要な場合)。
proxyPassword
String任意
プロキシのパスワードです(プロキシで必要な場合)。
proxy
String
すべてのプロキシフィールドを1つの文字列にしたものです。例: http://user:pass@1.2.3.4:8080。

プロキシの使用

リクエスト

POST /createTask
{
  "clientKey": "YOUR_API_KEY",
  "task": {
    "type": "AtbCaptchaTaskProxyless",
    "websiteURL": "https://example.com/login",
    "appId": "af25e409b33d722a95e56a230ff8771c",
    "apiServer": "https://cap.aisecurius.com"
  }
}

solutionオブジェクト

statusがreadyのとき、solutionに入って返されます。
token
String
ページのフォームと一緒に送信するトークンです。
POST /getTaskResult
{
  "errorId": 0,
  "taskId": 1001,
  "status": "ready",
  "solution": {
    "token": "sl191suxzluwxxh6f:"
  },
  "cost": "0.000725",
  "createTime": 1791640000,
  "endTime": 1791640014,
  "solveCount": 1
}

コードサンプル

import time, requests

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

task = requests.post(f"{API}/createTask", json={
    "clientKey": KEY,
    "task": {
      "type": "AtbCaptchaTaskProxyless",
      "websiteURL": "https://example.com/login",
      "appId": "af25e409b33d722a95e56a230ff8771c",
      "apiServer": "https://cap.aisecurius.com"
    }
}).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フォームメソッド

同じタスクを従来のフォームリクエストで送る方法です。res.phpが答えをテキストで返します。
in.php, res.php
curl -s "https://unlock-api.com/in.php" -d "key=YOUR_API_KEY&method=atb_captcha&appId=APP_ID&apiServer=https://cap.aisecurius.com&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"}

フォームAPI: in.phpとres.php