reCAPTCHA
How to solve invisible reCAPTCHA v2
Invisible reCAPTCHA v2 runs when a button is pressed instead of when a box is ticked, and it usually hands its token to a JavaScript callback. Solving it takes one extra task field and one extra step in the page.
How the invisible variant differs
The checkbox and the invisible widget are the same product with different triggers. With the checkbox, the visitor clicks "I'm not a robot" and the token lands in a hidden textarea while the form waits. With invisible reCAPTCHA, the site calls grecaptcha.execute() when the visitor presses a button; Google decides in the background whether to show an image challenge, and when it is done it passes the token to a function the site registered, the callback. That callback is what submits the form.
This has a practical consequence for automation. Filling the hidden textarea alone often does nothing, because the page is waiting for its callback to run, not for the field to change. The token is the same kind of string you get for the checkbox, verified by the site the same way, but the delivery path is different.
Recognise it on the page
You can usually tell within a few seconds of opening developer tools:
- The badge. A small "protected by reCAPTCHA" box sits fixed in the bottom right corner (some sites hide it with CSS and show a text notice instead). There is no checkbox anywhere.
- The size attribute. The element with
class="g-recaptcha"carriesdata-size="invisible", or the site callsgrecaptcha.render()withsize: 'invisible'. - The anchor iframe. Its
srccontainssize=invisiblenext to thek=parameter that holds the site key. - The script tag. It loads
api.jswithout arender=site key. Arender=6L...value points to v3 instead, which is a different task type; the guide on how to identify the reCAPTCHA version separates the two.
The v2 invisible badge and the v3 badge look identical, so never decide on the badge alone. The deciding signals are data-size="invisible" or size=invisible in the iframe for v2, and render= plus grecaptcha.execute(key, {action}) for v3.
Send the task with isInvisible
The task is the normal reCAPTCHA v2 task with one extra flag. isInvisible: true tells the solver to produce a token the way the invisible widget does, without the checkbox interaction. This is the task object you send to /createTask next to your clientKey:
{"websiteURL": "https://join.example.org/account/create", "isInvisible": true,
"websiteKey": "6Lc_INVISIBLE_SIGNUP_KEY", "type": "ReCaptchaV2TaskProxyLess"}
If the site passes an action value to the widget, add it as pageAction. Polling is unchanged: call /getTaskResult with the task id every three seconds until status is ready, then read solution.gRecaptchaResponse. Pricing is the same as the checkbox, $0.56 per 1,000 solved tasks, and nothing is charged for tasks that fail.
Find the callback
The callback name is the key piece of this flow. Look in three places, in this order:
- The data attribute. The element with
class="g-recaptcha"(often the submit button itself) hasdata-callback="onSubmit"or similar. That string is the name of a global function. - The render call. Search the page scripts for
grecaptcha.render(. The options object has acallbackproperty that may be a named function or an inline one. - The live config. If the callback is an inline or bundled function, it is not reachable by name. The reCAPTCHA script keeps every widget's options in a global object, and the guide on how to find the reCAPTCHA callback function shows a short script that walks it and returns the function itself.
Deliver the token
Do not click the protected button in your automation. Clicking it calls grecaptcha.execute(), which starts Google's own check inside your browser and may open an image challenge. Instead, fill in the form fields, write the token into the response field for good measure, and call the callback yourself.
// Run inside the page (Playwright page.evaluate, Puppeteer, Selenium execute_script)
(token) => {
const area = document.querySelector('textarea.g-recaptcha-response, #g-recaptcha-response');
if (area) area.value = token;
const trigger = document.querySelector('.g-recaptcha[data-callback], [data-sitekey][data-callback]');
const name = trigger && trigger.dataset.callback;
if (name && typeof window[name] === 'function') {
window[name](token);
return 'called ' + name;
}
return 'no named callback, use the config walk';
}
A typical callback reads the form, attaches the token and calls form.submit() or sends a fetch request. Watch the network panel after calling it: you should see the form's request leave the page with your token inside. If the callback is a minified function inside a bundle, the config walk from the callback guide returns a reference you can call directly with the same argument.
When the token arrives but the form still fails
Invisible widgets are common on login and signup forms, which tend to have strict back ends. A few patterns explain most refusals:
- Stale token. The callback was called long after the solve. Keep the gap well under two minutes.
- Form not ready. The callback submitted before your script filled the fields. Fill first, solve, then call.
- Wrong widget. Pages with two widgets (for example login and signup in one modal) have two callbacks. Match the element inside the form you are submitting.
- IP checks. Some sites compare the solving IP and the submitting IP. Switch to
ReCaptchaV2Taskwith your own proxy. - It was v3. If the site calls
grecaptcha.executewith a site key and an action object, it expects a v3 token; use the steps for reCAPTCHA v3.
Without a browser
When the callback only copies the token into the form and submits, you can skip the browser entirely and post the form yourself with the token in g-recaptcha-response, exactly as for the checkbox. Read the callback's source once to confirm what it does. If it adds other values, such as a timestamp or a hash of the fields, reproduce them, or keep the browser and let the callback run.
Common questions
Is invisible reCAPTCHA the same as reCAPTCHA v3?
No. Both show a badge, but invisible v2 returns a pass or a challenge, while v3 returns a score the site checks. They use different task types.
Is the isInvisible flag really needed?
You may still get a token, but it is produced for the checkbox flow, and strict sites can refuse it. Set the flag whenever data-size is invisible.
Should my script click the protected button?
No. The click starts Google's own check in your browser. Fill the form, solve through the API and call the callback instead.
Can the callback be anonymous?
Yes. Then it has no global name, and you reach it through the reCAPTCHA configuration object the widget script keeps in the page.
Does the invisible variant cost more?
No. It is billed as a reCAPTCHA v2 task, $0.56 for every 1,000 that are solved.
Keep reading
- Invisible reCAPTCHAThe badge-only mode of reCAPTCHA v2, how a button press starts it, and the isInvisible flag your task needs.
- Find the reCAPTCHA callback functionFrom data-callback to a walk through the ___grecaptcha_cfg clients object: how to reach the function that consumes the token.
- Identify which reCAPTCHA version a site usesCheckbox, badge or silent score: read the script URL, iframe size and execute calls to name the exact reCAPTCHA variant.
- reCAPTCHA v2 solver$0.56 per 1,000 tasks, answers under 9 seconds.