Skip to main content
CaptchaKings
  • Trang chủ
  • Đặc trưng
  • Định giá
  • Thử nghiệm
    • Nó hoạt động như thế nào
    • Forum
    • Công cụ quay vòng IP
    • Blog
Search
  • EN English
  • ID Indonesia
  • RU Русский
  • ES Español
  • PT Português
  • VI Tiếng Việt
  • ZH 中文
Đăng nhập Đăng ký miễn phí
  • EN English
  • ID Indonesia
  • RU Русский
  • ES Español
  • PT Português
  • VI Tiếng Việt
  • ZH 中文
Đăng nhập Đăng ký miễn phí

Selenium Captcha Solver API

Solve image captchas inside Selenium WebDriver today — reCAPTCHA & hCaptcha flows are planned previews — Last Updated: August 29, 2026

AI Summary Quick Answer for Developers & AI Agents

Selenium Captcha Solver integrates Selenium WebDriver automation with external solving APIs. CaptchaKings solves classic text/image captchas (~1.2s, $0.80/1k) and token types (GeeTest, Tencent, MTCaptcha, Amazon WAF at $1.00/1k). Send challenge payloads to the REST API and inject the token/text directly using Selenium with a $0.50 free trial.

⚡ TL;DR: Selenium can't solve CAPTCHAs alone. Image/text captchas work today: screenshot the element → send it to the CaptchaKings API → get the answer text back (~1.2s median) → fill it in. The reCAPTCHA token-injection flow below is a planned preview — see /supported-captchas. Free $0.50 balance on signup — no card required.

📋 Status: Live today via the API: image/text captchas ($0.80 per 1,000, ~1.2s median) plus GeeTest, Tencent, xCaptcha, MTCaptcha and Amazon WAF ($1.00 per 1,000) — measured numbers at /benchmarks. reCAPTCHA, hCaptcha and Cloudflare Turnstile are planned, not yet available — see /supported-captchas.

Why Selenium Gets Blocked by CAPTCHAs

reCAPTCHA, hCaptcha, and Cloudflare Turnstile are specifically designed to detect browser automation. Even with undetected-chromedriver or selenium-stealth, high-traffic sites will eventually challenge your bot. Fighting the detection is an arms race you will lose — the professional approach is to solve the challenge programmatically and continue your automation flow.

Step 1 — Install the Dependencies

bash
pip install selenium captchakings
# Optional but recommended for fewer detections:
pip install undetected-chromedriver

Step 2 — reCAPTCHA v2 Token Flow (Planned)

This flow goes live when reCAPTCHA support launches — see /recaptcha-solver. The image-captcha flow below works today. The preview example opens a page, extracts the sitekey, solves it with CaptchaKings, and injects the token:

python
import time
from selenium import webdriver
from captchakings import CaptchaKings

API_KEY  = "ck_your_api_key_here"          # from captchakings.com/dashboard
PAGE_URL = "https://example.com/signup"     # page with the reCAPTCHA

client = CaptchaKings(API_KEY)
driver = webdriver.Chrome()
driver.get(PAGE_URL)

# 1. Extract the sitekey rendered on the page
sitekey = driver.execute_script("""
    const el = document.querySelector('[data-sitekey]');
    return el ? el.getAttribute('data-sitekey') : null;
""")
print("sitekey:", sitekey)

# 2. Ask CaptchaKings to solve it (returns a valid g-recaptcha-response token)
token = client.solve_recaptcha_v2(sitekey=sitekey, page_url=PAGE_URL)
print("token received")

# 3. Inject the token and submit
driver.execute_script("""
    document.getElementById('g-recaptcha-response').innerHTML = arguments[0];
    document.getElementById('g-recaptcha-response').style.display = 'block';
""", token)
driver.execute_script("document.querySelector('form').submit()")

time.sleep(3)
print("Done:", driver.current_url)
driver.quit()

Step 3 — Solve Image / Text CAPTCHAs (3 Lines)

For classic image captchas, screenshot the element and send it straight to the API:

python
img = driver.find_element("css selector", "#captcha-image")
img.screenshot("captcha.png")

