Skip to main content

reCAPTCHA V2 Enterprise

reCAPTCHA V2 Enterprise is Google's advanced implementation of the "I'm not a robot" challenge, designed with enhanced security analytics and adaptive risk evaluation. It behaves like standard reCAPTCHA V2 but enforces stricter validation using enterprise-grade risk signals.

Overview

reCAPTCHA V2 Enterprise differs from standard V2 in that it:

  • Uses enterprise-grade risk scoring with enhanced ML models
  • Returns a token that must be injected into the page
  • Requires the solver's User-Agent when submitting the token
  • Often involves an sa parameter (action) in the anchor URL
  • A residential proxy is recommended when sa is unavailable
reCAPTCHA V2 Enterprise Example

Example: reCAPTCHA V2 Enterprise widget

Always use json=1

With reCAPTCHA V2 Enterprise, always use json=1 when polling the result. The response will include the solver's User-Agent which you must use alongside the token when submitting to the target website.

How to Solve reCAPTCHA V2 Enterprise

Step 1: Locate the Site Key and Action

Find the reCAPTCHA Enterprise site key from the target webpage:

  1. Inspect the element's code on the page where you found reCAPTCHA
  2. Find the anchor request beginning with www.google.com/recaptcha/enterprise/anchor
  3. Copy the k parameter value (the sitekey), and note the sa parameter (action) if present
https://www.google.com/recaptcha/enterprise/anchor?ar=1&k=6LdxxXXxAAAAAAcX...&sa=LOGIN&...

Step 2: Submit the Task to CaptchaAI

Send a POST request to https://ocr.captchaai.com/in.php with enterprise=1:

import requests

response = requests.post("https://ocr.captchaai.com/in.php", data={
'key': 'YOUR_API_KEY',
'method': 'userrecaptcha',
'googlekey': '6LdxxXXxAAAAAAcXxxXxxX91xxxxxxxx8xxOx7A',
'pageurl': 'https://example.com/login',
'enterprise': 1,
'action': 'LOGIN', # optional — sa= value from anchor URL
'proxy': 'user:pass@host:port', # recommended if sa= unavailable
'proxytype': 'HTTP',
'json': 1
})

task_id = response.json()['request']
print(f"Task ID: {task_id}")

Step 3: Retrieve the Solution

Wait 15–20 seconds, then poll with json=1 to receive both the token and the solver's User-Agent:

import time

time.sleep(20)

while True:
result = requests.get("https://ocr.captchaai.com/res.php", params={
'key': 'YOUR_API_KEY',
'action': 'get',
'id': task_id,
'json': 1
}).json()

if result['status'] == 1:
token = result['result']
user_agent = result['user_agent']
print(f"Token: {token}")
print(f"User-Agent: {user_agent}")
break

time.sleep(5)

Step 4: Inject the Token

Set the g-recaptcha-response field and use the same User-Agent when submitting:

// Set the token in the hidden field
document.getElementById("g-recaptcha-response").innerHTML = "TOKEN_FROM_captchaai";

// Then submit the form using the solver's User-Agent in your HTTP client headers
Use the solver's User-Agent

Always submit the token to the target website using the same User-Agent returned in the response. Mismatched User-Agents will cause token validation to fail.