Skip to main content
Are you experiencing issues obtaining the token?
Contact support

reCAPTCHA v3

Attention!

The task is executed through our own proxy servers. There are no additional costs for proxies — their usage is already included in the service price.

This section describes the task for solving Google reCAPTCHA v3.

reCAPTCHA v3 operates entirely in the background and does not require any user interaction. The system analyzes behavioral and technical signals of the page visitor and generates a risk score for each request. Based on this data, the website decides whether to allow the action using a trust score, which typically ranges from 0.1 to 0.9.

When creating a task, it is recommended to provide two parameters: pageAction and minScore.

Request parameters

type<string>required

RecaptchaV3TaskProxyless


websiteURL<string>required

Address of a webpage with Google ReCaptcha.


websiteKey<string>required

Recaptcha website key.
https://www.google.com/recaptcha/api.js?render=THIS_ONE


minScore<double>optional

Value from 0.1 to 0.9


pageAction<string>optional

Widget action value. Website owner defines what user is doing on the page through this parameter. Default value: verify

Example:
grecaptcha.execute('site_key', {action:'login_test'}).

Create task method

POST
https://api.capmonster.cloud/createTask

Request

{
"clientKey":"API_KEY",
"task": {
"type":"RecaptchaV3TaskProxyless",
"websiteURL":"https://lessons.zennolab.com/captchas/recaptcha/v3.php?level=beta",
"websiteKey":"6Le0xVgUAAAAAIt20XEB4rVhYOODgTl00d8juDob",
"minScore": 0.7,
"pageAction": "myverify"
}
}

Response

{
"errorId":0,
"taskId":407533072
}

Get task result method

Warning!

On some websites, it is important that the UserAgent matches the one used when solving the captcha. Therefore, if CapMonster Cloud returns a UserAgent along with the token, always apply it when submitting the form or confirming the solution on the target page.

Use the getTaskResult to request answer for ReCaptcha3. You will get response within 10 - 30 sec period depending on service workload.

POST
https://api.capmonster.cloud/getTaskResult

Request

{
"clientKey":"API_KEY",
"taskId": 407533072
}

Response

{
"errorId":0,
"status":"ready",
"solution": {
"gRecaptchaResponse":"3AHJ_VuvYIBNBW5yyv0zRYJ75VkOKvhKj9_xGBJKnQimF72rfoq3Iy-DyGHMwLAo6a3"
}
}

For some websites, the response may look like the following. When submitting the solution, make sure to use the UserAgent provided in the response, even if it differs from the one currently used by your browser or script.

{
"errorId": 0,
"status": "ready",
"solution": {
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36",
"gRecaptchaResponse": "0cAFcWeA5Y3...hF8UWA",
"cookies": {
"nocookies": "true"
}
}
}

PropertyTypeDescription
gRecaptchaResponseStringHash which should be inserted into Recaptcha3 submit form in <textarea id="g-recaptcha-response" ></textarea>. It has a length of 500 to 2190 bytes.

How to find all required parameters for task creation

Manually

  1. Open your website where the captcha appears in the browser.
  2. Right-click on the captcha element and select Inspect.

websiteKey

The public site key (sitekey). Usually, it can be found in the included script:

In Elements:

elements

In the Network tab:

network

pageAction

The action name passed to grecaptcha.execute(). For example:​

action

Automatically

To automate parameter extraction, you can retrieve them via a browser (regular or headless, e.g., using Playwright) or directly from HTTP requests. Since dynamic parameter values are short-lived, it is recommended to use them immediately after retrieval.

Important!

The provided code snippets are basic examples for learning how to extract the required parameters. The exact implementation will depend on your captcha page, its structure, and the HTML elements and selectors used.

