Get Task Result

Retrieves the result of a previously created captcha solving task.

API Endpoint

POST /getTaskResult

Request Parameters

clientKey
string
required

Your API key.

taskId
string
required

The ID of the task returned by the createTask request.

Response

status
string

The status of the task. Can be one of:

  • processing - The task is still being processed
  • ready - The task has been completed
  • failed - The task has failed
solution
object

The solution data. Only present when status is ready.

error
object

Error details. Only present when status is failed.

solution.gRecaptchaResponse
string

The reCAPTCHA response token. Only present for reCAPTCHA tasks.

solution.token
string

The hCaptcha response token. Only present for hCaptcha tasks.

solution.token
string

The Turnstile response token. Only present for Turnstile tasks.

solution.text
string

The text from the image. Only present for ImageToText tasks.

solution.score
number

The score value for reCAPTCHA v3. Only present for reCAPTCHA v3 tasks.

solution.userAgent
string

The User-Agent used to solve the captcha. Present if a custom User-Agent was used.

Example Request

curl -X POST https://captcha.vast.sh/api/solver/getTaskResult \
  -H "Content-Type: application/json" \
  -d '{
    "clientKey": "YOUR_API_KEY",
    "taskId": "9d55c404-5a45-4e7b-8a93-b8ed9f26bdcf"
  }'

Example Response - Processing

{
  "status": "processing"
}

Example Response - Ready (reCAPTCHA)

{
  "status": "ready",
  "solution": {
    "gRecaptchaResponse": "03AGdBq25nDZASDNcKOSrPQJ2Qy7RgC8GzP64fZunlJ-KFk2bvOr9kRCdvlrqrn8c3M2cXY..."
  }
}

Example Response - Ready (hCaptcha)

{
  "status": "ready",
  "solution": {
    "token": "P1_eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJwYXNza2V5IjoiRXJ1SU..."
  }
}

Example Response - Failed

{
  "status": "error",
  "error": {
    "errorId": 1,
    "errorCode": "ERROR_CAPTCHA_UNSOLVABLE",
    "errorDescription": "The captcha could not be solved"
  }
}

Error Codes

Common error codes:

  • ERROR_CAPTCHA_UNSOLVABLE - The captcha could not be solved
  • ERROR_KEY_DOES_NOT_EXIST - Invalid API key
  • ERROR_TASK_NOT_FOUND - Task not found
  • ERROR_PROXY_CONNECTION_FAILED - Proxy connection failed

Notes

  • The solution format varies depending on the captcha type.
  • You should poll this endpoint until the status is either ready or failed. We recommend using a polling interval of 3-5 seconds.
  • The solution is typically ready within 5-30 seconds, depending on the captcha type and difficulty.

Get Task Result

Retrieves the result of a previously created captcha solving task.

API Endpoint

POST /getTaskResult

Request Parameters

clientKey
string
required

Your API key.

taskId
string
required

The ID of the task returned by the createTask request.

Response

status
string

The status of the task. Can be one of:

  • processing - The task is still being processed
  • ready - The task has been completed
  • failed - The task has failed
solution
object

The solution data. Only present when status is ready.

error
object

Error details. Only present when status is failed.

solution.gRecaptchaResponse
string

The reCAPTCHA response token. Only present for reCAPTCHA tasks.

solution.token
string

The hCaptcha response token. Only present for hCaptcha tasks.

solution.token
string

The Turnstile response token. Only present for Turnstile tasks.

solution.text
string

The text from the image. Only present for ImageToText tasks.

solution.score
number

The score value for reCAPTCHA v3. Only present for reCAPTCHA v3 tasks.

solution.userAgent
string

The User-Agent used to solve the captcha. Present if a custom User-Agent was used.

Example Request

curl -X POST https://captcha.vast.sh/api/solver/getTaskResult \
  -H "Content-Type: application/json" \
  -d '{
    "clientKey": "YOUR_API_KEY",
    "taskId": "9d55c404-5a45-4e7b-8a93-b8ed9f26bdcf"
  }'

Example Response - Processing

{
  "status": "processing"
}

Example Response - Ready (reCAPTCHA)

{
  "status": "ready",
  "solution": {
    "gRecaptchaResponse": "03AGdBq25nDZASDNcKOSrPQJ2Qy7RgC8GzP64fZunlJ-KFk2bvOr9kRCdvlrqrn8c3M2cXY..."
  }
}

Example Response - Ready (hCaptcha)

{
  "status": "ready",
  "solution": {
    "token": "P1_eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJwYXNza2V5IjoiRXJ1SU..."
  }
}

Example Response - Failed

{
  "status": "error",
  "error": {
    "errorId": 1,
    "errorCode": "ERROR_CAPTCHA_UNSOLVABLE",
    "errorDescription": "The captcha could not be solved"
  }
}

Error Codes

Common error codes:

  • ERROR_CAPTCHA_UNSOLVABLE - The captcha could not be solved
  • ERROR_KEY_DOES_NOT_EXIST - Invalid API key
  • ERROR_TASK_NOT_FOUND - Task not found
  • ERROR_PROXY_CONNECTION_FAILED - Proxy connection failed

Notes

  • The solution format varies depending on the captcha type.
  • You should poll this endpoint until the status is either ready or failed. We recommend using a polling interval of 3-5 seconds.
  • The solution is typically ready within 5-30 seconds, depending on the captcha type and difficulty.