reCAPTCHA v2 solver for Selenium Python
Inject a Sonic-issued reCAPTCHA v2 token into your Selenium Python flow. The driver never sees the widget — the token lands directly in the g-recaptcha-response textarea.
Runnable example
from captchasonic import CaptchaSonic
from selenium import webdriver
driver = webdriver.Chrome()
driver.get('https://example.com/login')
sonic = CaptchaSonic('YOUR_API_KEY')
token = sonic.solve(
type='RecaptchaV2TaskProxyless',
website_url=driver.current_url,
website_key='6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-'
).gRecaptchaResponse
driver.execute_script(
'document.getElementById("g-recaptcha-response").value = arguments[0];', token
)
driver.find_element('css selector', 'form').submit()Replace YOUR_API_KEY with a real key from your dashboard. The token is good for one form submission.
FAQ
- Why does my Selenium reCAPTCHA flow get detected?
- Selenium leaks navigator.webdriver=true plus a handful of CDP-specific fingerprint markers that reCAPTCHA Enterprise downscoring picks up. Using a Sonic token instead of clicking the widget sidesteps the fingerprint check entirely.
- Do I need undetected-chromedriver?
- Not for v2 — the token approach bypasses the widget. For v3 or Enterprise, undetected-chromedriver helps but is not required; the action-bound token we return is independent of the navigating session.
- How do I find the websiteKey value?
- Inspect the page for a div with class g-recaptcha and read the data-sitekey attribute. For invisibly-embedded v2 widgets, search the HTML for "sitekey" — it's a 40-character string starting with 6L.
Other reCAPTCHA v2 stacks
- reCAPTCHA v2 · Playwright · Node.jsDrop a Sonic-issued reCAPTCHA v2 token into a Playwright Node.js test or scraper. Token lands directly in the page, no widget interaction required.
- hCaptcha · Selenium · PythonBypass hCaptcha from a Selenium Python script. Drop the Sonic token into the form's hidden field; no clicking the widget.
- FunCaptcha (Arkose) · Selenium · PythonSolve FunCaptcha / Arkose Labs Enterprise from Selenium Python with a Sonic-issued token. Handles rotation, image-pick, and 3D match-the-shape puzzles.
How CaptchaSonic compares for this captcha
Feature-by-feature against the four most-mentioned alternatives. Independently benchmarked; numbers refresh quarterly.
| Feature | CaptchaSonic | 2Captcha | CapSolver | Anti-Captcha | CapMonster Cloud |
|---|---|---|---|---|---|
| AI / ML solver (no human relay) | |||||
| reCAPTCHA v2 / v3 / Enterprise | |||||
| Avg. solve time (reCAPTCHA v2) | < 3s | ~12s | ~8s | ~10s | ~7s |
| Success rate (trailing 30d) | 99.9% | ~95% | ~98% | ~95% | ~97% |
| Price per 1k — reCAPTCHA v2 | $0.80 | $2.99 | $0.90 | $2.00 | $1.00 |
| Proxy + proxyless modes | |||||
| Free trial credits | |||||
| SDK languages (Py, Node, Go, C#, Java, PHP) | 6 | 6 | 4 | 5 | 4 |
| Selenium / Puppeteer / Playwright examples | |||||
| Browser extension | |||||
| Webhook callbacks | |||||
| 99.9% uptime SLA |
Yes / No / Partial reflect publicly documented support. Pricing and solve-time figures snapshot the published rate at the time this page was last updated.
Related guides
- reCAPTCHA Solver
AI bypass for reCAPTCHA v2, v3 and Enterprise.
- hCaptcha Solver
Token solver for hCaptcha and hCaptcha Enterprise.
- API Docs
createTask, getTaskResult, getBalance — full reference.
- GeeTest v3 / v4
Slide, icon, space and gobang puzzles solved.
- MTCaptcha Solver
Token bypass for invisible and visible MTCaptcha.
- AWS WAF Captcha
AWS WAF token solver for the WAF-CAPTCHA challenge.