FunCaptcha: solving Funcaptcha
Create the task with the createTask method and get the result with
the getTaskResult method.
The tasks type types
that we support:
FunCaptchaTaskProxyLess
is using the server's built-in proxy.
Create Task
Create a task with the createTask to create a task.
Task Object Structure
Properties | Type | Required | Description |
---|---|---|---|
type | String | Required | FunCaptchaTaskProxyLess |
websiteURL | String | Required | Web address of the website using funcaptcha, generally it's fixed value. (Ex: https://google.com) |
websitePublicKey | String | Required | The domain public key, rarely updated. (Ex: E8A75615-1CBA-5DFF-8031-D16BCF234E10) |
funcaptchaApiJSSubdomain | String | Optional | A special subdomain of funcaptcha.com, from which the JS captcha widget should be loaded. Most FunCaptcha installations work from shared domains. |
data | String | Optional | Additional parameter that may be required by FunCaptcha implementation. Use this property to send "blob" value as a stringified array. See example how it may look like. {"\blob":"HERE_COMES_THE_blob_VALUE"} |
proxy | String | Optional | Learn Using proxies |
Example request
json
POST https://api.capsolver.com/createTask
Host: api.capsolver.com
Content-Type: application/json
{
"clientKey": "YOUR_API_KEY_HERE",
"task": {
"type":"FunCaptchaTaskProxyLess",
"websiteURL":"",
"websitePublicKey":"",
}
}
After you submit the task to us, you should receive in the response a 'Task id' if it's successfull. Please read errorCode: full list of errors if you didn't receive the task id.
Example response
json
{
"errorId": 0,
"status": "idle",
"taskId": "61138bb6-19fb-11ec-a9c8-0242ac110006"
}
Getting Result
Use the [getTaskResult](... /api-gettaskresult.md) method to get the recognition results
Depending on the system load, you will get the results within the interval of 1s
to 20s
Example request
json
POST https://api.capsolver.com/getTaskResult
Host: api.capsolver.com
Content-Type: application/json
{
"clientKey": "YOUR_API_KEY",
"taskId": "61138bb6-19fb-11ec-a9c8-0242ac110006"
}
Example response
json
{
"errorId": 0,
"solution": {
"token": "3AHJ_q25SxXT-pmSeBXjzScW-EiocHwwpwqtk1QXlJnGnU......"
},
"status": "ready"
}
Use SDK Request
python
# pip install --upgrade capsolver
# export CAPSOLVER_API_KEY='...'
import capsolver
# capsolver.api_key = "..."
solution = capsolver.solve({
"type": "FunCaptchaTaskProxyLess",
"websitePublicKey": "",
"websiteURL": "",
})
golang
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{}
solution, err := capSolver.Solve(map[string]any{
"type": "FunCaptchaTaskProxyLess",
"websitePublicKey": "xxxx-xxxx-xxxx",
"websiteURL": "xxxx-xxxx-xxxx",
"proxy": "ip:port:username:password",
})
if err != nil {
log.Fatal(err)
return
}
fmt.Println(solution)
}