API Tutorials

How to Solve reCAPTCHA v3 Automatically Using API

reCAPTCHA v3 runs silently — no checkbox, no image grid. Instead, it assigns a score between 0.1 (bot) and 0.9 (human) based on user behavior. The site's backend checks this score and decides whether to allow or block the request.

CaptchaAI solves reCAPTCHA v3 by generating a valid token with an acceptable score (typically 0.3, which passes most site thresholds). The process is: extract the sitekey and action parameter from the page, submit them to the API, and use the returned token in your request.


What you need before you start

Requirement Details
CaptchaAI API key Get one at captchaai.com/api.php
Sitekey Found in api.js?render=SITEKEY or grecaptcha.execute()
Action Found in grecaptcha.execute(sitekey, {action: 'login'})
Page URL The full URL where reCAPTCHA v3 runs

Step 1: Find the sitekey

reCAPTCHA v3 sitekeys appear in:

// In the script tag:
// <script src="https://www.google.com/recaptcha/api.js?render=6LfZil0UAAAAADM1Dpz..."></script>

// In JavaScript code:
// grecaptcha.execute('6LfZil0UAAAAADM1Dpz...', {action: 'submit'})

// In the global config:
// ___grecaptcha_cfg.clients[0].Y.Y.sitekey

Step 2: Find the action parameter

The action describes what the user is doing. Search the page JavaScript for grecaptcha.execute:

// grecaptcha.execute('SITEKEY', {action: 'login'})    → action = "login"
// grecaptcha.execute('SITEKEY', {action: 'submit'})   → action = "submit"
// grecaptcha.execute('SITEKEY', {action: 'homepage'})  → action = "homepage"

If you cannot find the action, use "verify" as the default.

Step 3: Submit to CaptchaAI

import requests

response = requests.get("https://ocr.captchaai.com/in.php", params={
    "key": "YOUR_API_KEY",
    "method": "userrecaptcha",
    "version": "v3",
    "googlekey": "6LfZil0UAAAAADM1Dpzsw9q0F11-bmervx9g5fE",
    "action": "login",
    "pageurl": "https://example.com/login",
    "json": 1
})

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

```javascript const params = new URLSearchParams({ key: "YOUR_API_KEY", method: "userrecaptcha", version: "v3", googlekey: "6LfZil0UAAAAADM1Dpzsw9q0F11-bmervx9g5fE", action: "login", pageurl: "https://example.com/login",

Full Working Code

Complete runnable examples for this article in Python, Node.js, PHP, Go, Java, C#, Ruby, Rust, Kotlin & Bash.

View on GitHub →

Discussions (0)

No comments yet.