Service Details
- Service ID:
turnstile
- Price: $0.001 persolve ($1 per 1000 solves)
- Average Solve Time: 6 seconds
- Success Rate: 98%
Required Parameters
The URL of the page where the Turnstile challenge is located.
The site key of the Turnstile challenge from the target website.
Optional Parameters
Proxy in format login:password@ip_address:port
. Using a proxy can improve success rates.
Set to true
if the Turnstile is invisible. Default is false
.
Example Request
curl -X POST https://captcha.vast.sh/api/solver/createTask \
-H "Content-Type: application/json" \
-d '{
"clientKey": "YOUR_API_KEY",
"task": {
"type": "TurnstileTask",
"websiteURL": "https://example.com/turnstile",
"websiteKey": "0x4AAAAAAAC_.......",
"invisible": true
}
}'
{
"token": "0.ABC123def456..."
}
Integration Examples
Browser JavaScript
// After receiving the token from the API
document.getElementById('cf-turnstile-response').innerHTML = result.token;
// Then submit your form
document.getElementById('login-form').submit();
Python
import requests
import time
# Create a task
task_data = {
"clientKey": "YOUR_API_KEY",
"task": {
"type": "TurnstileTask",
"websiteURL": "https://example.com/turnstile",
"websiteKey": "0x4AAAAAAAC_.......",
"invisible": True
}
}
response = requests.post(
"https://captcha.vast.sh/api/solver/createTask",
json=task_data
)
task_id = response.json()["taskId"]
# Get the result
while True:
result_data = {
"clientKey": "YOUR_API_KEY",
"taskId": task_id
}
result = requests.post(
"https://captcha.vast.sh/api/solver/getTaskResult",
json=result_data
).json()
if result.get("status") == "ready":
# Use the token in your form submission
turnstile_token = result["solution"]["token"]
break
time.sleep(3) # Wait before trying again
Notes
- The solution token is typically valid for 5 minutes after being issued.
- Turnstile challenges are typically easier to solve than other CAPTCHA types, resulting in faster solving times.
- Be sure to specify the correct
invisible
parameter value based on the Turnstile implementation on the target site.