API Tutorials

How to Solve reCAPTCHA v2 Enterprise Using API

reCAPTCHA v2 Enterprise uses the same checkbox challenge as standard v2, but it verifies tokens through Google's Enterprise API instead of the public siteverify endpoint. The solving process through CaptchaAI is nearly identical — you add one parameter: enterprise=1.

This guide walks through detection, parameter extraction, and solving with working Python and Node.js code.

Not sure if you are facing Enterprise or standard? Read How to Identify reCAPTCHA Enterprise Implementation first.


What you need before you start

Requirement Details
CaptchaAI API key Get one at captchaai.com/api.php
Target page URL The full URL where reCAPTCHA appears
Sitekey From data-sitekey attribute
Enterprise flag Confirmed via enterprise.js script tag
data-s value (if present) Optional additional token on some Enterprise implementations

Step 1: Detect Enterprise implementation

Check the page source for these indicators:

// Enterprise script tag (NOT api.js)
// <script src="https://www.google.com/recaptcha/enterprise.js?render=SITEKEY"></script>

// Enterprise JavaScript object
// grecaptcha.enterprise.render(...)
// grecaptcha.enterprise.execute(...)

If you see enterprise.js or grecaptcha.enterprise, it is Enterprise. If you see api.js and grecaptcha, it is standard.

Step 2: Extract parameters

# Sitekey: from data-sitekey attribute
# <div class="g-recaptcha" data-sitekey="6LcR_RsTAAAA..." data-s="..."></div>

# Or from enterprise.js render parameter
# https://www.google.com/recaptcha/enterprise.js?render=6LcR_RsTAAAA...

Also check for data-s — an additional session token that some Enterprise implementations require.

Step 3: Submit to CaptchaAI

import requests

params = {
    "key": "YOUR_API_KEY",
    "method": "userrecaptcha",
    "googlekey": "6LcR_RsTAAAAAFJR-JhNbC6CC42wKCbR9Hq_kVCd",
    "pageurl": "https://example.com/login",
    "enterprise": 1,  # Required for Enterprise
    "json": 1
}

# Include data-s if present on the page
# params["data-s"] = "data-s-value-from-page"

response = requests.get("https://ocr.captchaai.com/in.php", params=params)
data = response.json()
task_id = data["request"]
print(f"Task ID: {task_id}")
const params = new URLSearchParams({
  key: "YOUR_API_KEY",
  method: "userrecaptcha",
  googlekey: "6LcR_RsTAAAAAFJR-JhNbC6CC42wKCbR9Hq_kVCd",
  pageurl: "https://example.com/login",
  enterprise: 1,
  json: 1,
});

const res = await fetch(`https://ocr.captchaai.com/in.php?${params}`);
const data = await res.json();
console.log(`Task ID: ${data.request}`);

Step 4: Poll for the result

import time

for _ in range(40):
    time.sleep(5)
    result = requests.get("https://ocr.captchaai.com/res.php", params={
        "key": "YOUR_API_KEY",
        "action": "get",
        "id": task_id,
        "json": 1
    }).json()

    if result.get("status") == 1:
        token = result["request"]
        print(f"Token: {token[:50]}...")
        break
    if result.get("request") != "CAPCHA_NOT_READY":
        raise RuntimeError(f"Error: {result['request']}")
let token;
for (let i = 0; i < 40; i++) {
  await new Promise((r) => setTimeout(r, 5000));
  const res = await fetch(
    `https://ocr.captchaai.com/res.php?${new URLSearchParams({
      key: "YOUR_API_KEY", action: "get", id: taskId, json: 1,
    })}`
  );
  const data = await res.json();
  if (data.status === 1) { token = data.request; break; }
  if (data.request !== "CAPCHA_NOT_READY") throw new Error(data.request);
}

Step 5: Inject the token

Token injection is the same as standard v2:

from selenium import webdriver

driver = webdriver.Chrome()
driver.get("https://example.com/login")

# Inject token into hidden field
driver.execute_script(
    f'document.getElementById("g-recaptcha-response").innerHTML = "{token}";'
)

# Check for callback
callback = driver.execute_script(
    'var el = document.querySelector(".g-recaptcha"); '
    'return el ? el.getAttribute("data-callback") : null;'
)
if callback:
    driver.execute_script(f'{callback}("{token}");')
else:
    driver.find_element("css selector", "form").submit()

Complete working example

import requests
import time

def solve_recaptcha_v2_enterprise(api_key, sitekey, page_url, data_s=None):
    params = {
        "key": api_key, "method": "userrecaptcha",
        "googlekey": sitekey, "pageurl": page_url,
        "enterprise": 1, "json": 1
    }
    if data_s:
        params["data-s"] = data_s

    submit = requests.get("https://ocr.captchaai.com/in.php", params=params).json()
    if submit.get("status") != 1:
        raise RuntimeError(f"Submit error: {submit.get('request')}")

    task_id = submit["request"]

    for _ in range(40):
        time.sleep(5)
        result = requests.get("https://ocr.captchaai.com/res.php", params={
            "key": api_key, "action": "get", "id": task_id, "json": 1
        }).json()
        if result.get("status") == 1:
            return result["request"]
        if result.get("request") != "CAPCHA_NOT_READY":
            raise RuntimeError(f"Solve error: {result.get('request')}")

    raise TimeoutError("Solve timed out after 200s")

# Usage
token = solve_recaptcha_v2_enterprise("YOUR_API_KEY", "6LcR_RsTAAAA...", "https://example.com/login")
print(f"Solved: {token[:50]}...")

FAQ