Show code (in browser)
(() => {
const originalGrecaptcha = window.grecaptcha;

if (!originalGrecaptcha || !originalGrecaptcha.execute) {
console.warn("grecaptcha.execute not found. Wait until it loads.");
return;
}

window.__extractedParams = null;

window.grecaptcha = {
...originalGrecaptcha,
execute: function(sitekey, config) {
console.log("Captured!");
console.log("sitekey:", sitekey);
console.log("action:", config?.action);
window.__extractedParams = {
sitekey,
action: config?.action
};

return originalGrecaptcha.execute(sitekey, config);
},
ready: originalGrecaptcha.ready
};

console.log("grecaptcha.execute is wrapped. Click the button - parameters will be captured.");
})();
Show code (Node.js)
import { chromium } from "playwright";

(async () => {
const browser = await chromium.launch({ headless: false });
const context = await browser.newContext();
const page = await context.newPage();

const jsContents = [];

page.on("response", async (response) => {
try {
const url = response.url();
const ct = response.headers()["content-type"] || "";
if (ct.includes("javascript") || url.endsWith(".js")) {
const text = await response.text();
jsContents.push(text);
}
} catch (e) {}
});

const targetUrl = "https://lessons.zennolab.com/captchas/recaptcha/v3.php?level=beta";
await page.goto(targetUrl, { timeout: 60000 });
await page.waitForTimeout(3000);

const inlineScripts = await page.$$eval("script:not([src])", (scripts) =>
scripts.map((s) => s.textContent)
);
jsContents.push(...inlineScripts);

const executeRegex =
/grecaptcha\.execute\(\s*['"]
(?<sitekey>[^'"]+)['"]\s*,\s*\{[^}]*action\s*:\s*['"](?<action>[^'"]+)['"]/i;

let foundSitekey = null;
let foundAction = null;

for (const js of jsContents) {
const match = js.match(executeRegex);
if (match && match.groups) {
foundSitekey = match.groups.sitekey;
foundAction = match.groups.action;
break;
}
}

console.log({
sitekey: foundSitekey,
action: foundAction,
});

await browser.close();
})();

Use the SDK library

Show code (for browser)
// https://github.com/ZennoLab/capmonstercloud-client-js

import {
CapMonsterCloudClientFactory,
ClientOptions,
RecaptchaV3ProxylessRequest
} from '@zennolab_com/capmonstercloud-client';

document.addEventListener('DOMContentLoaded', async () => {

const cmcClient = CapMonsterCloudClientFactory.Create(
new ClientOptions({ clientKey: 'YOUR_API_KEY' }) // Specify your CapMonster Cloud API key
);

// Optionally, you can check the balance
const balance = await cmcClient.getBalance();
console.log('Balance:', balance);

const recaptchaV3Request = new RecaptchaV3ProxylessRequest({
websiteURL: 'https://lessons.zennolab.com/captchas/recaptcha/v3.php?level=beta', // URL of your page with captcha
websiteKey: '6Le0xVgUAAAAAIt20XEB4rVhYOODgTl00d8juDob',
minScore: 0.6,
pageAction: 'myverify',
});

const solution = await cmcClient.Solve(recaptchaV3Request);
console.log('Solution:', solution);

});
Show code (Node.js)
// https://github.com/ZennoLab/capmonstercloud-client-js

import { CapMonsterCloudClientFactory, ClientOptions, RecaptchaV3ProxylessRequest } from '@zennolab_com/capmonstercloud-client';

const API_KEY = "YOUR_API_KEY"; // Specify your CapMonster Cloud API key

async function solveRecaptchaV3() {
const cmcClient = CapMonsterCloudClientFactory.Create(
new ClientOptions({ clientKey: API_KEY })
);

// Optionally, you can check the balance
const balance = await cmcClient.getBalance();
console.log("Balance:", balance);

const recaptchaV3Request = new RecaptchaV3ProxylessRequest({
websiteURL: "https://lessons.zennolab.com/captchas/recaptcha/v3.php?level=beta", // URL of your page with captcha
websiteKey: "6Le0xVgUAAAAAIt20XEB4rVhYOODgTl00d8juDob",
minScore: 0.6,
pageAction: "myverify",
});

const solution = await cmcClient.Solve(recaptchaV3Request);
console.log("Solution:", solution);
}

solveRecaptchaV3().catch(console.error);
More on the topic in our blog