Skip to content

Text Captcha

Text Captcha tasks solve text-based CAPTCHA questions that require a written answer rather than image or audio processing. These are knowledge-based challenges such as “What color is the sky?” or “What is 2 + 3?”.

TypeDescription
TextCaptchaTaskAnswer a text-based CAPTCHA question
ParameterTypeRequiredDescription
typestringYesTextCaptchaTask
commentstringYesThe question to answer (e.g., “What color is the sky?”)
{
"clientKey": "YOUR_API_KEY",
"task": {
"type": "TextCaptchaTask",
"comment": "What color is the sky?"
}
}
{
"errorId": 0,
"status": "ready",
"solution": {
"text": "blue"
}
}
{
"text": "blue"
}
FieldTypeDescription
textstringThe answer to the text-based question
import requests
API_KEY = "YOUR_API_KEY"
response = requests.post("https://api.ucaptcha.net/createTask", json={
"clientKey": API_KEY,
"task": {
"type": "TextCaptchaTask",
"comment": "What color is the sky?"
}
}).json()
if response.get("status") == "ready":
print("Answer:", response["solution"]["text"])
else:
import time
task_id = response["taskId"]
while True:
result = requests.post("https://api.ucaptcha.net/getTaskResult", json={
"clientKey": API_KEY,
"taskId": task_id
}).json()
if result["status"] == "ready":
print("Answer:", result["solution"]["text"])
break
elif result["status"] == "failed":
print("Error:", result.get("errorDescription"))
break
time.sleep(5)
const API_KEY = "YOUR_API_KEY";
const response = await fetch("https://api.ucaptcha.net/createTask", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
clientKey: API_KEY,
task: {
type: "TextCaptchaTask",
comment: "What color is the sky?"
}
})
}).then(r => r.json());
if (response.status === "ready") {
console.log("Answer:", response.solution.text);
} else {
const taskId = response.taskId;
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("Answer:", result.solution.text);
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": "TextCaptchaTask",
"comment": "What color is the sky?"
}
}'
# Poll for result if not immediately ready (replace TASK_ID)
curl -X POST https://api.ucaptcha.net/getTaskResult \
-H "Content-Type: application/json" \
-d '{
"clientKey": "YOUR_API_KEY",
"taskId": "TASK_ID"
}'
  • 2Captcha