Skip to content

HardCaptcha

hCaptcha is a popular privacy-focused CAPTCHA alternative to reCAPTCHA. It appears as a checkbox challenge and is used on a wide range of websites, including Cloudflare-protected sites, Discord, and many others. hCaptcha can also run in enterprise mode with additional security parameters.

TypeProxyDescription
HardCaptchaTokenProxyLessNoStandard (recommended)
HardCaptchaTokenYesWith proxy
HardCaptchaEnterpriseProxyLessNoEnterprise, no proxy
HardCaptchaEnterpriseYesEnterprise with proxy
ParameterTypeRequiredDescription
typestringYesTask type from the table above
websiteURLstringYesURL of the page with the captcha
websiteKeystringYeshCaptcha site key
isEnterprisebooleanNoSet to true for enterprise hCaptcha
enterprisePayloadobjectNoEnterprise-specific parameters
rqdatastringNoCustom data parameter if present on the page

Required when using a proxy task type (HardCaptchaToken, HardCaptchaEnterprise).

ParameterTypeRequiredDescription
proxyTypestringYeshttp, socks4, or socks5
proxyAddressstringYesProxy IP or hostname
proxyPortintegerYesProxy port
proxyLoginstringNoProxy username
proxyPasswordstringNoProxy password
{
"clientKey": "YOUR_API_KEY",
"task": {
"type": "HardCaptchaTokenProxyLess",
"websiteURL": "https://example.com/signup",
"websiteKey": "a5f74b19-9e45-40e0-b45d-47ff91b7a6c2"
}
}
{
"errorId": 0,
"taskId": "abc-123-def"
}
{
"token": "P0_eyJ0eXAiOiJKV1QiLCJhbGci...",
"respKey": "E0_eyJ0eXAiOiJKV1QiLCJhbGci...",
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36..."
}
FieldTypeDescription
tokenstringhCaptcha response token
respKeystringResponse key (if applicable)
userAgentstringUser agent used during solving

Once you receive the solution, inject it into the target page:

  1. Form fields — Set the value of the hidden h-captcha-response input field. Many sites also check the g-recaptcha-response field, so set that as well.
  2. Callback — Call the hCaptcha callback function with the token.
  3. User agent — If the site validates the user agent, use the userAgent value from the solution for your subsequent requests.
import requests
import time
API_KEY = "YOUR_API_KEY"
# Create task
response = requests.post("https://api.ucaptcha.net/createTask", json={
"clientKey": API_KEY,
"task": {
"type": "HardCaptchaTokenProxyLess",
"websiteURL": "https://example.com/signup",
"websiteKey": "a5f74b19-9e45-40e0-b45d-47ff91b7a6c2"
}
})
task_id = response.json()["taskId"]
# Poll for result
while True:
result = requests.post("https://api.ucaptcha.net/getTaskResult", json={
"clientKey": API_KEY,
"taskId": task_id
}).json()
if result["status"] == "ready":
solution = result["solution"]
print("Token:", solution["token"])
print("RespKey:", solution.get("respKey"))
print("UserAgent:", solution.get("userAgent"))
break
elif result["status"] == "failed":
print("Error:", result.get("errorDescription"))
break
time.sleep(5)
const API_KEY = "YOUR_API_KEY";
const { taskId } = await fetch("https://api.ucaptcha.net/createTask", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
clientKey: API_KEY,
task: {
type: "HardCaptchaTokenProxyLess",
websiteURL: "https://example.com/signup",
websiteKey: "a5f74b19-9e45-40e0-b45d-47ff91b7a6c2"
}
})
}).then(r => r.json());
while (true) {
const result = await fetch("https://api.ucaptcha.net/getTaskResult", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ clientKey: API_KEY, taskId })
}).then(r => r.json());
if (result.status === "ready") {
console.log("Token:", result.solution.token);
console.log("RespKey:", result.solution.respKey);
console.log("UserAgent:", result.solution.userAgent);
break;
} else if (result.status === "failed") {
console.error("Error:", result.errorDescription);
break;
}
await new Promise(r => setTimeout(r, 5000));
}
Terminal window
# Create task
curl -X POST https://api.ucaptcha.net/createTask \
-H "Content-Type: application/json" \
-d '{
"clientKey": "YOUR_API_KEY",
"task": {
"type": "HardCaptchaTokenProxyLess",
"websiteURL": "https://example.com/signup",
"websiteKey": "a5f74b19-9e45-40e0-b45d-47ff91b7a6c2"
}
}'
# Poll for result (replace TASK_ID with the taskId from above)
curl -X POST https://api.ucaptcha.net/getTaskResult \
-H "Content-Type: application/json" \
-d '{
"clientKey": "YOUR_API_KEY",
"taskId": "TASK_ID"
}'
  • 2Captcha
  • Anti-Captcha
  • DeathByCaptcha
  • RiskByPass
  • OnyxSolver
  • 2Crawler
  • Multibot
  • uCaptcha Native

The following legacy type names are also accepted for backward compatibility:

  • HardCaptchaTask
  • HardCaptchaTaskProxyless
  • HardCaptchaTaskProxyLess
  • HardCaptchaToken
  • HardCaptchaTokenProxyLess
  • HardCaptchaEnterprise
  • HardCaptchaEnterpriseProxyLess