Typ zadania
reCAPTCHA v2
RecaptchaV2TaskProxylessbez proxy
reCAPTCHA v2 to pole wyboru „Nie jestem robotem” i jego niewidoczny wariant. API zwraca token gRecaptchaResponse, który wysyła się razem z formularzem strony.
Bez proxy: rozwiązujemy z własnej infrastruktury. Najlepsze, gdy docelowa witryna nie wiąże tokenu z adresem IP.
Metryki na żywo, 24 h
Metryki na żywo dla tego typu pojawią się na stronie statusu po starcie.
Parametry zadania
| Parametr | Typ | wymagany | Parametry zadania |
|---|---|---|---|
type | string | wymagany | RecaptchaV2TaskProxyless |
websiteURL | string | wymagany | Pełny URL strony z captcha. |
websiteKey | string | wymagany | Klucz witryny (data-sitekey lub parametr k żądania anchor). |
isInvisible | boolean | opcjonalny | true dla niewidocznej reCAPTCHA v2 (bez pola wyboru). |
recaptchaDataSValue | string | opcjonalny | Wartość data-s, jeśli strona jej używa (niektóre usługi Google). |
userAgent | string | opcjonalny | User-Agent używany do rozwiązania; przy wysyłaniu tokenu należy użyć tego samego. |
cookies | string | opcjonalny | Pliki cookie docelowej witryny w formacie key1=value1; key2=value2. |
Przykład
import time
import requests
API = "https://"
KEY = "YOUR_API_KEY"
# 1. create a task: the price is held, not charged
task = requests.post(f"{API}/createTask", json={
"clientKey": KEY,
"task": {
"type": "RecaptchaV2TaskProxyless",
"websiteURL": "https://example.com/login",
"websiteKey": "6Le-SITE-KEY",
},
}).json()
if task["errorId"]:
raise RuntimeError(task["errorCode"])
# 2. poll the result (or pass "callbackUrl" and get a signed webhook)
while True:
time.sleep(3)
res = requests.post(f"{API}/getTaskResult",
json={"clientKey": KEY, "taskId": task["taskId"]}).json()
if res["errorId"]:
raise RuntimeError(res["errorCode"])
if res["status"] == "ready":
print(res["solution"]["gRecaptchaResponse"])
break
Inne typy zadań
- reCAPTCHA v2
RecaptchaV2Task0,60 USD - reCAPTCHA v2 Enterprise
RecaptchaV2EnterpriseTaskProxyless1,50 USD - reCAPTCHA v2 Enterprise
RecaptchaV2EnterpriseTask1,50 USD - reCAPTCHA v3
RecaptchaV3TaskProxyless0,90 USD - reCAPTCHA v3 Enterprise
RecaptchaV3EnterpriseTaskProxyless2,00 USD - reCAPTCHA v3 Enterprise
RecaptchaV3EnterpriseTask2,00 USD