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. CaptchaAI fully supports reCAPTCHA v2 Enterprise, handling its challenge flows with accurate configuration to ensure reliable solving across protected environments.
Step 1: Identify & Classify the reCAPTCHA
Open browser DevTools (Network tab) and reload the page
Locate the reCAPTCHA v2 anchor request:
https://www.google.com/recaptcha/enterprise/anchor?...enterprise/indicates that this is a reCAPTCHA v2 Enterprise.
Check for
saparameter:Found: URL contains
sa=VALUE(e.g.,sa=LOGIN) → Submit Action. → Use the exactsavalue (case-sensitive)Missing: No
saparameter → Use Proxy. → Requires residential proxy + user agent handling
Extract
googlekey:From anchor URL:
k=6LdxxXXxAAAAAAcXxx...OR from HTML:
data-sitekey="6LdxxXXxAAAAAAcXxx..."
Step 2: Submit to CaptchaAI API (in.php)
Complete request example
curl https://ocr.captchaai.com/in.php \
-F "key=YOUR_API_KEY" \
-F "method=userrecaptcha" \
-F "googlekey=6LdxxXXxAAAAAAcXxxXxxX91xxxxxxxx8xxOx7A" \
-F "pageurl=https://example.com/login" \
-F "proxy=login:[email protected]:8080" \
-F "proxytype=HTTP" \
-F "enterprise=1" \
-F "action=LOGIN" \
-F "json=1"
Recommended Parameters:
json=1: Recommended for structured response & User Agent retrieval.
Conditional Parameters:
action: MUST matchsaparameter value from the anchor request.proxy: Residential proxy is recommended if no action found.proxytype: Proxy type (HTTP, HTTPS, SOCKS4, SOCKS5.).
Success Response
OK|1234567890
Success Response (JSON)
{"status":1,"request":"1234567890"}
Step 3: Retrieve Solution (res.php)
Wait 15-20 seconds, then every 5 second poll:
Complete request example
curl https://ocr.captchaai.com/res.php \
-F "key=YOUR_API_KEY" \
-F "action=get" \
-F "id=1234567890" \
-F "json=1"
Success Response
OK|0cAFcWeA7UXUoUHu2tcAi...79z67O4M1OloFPQ
Success Response (JSON)
{
"status": 1,
"result": "0cAFcWeA7UXUoUHu2tcAi...79z67O4M1OloFPQ",
"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) 144.0.7559.96 Safari/537.36"
}Note: Always use json=1 with reCAPTCHA v2 Enterprise to get the UserAgent used at solving process
Step 4: Inject Solution
Note: The actual captcha implementation on each website may vary. Examples below shows a very common case.
HTTP Clients (Python Example):
import requests
# Your proxy
RESIDENTIAL_PROXY = "http://user:[email protected]:8080" # Same residential proxy used during captcha solving
# Values obtained from CaptchaAI AFTER solving
CAPTCHA_TOKEN = "0cAFcWeA7UXUoUHu2tcAi...79z67O4M1OloFPQ" # From CaptchaAI res.php response
USER_AGENT = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) 144.0.7559.96 Safari/537.36" # MUST be exact value from API response
# Configure session with critical headers and proxy
session = requests.Session()
session.headers.update({
"User-Agent": USER_AGENT,
"Referer": "https://example.com/login",
"Origin": "https://example.com"
})
session.proxies = {
"http": RESIDENTIAL_PROXY,
"https": RESIDENTIAL_PROXY
}
# Submit form WITH reCAPTCHA token
response = session.post(
url="https://example.com/login",
data={
"email": "[email protected]",
"password": "secure_password",
"g-recaptcha-response": CAPTCHA_TOKEN # Injected token
},
timeout=30,
allow_redirects=True
)
Step 5: Verify Success
✔️ Page loaded / Form Submitted → Success!
❌ Access denied → Re-solve (cookie may be expired or proxy/UA mismatched)
HTTP Clients (Python Example):
# Verify success (adjust checks per target site)
if response.status_code == 200 and "dashboard" in response.url:
print("Login successful! Session established.")
else:
print(f"Submission returned status {response.status_code}")
print(f"Response preview: {response.text[:200]}")
And voilà, we’ve successfully passed reCAPTCHA v2 Enterprise, handled verification, and confirmed a valid session, completing the full automation cycle, with CaptchaAI doing all the heavy lifting behind the scenes.
Tips
Always use
json=1to receive User Agent value.Proxy consistency is non-negotiable.
Using the returned User Agent value is highly recommend.
