ガイド
タスク(トークン)
Geetest

GeeTestTask: solving Geetest

TIP

Create the task with the createTask method and get the result with the getTaskResult method.

The task type types that we support:

  • GeeTestTask this task type require your own proxies.
  • GeeTestTaskProxyLess is using the server’s built-in proxy

SUPPORT IMG TYPES

TypeNoteState
img.pngslidestable
img_2.pngclickstable

Create Task

Create a task with the createTask to create a task.

Task Object Structure

PropertiesTypeRequiredDescription
typeStringRequiredGeeTestTask
GeeTestTaskProxyLess
websiteURLStringRequiredWeb address of the website using geetest, generally it’s fixed value. (Ex: https://geetest.com)
gtStringRequiredThe domain gt field.
challengeStringRequiredIf you need to solve Geetest V3 you must use this parameter, don’t need if you need to solve GeetestV4
captchaIdStringOptionalIf you need to solve Geetest V4 you must use this parameter, don’t need if you need to solve GeetestV3
geetestApiServerSubdomainStringOptionalSpecial api subdomain
proxyStringOptionalLearn Using proxies

Example Request

Example request using Geetest V3

POST https://api.capsolver.com/createTask
Host: api.capsolver.com
Content-Type: application/json
{
    "clientKey": "YOUR_API_KEY",
    "task": {
        "type":"GeeTestTaskProxyless", //Can use GeetestTaskProxyless or GeetestTask
        "websiteURL":"http://mywebsite.com/geetest/test.php",  //Required
        "gt":"874703612e5cd0d", //Required
        "challenge":"", //Required
        "geetestApiServerSubdomain":"",  //Optional
         "proxy": "http:ip:port:user:pass" // socks5:ip:port:user:pass
        "userAgent": "" //Optional
    }
}

Example Request Using Geetest V4

POST https://api.capsolver.com/createTask
Host: api.capsolver.com
Content-Type: application/json
{
    "clientKey": "YOUR_API_KEY",
    "task": {
        "type":"GeeTestTask", //Can use GeetestTaskProxyless or GeetestTask
        "websiteURL":"http://mywebsite.com/geetest/test.php",  //Required
        "captchaId": "", //Required
        "geetestApiServerSubdomain":"",//Optional
        "proxy":"" //Optional, this is required if you use GeetestTaskask
    }
}

Example Response

{
    "errorId": 0,
    "status": "idle",
    "taskId": "61138bb6-19fb-11ec-a9c8-0242ac110006" // record taskId
}

Getting Result

Use the getTaskResult to get the result, depending on the system load, you will get the result in the interval of 3s to 10s

Example Request

POST https://api.capsolver.com/getTaskResult
Host: api.capsolver.com
Content-Type: application/json
 
{
    "clientKey":"YOU_API_KEY",
    "taskId": "61138bb6-19fb-11ec-a9c8-0242ac110006"
}

Example Response

Example response using GeetestV3

{
  "errorId": 0,
  "solution": {
    "challenge": "",
    "validate": ""
  },
  "status": "ready"
}

Example Response Using GeetestV4

{
  "errorId": 0,
  "taskId": "e0ecaaa8-06f6-41fd-a02e-a0c79b957b15",
  "status": "ready",
  "solution": {
    "captcha_id": "",
    "captcha_output": "",
    "gen_time": "",
    "lot_number": "",
    "pass_token": "",
    "risk_type": "slide"
  }
}

Use SDK Request

# pip install --upgrade capsolver
# export CAPSOLVER_API_KEY='...'
 
import capsolver
 
# capsolver.api_key = "..."
# v3
solution = capsolver.solve({
    "type": "GeeTestTaskProxyLess",
    "websiteURL": "http://mywebsite.com/geetest/test.php",
    "gt": "874703612e5cd0d",
    "challenge": "",
    "geetestApiServerSubdomain": "",
})
 
# v4
solution = capsolver.solve({
    "type": "GeeTestTaskProxyLess",
    "websiteURL": "http://mywebsite.com/geetest/test.php",
    "captchaId": "",
    "geetestApiServerSubdomain": "",
})