Glossary
reCAPTCHA: the Google family of challenges
reCAPTCHA is the bot check Google offers to website owners, delivered as a script that issues a signed token after the visitor passes.
What reCAPTCHA is
reCAPTCHA is a free and paid service from Google that a website embeds to judge whether a request comes from a person. The site loads a script from google.com or recaptcha.net, renders a widget with its public site key, and receives a token when the check is complete. The site then posts that token to Google's verification endpoint with its secret key and decides what to do with the reply.
Because it is free at moderate volume and easy to add, reCAPTCHA appears on a huge share of login, signup, contact and search forms. When automation meets a challenge, there is a good chance it is one of the versions below.
The versions side by side
| Version | What the visitor sees | What the site gets |
|---|---|---|
| v2 checkbox | An "I'm not a robot" box, sometimes followed by an image grid | A token that passes or fails |
| v2 invisible | A small badge; the check runs when a button is pressed | A token that passes or fails |
| v3 | Nothing, apart from the badge | A token that verifies into a score from 0.0 to 1.0 |
| Enterprise | Checkbox or score style, loaded from enterprise.js | An assessment with a score and reason codes |
The invisible variant of v2 is still a v2 widget, so it uses the same task as the checkbox with one extra flag. v3 is a different product: there is no puzzle, only a score, and the site chooses the threshold.
What the token is
Whatever the version, the end product is a long opaque string, often beginning with "03A". It is signed by Google, tied to the site key and the domain, valid for about two minutes and accepted only once. The token says nothing readable about the visitor; only the site's server, by calling Google, learns whether it is valid and, for v3, what score it carries.
Where the token goes
On a classic form, the widget writes the token into a hidden textarea named g-recaptcha-response, and the browser sends it with the other fields on submit. Single page apps often skip the textarea and pass the token in a JSON body or a header, frequently from a callback function. Watching the network tab while you submit the form by hand shows you the exact field name and request.
Solving reCAPTCHA through the API
For every version, you send the page URL and the site key, plus the extras that version needs: isInvisible for invisible v2, pageAction for v3, and enterprisePayload when an Enterprise site passes an s value. The answer arrives in solution.gRecaptchaResponse along with the user agent used to earn it.
{"clientKey": "YOUR_API_KEY", "task": {"type": "ReCaptchaV2TaskProxyLess",
"websiteURL": "https://www.google.com/recaptcha/api2/demo",
"websiteKey": "6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-"}}
Prices differ by version: reCAPTCHA v2 costs $0.56 per 1,000 solved tasks and reCAPTCHA v3 costs $0.70. The Enterprise variants are listed separately on the pricing page.
Telling the versions apart quickly
Search the page source. A render= parameter on api.js with a key, or calls to grecaptcha.execute with an action, point to v3. A data-size="invisible" attribute points to invisible v2. A script path containing enterprise.js means Enterprise. Anything else with a visible checkbox is standard v2.
A page can carry more than one widget, for example a v3 script on every page and a v2 checkbox only on the login form. In that case, solve the one whose token the submitting request actually carries, and ignore the rest. If you are unsure, submit the form once by hand and compare the token field with each key on the page.
Common questions
Who runs reCAPTCHA?
Google operates it. Sites embed the script and verify tokens against Google with their own secret key.
How long does a reCAPTCHA token last?
About two minutes from the moment it is issued, and it can be verified only once.
Can one task type solve every reCAPTCHA version?
No. v2, v3 and the two Enterprise variants each have their own task type, because the inputs and scoring differ.
Does reCAPTCHA v3 ever show an image grid?
No. v3 never asks the visitor anything; a site that wants a fallback puzzle usually adds a v2 widget for low scores.
What user agent should I send with the token?
Use the userAgent value returned with the solution where you can, since some sites compare it with the request that submits the token.
Keep reading
- reCAPTCHA EnterpriseThe paid Google Cloud edition of reCAPTCHA: enterprise.js, assessments, the s payload and the signs that give it away.
- g-recaptcha-responseThe hidden textarea that carries a reCAPTCHA token to the server, and how to fill it with a solved answer.
- 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.