Yandex SmartCaptcha
Connect the SmartCaptcha widget to a verified response. Collect the SmartCaptcha public key from its container or render options. Use the URL of the form containing that widget.
{
"clientKey": "capzy_YOUR_API_KEY",
"task": {
"type": "YandexSmartCaptchaTaskProxyLess",
"websiteURL": "https://example.ru/login",
"websiteKey": "ysc1_bFdbbET5WBnPTvoE5jTXxxxx"
}
}Illustrative values. Replace the inputs with values from your current integration.
Find the SmartCaptcha key.
Collect the SmartCaptcha public key from its container or render options. Use the URL of the form containing that widget.
Your API key authenticates Capzy.
Provider keys, challenge IDs, images, and session values belong inside task.
Read data-sitekey on the widget.
- Right-click the SmartCaptcha area and choose Inspect. Find the smart-captcha container in Elements.
- Copy data-sitekey into websiteKey, then copy the complete form URL into websiteURL.
- If several widgets are present, use the key for the specific form you will submit.
<div class="smart-captcha"
data-sitekey="YOUR_SMARTCAPTCHA_PUBLIC_KEY">
</div>Use the widget's public key. The server validation key belongs in your application's backend.
How Yandex SmartCaptcha works
Yandex SmartCaptcha is used by Yandex services and Russian websites. It presents a checkbox ('I'm not a robot') and escalates to a synthetic-tone audio challenge or visual puzzle when it detects suspicious traffic. Tokens are single-use with a 5-minute TTL. The customer validates them server-side via Yandex's API.
Capzy's proprietary solver returns valid Yandex SmartCaptcha tokens. The ProxyLess path is routed for you because low-trust IPs are systematically escalated to the harder challenge variant. YandexSmartCaptchaTask with your own proxy on a Russian exit gives the highest success rate.
- Checkbox + audio challenge solving
- Solves the audio challenge
- Token single-use, 5-min TTL
- A Russian-exit proxy improves success rate
Know what goes in.
Choose a field to see its purpose, where to get it, and its place in the request. Optional values omitted from the example can be added when your flow uses them.
The request below follows your selected task configuration.
Request authentication
Required task inputs
websiteURL
stringRequiredThe page URL
Copy the full page URL from the address bar or the document request in Network, including the path where this flow runs.
Open the input guidehttps://example.ru/login{
"clientKey": "capzy_YOUR_API_KEY",
"task": {
"type": "YandexSmartCaptchaTaskProxyLess",
"websiteURL": "https://example.ru/login",
"websiteKey": "ysc1_bFdbbET5WBnPTvoE5jTXxxxx"
}
}The selected field is highlighted when present. Preserve the declared value type and current challenge context.
Make your first request.
Create the task, keep its taskId, and poll until status is ready. Then read the selected variant's solution.
- Create the task
Send
clientKeyand the selectedtaskto/createTaskfrom your server. Keep the returnedtaskId. - Wait for the solution
Send that same key and ID to
/getTaskResult. While processing, wait two seconds before checking again. Stop on Ready or an error. - Apply the result
Read solution.token and pass it through the site's SmartCaptcha response field or completion callback. The backend validates it using the provider credential configured for that widget.
import json, os, time
import requests
API = "https://api.capzy.ai"
KEY = os.environ["CAPZY_API_KEY"]
task = json.loads("{\"type\":\"YandexSmartCaptchaTaskProxyLess\",\"websiteURL\":\"https://example.ru/login\",\"websiteKey\":\"ysc1_bFdbbET5WBnPTvoE5jTXxxxx\"}")
def call(path, payload):
response = requests.post(f"{API}/{path}", json={"clientKey": KEY, **payload}, timeout=30)
response.raise_for_status()
data = response.json()
if data.get("errorId", 0) or data.get("status") == "failed":
raise RuntimeError(data.get("errorDescription") or data.get("errorCode") or "Task failed")
return data
created = call("createTask", {"task": task})
for attempt in range(60):
result = call("getTaskResult", {"taskId": created["taskId"]})
if result.get("status") == "ready":
solution = result["solution"]
print(solution)
break
time.sleep(2)
else:
raise TimeoutError("Task is still processing; keep the taskId to check it later.")
Before runningReplace all illustrative inputs with your captured values. Set CAPZY_API_KEY in your environment. Install requests with pip install requests.
Polling and failuresThe example checks HTTP/API failures, uses 30-second request timeouts, and stops after 60 result checks. Retain taskId if your task is still processing.
Understand what comes back.
Follow this task from creation to completion. Response fields and usage follow your selected request variant.
SmartCaptcha response token
Read solution.token and pass it through the site's SmartCaptcha response field or completion callback. The backend validates it using the provider credential configured for that widget.
- string
- The SmartCaptcha token. Submit in the smart-token hidden input
{
"errorId": 0,
"status": "ready",
"solution": {
"token": "dD4D<long Yandex SmartCaptcha token, single-use, 5-min TTL>"
}
}Illustrative values. Additional metadata may be returned; only Ready contains a completed solution.
Submit the token
Yandex tokens go in the smart-token field (or window.smartCaptcha). Validate server-side against smartcaptcha.yandexcloud.net/validate.
Execution context result is the parsed Ready response from the polling example. session, when referenced, is your existing requests.Session (or browser-compatible session) with the original cookie jar, headers, and solving proxy configured in session.proxies for both http and https. Keep this client for the complete flow. task is the task object you submitted. For Shape, action_body is the original protected request body as bytes or a string, with its original Content-Type in session.headers. Install curl_cffi when the fragment imports it; match the target's required browser/TLS identity.
# Step 3 — Yandex SmartCaptcha: inject the token, or validate server-side
token = result["solution"]["token"]
# Browser: document.querySelector('input[name="smart-token"]').value = token
# Server-side validation:
requests.post("https://smartcaptcha.yandexcloud.net/validate",
params={"secret": "YOUR_SERVER_KEY", "token": token, "ip": "USER_IP"})When something doesn't work.
Check your captured values, the selected variant, and the response before starting another task.
Do I need a Russian proxy?
Recommended. From non-Russian IPs, Yandex often escalates to harder challenges. A proxy on a Russian exit results in auto-pass (no challenge).
Connect Yandex SmartCaptcha to your workflow.
Get your Capzy API key and use this guide's integration.
YandexSmartCaptchaTaskProxyLess · Live configuration