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 Type | Proxy Required | Description |
|---|---|---|
ReCaptchaV2TaskProxyLess | No | Standard v2, uses our proxy |
ReCaptchaV2Task | Yes | Standard v2, requires your proxy |
Create Task
Endpoint: POST /createTask
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
clientKey | String | Yes | Your API key |
task.type | String | Yes | Task type (see table above) |
task.websiteURL | String | Yes | Page URL containing the captcha |
task.websiteKey | String | Yes | reCAPTCHA site key |
task.isInvisible | Boolean | No | Set true for invisible reCAPTCHA |
task.proxy | String | No | Required 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
| Type | Description | Typical Solve Time |
|---|---|---|
nocaptcha | No challenge, immediate pass | 1-2s |
dynamic | 3x3 grid, single target | 5-15s |
multicaptcha | 4x4 grid, multiple targets | 10-30s |
Typical Solve Time
- Standard v2: 5-20 seconds
- Invisible v2: 3-10 seconds
- Maximum timeout: 120 seconds
Error Codes
| Error Code | Description |
|---|---|
ERROR_KEY_DOES_NOT_EXIST | Invalid API key |
ERROR_ZERO_BALANCE | Insufficient balance |
ERROR_CAPTCHA_UNSOLVABLE | Challenge could not be solved |
ERROR_TASK_NOT_FOUND | Task ID not found |
ERROR_INVALID_TASK_DATA | Missing or invalid parameters |
ERROR_PROXY_NOT_DEFINED | Proxy required for a non-ProxyLess task type — use the ProxyLess variant or supply task.proxy |
ERROR_PROXY_CONNECTION_FAILED | Could not connect through your proxy (refused, unreachable, or bad credentials) - check the proxy is alive and reachable |
ERROR_PROXY_BANNED | The target blocked your proxy IP (datacenter or flagged) - use a residential or mobile proxy |
ERROR_INVALID_DEVELOPER_KEY | The provided developerKey is invalid or disabled |
ERROR_WRONG_TASK_TYPE | Wrong task type for this site (e.g., standard vs enterprise) |
ERROR_TIMEOUT | Task exceeded timeout |
ERROR_TASK_QUEUE_FULL | Server is at capacity — retry in a few seconds |
ERROR_TASK_TYPE_COMING_SOON | Task type is not yet available |
ERROR_TASK_TYPE_INACTIVE | Task type is currently disabled |
ERROR_WORKER_CRASHED | Solver process exited mid-solve — balance refunded, safe to retry |
ERROR_INTERNAL | Internal server error |