What is the only difference between standard and Enterprise API calls?

Add enterprise=1 to your CaptchaAI request. Everything else — method name, sitekey parameter, polling — is identical.

When do I need the data-s parameter?

Only when the page includes a data-s attribute on the reCAPTCHA div. Most Enterprise implementations do not use it. Check the HTML source.

Does CaptchaAI charge differently for Enterprise?

Check captchaai.com for current pricing. Enterprise solves may use different thread counts.

Can Enterprise tokens be reused?

No. Like standard v2, Enterprise tokens are single-use and expire after approximately 2 minutes.

How do I know if my Enterprise solve failed?

If the target site still blocks you after token injection, verify: (1) you included enterprise=1, (2) the sitekey is correct, (3) data-s is included if present, (4) the token was used within 2 minutes.


Start solving reCAPTCHA v2 Enterprise

Get your API key at captchaai.com/api.php. Add enterprise=1 to your existing reCAPTCHA v2 solve code and you are ready.


Discussions (0)

No comments yet.

Related Posts

API Tutorials How to Solve reCAPTCHA v2 Enterprise with Python
Solve re CAPTCHA v 2 Enterprise using Python and Captcha AI API.

Solve re CAPTCHA v 2 Enterprise using Python and Captcha AI API. Complete guide with sitekey extraction, task...

Automation Python reCAPTCHA v2
Apr 08, 2026
API Tutorials How to Solve reCAPTCHA v2 Enterprise with Node.js
Solve re CAPTCHA v 2 Enterprise using Node.js and Captcha AI API.

Solve re CAPTCHA v 2 Enterprise using Node.js and Captcha AI API. Complete guide with sitekey detection, task...

Automation reCAPTCHA v2 reCAPTCHA Enterprise
Jan 11, 2026
Troubleshooting Common reCAPTCHA v2 Enterprise Errors and Fixes
re CAPTCHA v 2 Enterprise fails for the same reasons as standard v 2 — wrong sitekey, bad page URL, expired tokens — plus a few Enterprise-specific issues.

re CAPTCHA v 2 Enterprise fails for the same reasons as standard v 2 — wrong sitekey, bad page URL, expired to...

Automation reCAPTCHA v2 reCAPTCHA Enterprise
Feb 03, 2026
Explainers reCAPTCHA v2 Invisible: Trigger Detection and Solving
Detect and solve re CAPTCHA v 2 Invisible challenges with Captcha AI — identify triggers, extract parameters, and handle auto-invoked CAPTCHAs.

Detect and solve re CAPTCHA v 2 Invisible challenges with Captcha AI — identify triggers, extract parameters,...

Automation Python reCAPTCHA v2
Apr 07, 2026
Reference CAPTCHA Token Injection Methods Reference
Complete reference for injecting solved CAPTCHA tokens into web pages.

Complete reference for injecting solved CAPTCHA tokens into web pages. Covers re CAPTCHA, Turnstile, and Cloud...

Automation Python reCAPTCHA v2
Apr 08, 2026
Comparisons WebDriver vs Chrome DevTools Protocol for CAPTCHA Automation
Compare Web Driver and Chrome Dev Tools Protocol (CDP) for CAPTCHA automation — detection, performance, capabilities, and when to use each with Captcha AI.

Compare Web Driver and Chrome Dev Tools Protocol (CDP) for CAPTCHA automation — detection, performance, capabi...

Automation Python reCAPTCHA v2
Mar 27, 2026
Tutorials Pytest Fixtures for CaptchaAI API Testing
Build reusable pytest fixtures to test CAPTCHA-solving workflows with Captcha AI.

Build reusable pytest fixtures to test CAPTCHA-solving workflows with Captcha AI. Covers mocking, live integra...

Automation Python reCAPTCHA v2
Apr 08, 2026
Tutorials CAPTCHA Solving Fallback Chains
Implement fallback chains for CAPTCHA solving with Captcha AI.

Implement fallback chains for CAPTCHA solving with Captcha AI. Cascade through solver methods, proxy pools, an...

Automation Python reCAPTCHA v2
Apr 06, 2026
Use Cases Multi-Step Workflow Automation with CaptchaAI
Manage workflows across multiple accounts on CAPTCHA-protected platforms — , action, and data collection at scale.

Manage workflows across multiple accounts on CAPTCHA-protected platforms — , action, and data collection at sc...

Automation Python reCAPTCHA v2
Apr 06, 2026
API Tutorials Case-Sensitive CAPTCHA API Parameter Guide
How to use the regsense parameter for case-sensitive CAPTCHA solving with Captcha AI.

How to use the regsense parameter for case-sensitive CAPTCHA solving with Captcha AI. Covers when to use, comm...

Python Web Scraping Image OCR
Apr 09, 2026
API Tutorials Solving CAPTCHAs with Kotlin and CaptchaAI API
Complete guide to solving re CAPTCHA, Turnstile, and image CAPTCHAs in Kotlin using Captcha AI's HTTP API with Ok Http, Ktor client, and coroutines.

Complete guide to solving re CAPTCHA, Turnstile, and image CAPTCHAs in Kotlin using Captcha AI's HTTP API with...

Automation reCAPTCHA v2 Cloudflare Turnstile
Mar 06, 2026
API Tutorials Image CAPTCHA Base64 Encoding Best Practices
Best practices for base 64 encoding CAPTCHA images before submitting to Captcha AI.

Best practices for base 64 encoding CAPTCHA images before submitting to Captcha AI. Covers format, quality, si...

Python Web Scraping Image OCR
Apr 06, 2026