Kasada: solving Kasada
TIP
ℹ️ This task type require your own proxies.
ℹ️ Note that this interface is different from the others and uses a separate endpoint
Create Task
This task type uses a separate endpoint: /kasada/invoke
Task Object Structure
Properties | Type | Required | Description |
---|---|---|---|
type | String | Required | AntiKasadaTask |
pageURL | String | Required | Web address of the website using Kasada, generally it's fixed value. (Ex: https://google.com) |
proxy | String | Required | Learn Using proxies |
cd | Boolean | Optional | More detailed x-kpsdk-cd , including params such as duration , st and rst |
onlyCD | Boolean | Optional | The solution contains only x-kpsdk-cd |
version | String | Optional | Currently supports 2.0 and 3.0, default is 3.0 |
userAgent | String | Optional | Browser's User-Agent which is used in emulation. Default is random |
Example request
text
POST https://api.capsolver.com/kasada/invoke
Host: api.capsolver.com
Content-Type: application/json
json
{
"clientKey": "YOUR_API_KEY",
"task": {
"type": "AntiKasadaTask",
"pageURL": "https://www.website.com/",
//Required
"proxy": "YOUR_PROXY",
//Required
"cd": true,
//Optional
"onlyCD": false,
//Optional
"userAgent": "MODERN_USER_AGENT_HERE"
//Optional
}
}
Example response
json
{
"errorId": 0,
"success": true,
"status": "ready",
"solution": {
"x-kpsdk-ct": "",
"x-kpsdk-cd": "",
"user-agent": ""
},
"type": "AntiKasadaTask"
}
use SDK Request
python
#pip install --upgrade capsolver
#export CAPSOLVER_API_KEY='...'
import capsolver
# capsolver.api_key = "..."
solution = capsolver.solve({
"type": "AntiKasadaTask",
"pageURL": "https://www.website.com/",
"proxy": "YOUR_PROXY",
"cd": true,
"onlyCD": false,
"userAgent": "MODERN_USER_AGENT_HERE"
})
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": "AntiKasadaTask",
"pageURL": "https://www.website.com/",
"proxy": "YOUR_PROXY",
"cd": true,
"onlyCD": false,
"userAgent": "MODERN_USER_AGENT_HERE",
})
if err != nil {
log.Fatal(err)
return
}
fmt.Println(solution)
}