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
Type | Note | State |
---|---|---|
![]() | slide | stable |
![]() | click | stable |
Create Task
Create a task with the createTask to create a task.
Task Object Structure
Properties | Type | Required | Description |
---|---|---|---|
type | String | Required | GeeTestTask GeeTestTaskProxyLess |
websiteURL | String | Required | Web address of the website using geetest, generally it's fixed value. (Ex: https://geetest.com) |
gt | String | Required | The domain gt field. |
challenge | String | Required | If you need to solve Geetest V3 you must use this parameter, don't need if you need to solve GeetestV4 |
captchaId | String | Optional | If you need to solve Geetest V4 you must use this parameter, don't need if you need to solve GeetestV3 |
geetestApiServerSubdomain | String | Optional | Special api subdomain |
proxy | String | Optional | Learn 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":"0f759dd1ea6c4wc76cedc2991039ca4f23", //Required
"geetestApiServerSubdomain":"api-na.geetest.com", //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": "c8057b071d833a13502a172c38a0044e", //Required
"geetestApiServerSubdomain":"api-na.geetest.com",//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": "0f759dd1ea6c4wc76cedc2991039ca4f23",
"validate": "6275e26419211d1f526e674d97110e15"
},
"status": "ready"
}
Example response using GeetestV4
{
"errorId": 0,
"taskId": "e0ecaaa8-06f6-41fd-a02e-a0c79b957b15",
"status": "ready",
"solution": {
"captcha_id": "c8057b071d833a13502a172c38a0044e",
"captcha_output": "sW8mpqWPdtBwV4_GvgZZoTSnsoDl7xDvLHkfxhZv1QbU0HOeOXsQaBvR-S6WwY7aZ1XlgBDAXFmrtegNX2harzcq8_pVcCf1adwMgDtdJ6rBjmZs1cIgNL8okOD7Eh506ObA5u8ciBG3UehnuXMyDHAeJuiCygqMwFn2C8R3U5Hrgs0wiFlOvIcCjm-dBObNYuvK5m8thZvtU1xbVE8VENTwPIZaNIUGSG7ecPgKgi8=",
"gen_time": "1671687196",
"lot_number": "e5656ce24adf4ae58a5bf3f7bc847794",
"pass_token": "09dd5cbebdd738d78b3287346003c8d5cec255b97b074ed64d9009345d3eac4a",
"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": "0f759dd1ea6c4wc76cedc2991039ca4f23",
"geetestApiServerSubdomain": "api-na.geetest.com",
})
# v4
solution = capsolver.solve({
"type": "GeeTestTaskProxyLess",
"websiteURL": "http://mywebsite.com/geetest/test.php",
"captchaId": "c8057b071d833a13502a172c38a0044e",
"geetestApiServerSubdomain": "api-na.geetest.com",
})
package main
import (
"fmt"
capsolver_go "github.com/capsolver/capsolver-go"
"log"
)
func main() {
// first you need to install sdk
//go get github.com/capsolver/capsolver-go
//export CAPSOLVER_API_KEY='...' or
//capSolver := CapSolver{apiKey:"..."}
capSolver := capsolver_go.CapSolver{}
// v3
solution, err := capSolver.Solve(map[string]any{
"type": "GeeTestTask", //GeeTestTask,GeeTestTaskProxyLess
"websiteURL": "http://mywebsite.com/geetest/test.php",
"gt": "874703612e5cd0d",
"challenge": "0f759dd1ea6c4wc76cedc2991039ca4f23",
"geetestApiServerSubdomain": "api-na.geetest.com",
"proxy": "",
})
if err != nil {
log.Fatal(err)
return
}
fmt.Println(solution)
//v4
solution, err = capSolver.Solve(
map[string]any{
"type": "GeeTestTask",
"websiteURL": "http://mywebsite.com/geetest/test.php",
"websiteKey": "6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-",
"cptchaId": "12310989asdf",
"geetestApiServerSubdomain": "api-na.geetest.com",
})
if err != nil {
log.Fatal(err)
}
}
Points to note
Please do not copy directly from the browser developer Tool, GET GT and challenge on request.
A small number of errors to re-obtain the verification code parameters can be retried.
Verification code parameters can only be submitted to identify once, do not repeat the same parameters submitted to identify, need to re-initialize the acquisition.
Note: If you can not pass the site may be coding problems, then the CAPTCHA
=
symbol with% 3D replacement, other no coding, please note this.
5Parameters such as the test server can be queried here in the Geetest document.