Glossary
Site key
The site key is the public identifier a website passes to its CAPTCHA widget so the vendor knows which account and domain the check belongs to.
What a site key is
When a site owner registers with a CAPTCHA vendor, they receive two values: a public site key that goes into the page, and a secret key that stays on their server. The site key tells the widget which configuration to load: allowed domains, difficulty, widget mode and, for score products, how results are reported. Anyone can read it in the page source, and that is by design. The secret is what protects verification.
A token issued for one site key will not verify under another, and a site key only works on the domains its owner listed. That pairing is the reason a solver needs both the key and the page URL.
What it looks like per vendor
| Widget | Typical format | Usual location |
|---|---|---|
| reCAPTCHA v2 and v3 | 40 characters, often starting with 6L | data-sitekey or render= on api.js |
| Cloudflare Turnstile | Starts with 0x4 | data-sitekey or turnstile.render() |
| MTCaptcha | Starts with MTPublic- | mtcaptchaConfig.sitekey in a script |
| GeeTest v4 | 32 hex characters called captcha_id | The initGeetest4 call |
How to find it
Start with the simplest search: open the page source and look for sitekey. On server rendered forms, the key sits in a data-sitekey attribute on the widget's container. For reCAPTCHA v3, check the script tag: api.js?render=6Lc... carries the key in the query string, and the same value is passed to grecaptcha.execute.
When the page is built by a JavaScript framework, the attribute may not exist in the HTML at all. Open the browser developer tools, go to the network tab, reload, and filter for recaptcha, turnstile or the vendor name. The request that loads the widget frame contains the key, usually as a k= or sitekey= parameter. You can also type ___grecaptcha_cfg.clients in the console on reCAPTCHA pages and browse the nested objects.
Why a solver needs it
A token is produced by the vendor for a specific key, so the solving side must request it with exactly that key. In a GateSolver task the field is websiteKey, and it sits next to websiteURL:
import re
key = re.search(r'data-sitekey="([^"]+)"', html).group(1)
payload = {"clientKey": "YOUR_API_KEY", "task": {
"type": "ReCaptchaV2TaskProxyLess", "websiteURL": page_url, "websiteKey": key}}
If the key is missing, the API answers with ERROR_INVALID_TASK_DATA and a description that names the field. If the key is wrong, the task may still return a token, but the site's verification will fail because the token belongs to a different configuration.
Keys that change
Most site keys are stable for months or years, so it is reasonable to cache them per domain. Some sites, though, use different keys on login and signup, or switch keys between their mobile and desktop layouts. A cheap safety net is to read the key from the live page each time your script meets a challenge, and fall back to a cached value only when parsing fails.
Keep in mind that the site key is not a credential. Reading it from a public page is normal, and it gives you no access you did not already have. It only allows a CAPTCHA to be completed for that page, as any visitor would.
Related values
Some widgets need more than the key. reCAPTCHA v3 sites pass an action name, Enterprise sites may pass an s value, and Turnstile can carry action and cdata. Collect them at the same time you read the key. The guide on finding a reCAPTCHA site key walks through each location with screenshots described in text.
Common questions
Is it safe to share a site key?
Yes. It is public by design and printed in every page that renders the widget; only the secret key must stay private.
Why does my token fail even though the task succeeded?
The most common cause is a key copied from another page or an older layout, so the token belongs to a different configuration.
Where is the key on a React or Vue page?
Check the network requests that load the widget frame; the key appears as a query parameter there even when the HTML has no attribute.
Does every CAPTCHA type need a site key?
No. Image to text and image classification tasks only need the picture, and challenge pages need the URL and your proxy.
Can one site use several keys?
Yes. Login, signup and checkout forms on the same domain sometimes use separate keys, so read the key from the page you are actually submitting.
Keep reading
- Find the reCAPTCHA site keyFive dependable places to read a reCAPTCHA site key, from the data-sitekey attribute to the k parameter in network requests.
- pageAction (reCAPTCHA action)The action label a page passes to grecaptcha.execute, how to locate it, and why a wrong label sinks good tokens.
- reCAPTCHAGoogle reCAPTCHA in all its forms: v2 checkbox, v2 invisible, v3 score and Enterprise, plus where the token ends up.
- API docscreateTask, getTaskResult, getBalance, error codes and the in.php format.