result = client.solve("captcha.png")
print(result["prediction"], "| confidence:", result["confidence"])

Supported CAPTCHA Types in Selenium Flows

CAPTCHA TypeAvg. Solve TimePrice / 1,000
AWS WAF (Amazon)~8 s median$1.00
Image / Text / Math / Number~1.2 s median$0.80
GeeTest v3 / v4~0.4 s median$1.00
reCAPTCHA, hCaptcha, Turnstile, FunCaptcha, DataDomePlanned — see the support matrix

Pro Tips for Production Selenium Bots

  1. Reuse sessions. Solve the captcha once, then persist cookies (driver.get_cookies()) instead of re-solving on every run.
  2. Rotate residential proxies. Pair your solver with the CaptchaKings IP Rotator so the IP that solves the captcha matches the IP that submits the form.
  3. Handle failures idempotently. Failed solves are not billed — wrap the call in a retry with exponential backoff and you only pay for successes.
  4. Inject, don't click. Token injection via execute_script is far more reliable than simulating clicks on the reCAPTCHA iframe.

Frequently Asked Questions

How do I bypass reCAPTCHA in Selenium Python?

reCAPTCHA support is planned, not yet live — see /supported-captchas and /recaptcha-solver. At launch you will extract the sitekey, send it to CaptchaKings, inject the returned token into #g-recaptcha-response, then submit the form — exactly as previewed in Step 2 above. Image/text captchas work today via Step 3.

Does this work with undetected-chromedriver and headless mode?

Yes. The solver runs server-side, so it works with any WebDriver flavor: headless Chrome, Firefox, undetected-chromedriver, and remote Selenium Grid / BrowserStack sessions.

What happens if the token is rejected?

Call client.report_bad(task_id) for an automatic refund of that solve, then request a fresh token. Incorrect solves can always be reported for a refund.

🎁 Free $0.50 balance — enough for 625 image captchas or 500 live token solves (GeeTest, Amazon WAF & more). Create your API key →

Related Integration Guides

Playwright Captcha Solver Puppeteer Captcha Solver reCAPTCHA Solver API API Documentation Python Automation Tutorial
Get Your Free API Key
Back to Home
CaptchaKings

CaptchaKings (Captcha Kings) là giải pháp bộ giải captcha AI cho tự động hóa hiện đại - Nhanh chóng, đo lường được và minh bạch

Sản phẩm

  • Đặc trưng
  • Tencent / Captcha Trung Quốc MỚI
  • xCaptcha Solver MỚI
  • Google reCAPTCHA MỚI
  • Tài liệu API
  • Định giá
  • Nó hoạt động như thế nào
  • Các loại CAPTCHA hỗ trợ
  • Điểm chuẩn & Độ chính xác

Tài nguyên

  • Tài liệu cho nhà phát triển
  • Hướng dẫn Selenium MỚI
  • Hướng dẫn Playwright MỚI
  • Hướng dẫn Puppeteer MỚI
  • Công cụ miễn phí MỚI
  • Tiện ích mở rộng Chrome MỚI
  • Blog & Hướng dẫn
  • Xoay vòng IP

So sánh & FAQ

  • Tại sao chọn CaptchaKings?
  • So sánh giá
  • vs 2Captcha
  • vs CapSolver
  • vs CapMonster
  • vs Anti-Captcha
  • Dành cho AI Agents

Công ty

  • Giới thiệu
  • Thử nghiệm
  • Trang tổng quan
  • Hỗ trợ
  • Chính sách bảo mật
  • Chính sách hoàn tiền
  • Điều khoản dịch vụ
  • SLA 99.9%

© 2026 CaptchaKings.com. Mọi quyền được bảo lưu.

🚀 Get Started Free
🎁

Wait! Don't Miss Out

Sign up now and get a $0.50 FREE BALANCE to test our API.

Claim Bonus & Sign Up Free

Chúng tôi sử dụng cookie để nâng cao trải nghiệm của bạn, phân tích lưu lượng truy cập và tối ưu hóa hiệu suất API. Bằng cách tiếp tục duyệt web, bạn đồng ý với chính sách cookie của chúng tôi. Chính sách bảo mật