Comparisons

How to Identify reCAPTCHA Version (v2 vs Enterprise)

Different reCAPTCHA versions require different CaptchaAI parameters. Sending the wrong version wastes time and API calls. This guide shows you how to identify the exact version in under 60 seconds by checking four things in the page source.


Quick detection flowchart

Check If you find... Version
Visible checkbox "I'm not a robot" Standard checkbox widget v2 Standard
data-size="invisible" or button with data-sitekey No visible widget v2 Invisible
enterprise.js in script tag Enterprise script loaded v2 or v3 Enterprise
api.js?render=SITEKEY with no checkbox Score-based, runs silently v3 Standard

Detection steps

1. Check for a visible checkbox

If you see the "I'm not a robot" checkbox, it is reCAPTCHA v2 Standard. Open DevTools and confirm:

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

2. Check the script tag

Right-click → View Source and search for recaptcha:

<!-- Standard v2 or v3 -->
<script src="https://www.google.com/recaptcha/api.js"></script>
<script src="https://www.google.com/recaptcha/api.js?render=SITEKEY"></script>

<!-- Enterprise v2 or v3 -->
<script src="https://www.google.com/recaptcha/enterprise.js"></script>
<script src="https://www.google.com/recaptcha/enterprise.js?render=SITEKEY"></script>
  • api.js → Standard
  • enterprise.js → Enterprise
  • ?render=SITEKEY → v3 (score-based)
  • No render parameter → v2 (checkbox or invisible)

3. Check for invisible mode

Search for data-size="invisible":

<div class="g-recaptcha" data-sitekey="..." data-size="invisible" data-callback="onSubmit"></div>

Or look for a button with data-sitekey:

<button data-sitekey="..." data-callback="onSubmit">Submit</button>

4. Check JavaScript execution

Open the browser console and run:

// Check which object exists:
console.log('grecaptcha:', typeof grecaptcha);
console.log('enterprise:', typeof grecaptcha?.enterprise);

// Standard: grecaptcha exists, enterprise is undefined
// Enterprise: grecaptcha.enterprise exists

// Check for v3 execute calls:
// Look in source for: grecaptcha.execute('SITEKEY', {action: '...'})
// or: grecaptcha.enterprise.execute('SITEKEY', {action: '...'})

Detection with code

import requests
from bs4 import BeautifulSoup

def detect_recaptcha_version(url):
    response = requests.get(url, headers={"User-Agent": "Mozilla/5.0"})
    html = response.text

    version = {"type": None, "enterprise": False, "sitekey": None}

    # Check for Enterprise
    if "recaptcha/enterprise.js" in html:
        version["enterprise"] = True

    # Check for v3 (render parameter)
    if "render=" in html and "recaptcha" in html:
        version["type"] = "v3"

    # Check for visible checkbox
    soup = BeautifulSoup(html, "html.parser")
    recaptcha_div = soup.find("div", class_="g-recaptcha")

    if recaptcha_div:
        version["sitekey"] = recaptcha_div.get("data-sitekey")
        if recaptcha_div.get("data-size") == "invisible":
            version["type"] = "v2_invisible"
        elif not version["type"]:
            version["type"] = "v2_standard"

    # Check buttons with data-sitekey
    btn = soup.find(attrs={"data-sitekey": True})
    if btn and btn.name == "button":
        version["type"] = "v2_invisible"
        version["sitekey"] = btn.get("data-sitekey")

    return version

result = detect_recaptcha_version("https://example.com")
print(result)
# {'type': 'v2_standard', 'enterprise': False, 'sitekey': '6Le-wvkSAAAAAN...'}

CaptchaAI parameters by version

Version Method Extra params
v2 Standard method=userrecaptcha
v2 Invisible method=userrecaptcha invisible=1
v2 Enterprise method=userrecaptcha enterprise=1
v3 Standard method=userrecaptcha version=v3, action=...
v3 Enterprise method=userrecaptcha version=v3, enterprise=1, action=...

FAQ

How can I tell v2 from v3 without seeing the source code?

If there is a visible checkbox or image challenge, it is v2. If there is no visible widget but you see a reCAPTCHA badge in the bottom-right corner, it is likely v3.

What if a site uses both v2 and v3?

Some sites load v3 on every page for analytics and show v2 on specific forms. Check the specific page where your automation needs to pass.

Does the detection method change for Enterprise?

Only the script tag changes (enterprise.js vs api.js). The visible behavior is the same.

How do I detect reCAPTCHA in a single-page app (SPA)?

SPAs load reCAPTCHA dynamically. Use browser DevTools Network tab to watch for requests to google.com/recaptcha/.

What if I use the wrong version parameter?

The token may be generated but rejected by the target site's backend. Always verify the version before calling the API.


Next steps

Once you have identified the version, follow the matching guide:


Ready to solve CAPTCHAs? Get your CaptchaAI API key and start integrating today.

Discussions (0)

No comments yet.