Captcha

reCAPTCHA v2

Solve reCAPTCHA v2 checkbox and invisible challenges

Overview

reCAPTCHA v2 presents users with image challenges ("Select all images with traffic lights"). Our API solves these challenges and returns a valid g-recaptcha-response token.

On the roadmap — not yet live

reCAPTCHA v2 is not generally available yet. createTask returns ERROR_TASK_TYPE_COMING_SOON for v2 task types unless your key has a beta grant. Use reCAPTCHA v3 today — this page documents the v2 interface ahead of launch.

Supported Task Types

Task TypeProxy RequiredDescription
ReCaptchaV2TaskProxyLessNoStandard v2, uses our proxy
ReCaptchaV2TaskYesStandard v2, requires your proxy

Create Task

Endpoint: POST /createTask

Request Parameters

ParameterTypeRequiredDescription
clientKeyStringYesYour API key
task.typeStringYesTask type (see table above)
task.websiteURLStringYesPage URL containing the captcha
task.websiteKeyStringYesreCAPTCHA site key
task.isInvisibleBooleanNoSet true for invisible reCAPTCHA
task.proxyStringNoRequired for non-ProxyLess types. See Proxy Format

Standard v2 Request

{
  "clientKey": "YOUR_API_KEY",
  "task": {
    "type": "ReCaptchaV2TaskProxyLess",
    "websiteURL": "https://example.com/login",
    "websiteKey": "6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-"
  }
}

Invisible v2 Request

{
  "clientKey": "YOUR_API_KEY",
  "task": {
    "type": "ReCaptchaV2TaskProxyLess",
    "websiteURL": "https://example.com/signup",
    "websiteKey": "6LcR_RwTAAAAAPXS1T5zOTiT3J",
    "isInvisible": true
  }
}

Response

{
  "errorId": 0,
  "taskId": "a1b2c3d4-5678-90ab-cdef-1234567890ab"
}

Get Task Result

Endpoint: POST /getTaskResult

Request

{
  "clientKey": "YOUR_API_KEY",
  "taskId": "a1b2c3d4-5678-90ab-cdef-1234567890ab"
}

Response (Ready)

{
  "errorId": 0,
  "status": "ready",
  "solution": {
    "gRecaptchaResponse": "03AGdBq24PBCbwiDRaS_MJ7Z...",
    "userAgent": "Mozilla/5.0 ...",
    "secChUa": "\"Chromium\";v=\"136\", ..."
  }
}

Code Examples

# Create task
curl -X POST https://api.capbypass.pro/createTask \
  -H "Content-Type: application/json" \
  -d '{
    "clientKey": "YOUR_API_KEY",
    "task": {
      "type": "ReCaptchaV2TaskProxyLess",
      "websiteURL": "https://www.google.com/recaptcha/api2/demo",
      "websiteKey": "6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-"
    }
  }'
import requests
import time

API_KEY = "YOUR_API_KEY"
BASE_URL = "https://api.capbypass.pro"

def solve_recaptcha_v2(website_url, website_key, invisible=False):
    # Create task
    task_data = {
        "clientKey": API_KEY,
        "task": {
            "type": "ReCaptchaV2TaskProxyLess",
            "websiteURL": website_url,
            "websiteKey": website_key
        }
    }
    if invisible:
        task_data["task"]["isInvisible"] = True

    response = requests.post(f"{BASE_URL}/createTask", json=task_data)
    task_id = response.json()["taskId"]

    # Poll for result
    while True:
        result = requests.post(f"{BASE_URL}/getTaskResult", json={
            "clientKey": API_KEY,
            "taskId": task_id
        }).json()

        if result["status"] == "ready":
            return result["solution"]["gRecaptchaResponse"]

        if result.get("errorId"):
            raise Exception(f"Error: {result.get('errorDescription')}")

        time.sleep(3)

# Usage
token = solve_recaptcha_v2(
    "https://www.google.com/recaptcha/api2/demo",
    "6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-"
)
print(f"Token: {token[:50]}...")
const API_KEY = 'YOUR_API_KEY';
const BASE_URL = 'https://api.capbypass.pro';

async function solveRecaptchaV2(websiteURL, websiteKey, isInvisible = false) {
  // Create task
  const task = {
    type: 'ReCaptchaV2TaskProxyLess',
    websiteURL,
    websiteKey
  };
  if (isInvisible) task.isInvisible = true;

  const createRes = await fetch(`${BASE_URL}/createTask`, {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify({ clientKey: API_KEY, task })
  });
  const { taskId } = await createRes.json();

  // Poll for result
  while (true) {
    const resultRes = await fetch(`${BASE_URL}/getTaskResult`, {
      method: 'POST',
      headers: { 'Content-Type': 'application/json' },
      body: JSON.stringify({ clientKey: API_KEY, taskId })
    });
    const result = await resultRes.json();

    if (result.status === 'ready') {
      return result.solution.gRecaptchaResponse;
    }

    await new Promise(r => setTimeout(r, 3000));
  }
}

How to Find the Website Key

Method 1: HTML Source

Look for the data-sitekey attribute in the page source:

<div class="g-recaptcha" data-sitekey="6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-"></div>

Method 2: JavaScript

Search for sitekey or render in loaded scripts:

grecaptcha.render('captcha', {
  sitekey: '6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-'
});

Method 3: Network Tab

Filter requests to google.com/recaptcha and look for the k= parameter:

https://www.google.com/recaptcha/api2/anchor?k=6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-

Using the Token

Insert the token into a hidden textarea before form submission:

document.getElementById('g-recaptcha-response').value = token;
// or
document.querySelector('[name="g-recaptcha-response"]').value = token;

Challenge Types

TypeDescriptionTypical Solve Time
nocaptchaNo challenge, immediate pass1-2s
dynamic3x3 grid, single target5-15s
multicaptcha4x4 grid, multiple targets10-30s

Typical Solve Time

  • Standard v2: 5-20 seconds
  • Invisible v2: 3-10 seconds
  • Maximum timeout: 120 seconds

Error Codes

Error CodeDescription
ERROR_KEY_DOES_NOT_EXISTInvalid API key
ERROR_ZERO_BALANCEInsufficient balance
ERROR_CAPTCHA_UNSOLVABLEChallenge could not be solved
ERROR_TASK_NOT_FOUNDTask ID not found
ERROR_INVALID_TASK_DATAMissing or invalid parameters
ERROR_PROXY_NOT_DEFINEDProxy required for a non-ProxyLess task type — use the ProxyLess variant or supply task.proxy
ERROR_PROXY_CONNECTION_FAILEDCould not connect through your proxy (refused, unreachable, or bad credentials) - check the proxy is alive and reachable
ERROR_PROXY_BANNEDThe target blocked your proxy IP (datacenter or flagged) - use a residential or mobile proxy
ERROR_INVALID_DEVELOPER_KEYThe provided developerKey is invalid or disabled
ERROR_WRONG_TASK_TYPEWrong task type for this site (e.g., standard vs enterprise)
ERROR_TIMEOUTTask exceeded timeout
ERROR_TASK_QUEUE_FULLServer is at capacity — retry in a few seconds
ERROR_TASK_TYPE_COMING_SOONTask type is not yet available
ERROR_TASK_TYPE_INACTIVETask type is currently disabled
ERROR_WORKER_CRASHEDSolver process exited mid-solve — balance refunded, safe to retry
ERROR_INTERNALInternal server error

Next Steps

On this page