Skip to main content
CaptchaKings
  • Главная
  • Возможности
  • Цены
  • Демо
    • Как это работает
    • Forum
    • IP Ротатор
    • Блог
Search
  • EN English
  • ID Indonesia
  • RU Русский
  • ES Español
  • PT Português
  • VI Tiếng Việt
  • ZH 中文
Войти Регистрация
  • EN English
  • ID Indonesia
  • RU Русский
  • ES Español
  • PT Português
  • VI Tiếng Việt
  • ZH 中文
Войти Регистрация

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) — это AI API для решения капчи в современной автоматизации: быстро, точно и прозрачно

Продукты

  • Возможности
  • Tencent / Китайская капча NEW
  • xCaptcha Солвер NEW
  • Google reCAPTCHA NEW
  • Документация API
  • Цены
  • Как это работает
  • Поддерживаемые капчи
  • Бенчмарки

Ресурсы

  • Документация для разработчиков
  • Гайд по Selenium NEW
  • Гайд по Playwright NEW
  • Гайд по Puppeteer NEW
  • Бесплатные инструменты NEW
  • Расширение Chrome NEW
  • Блог и руководства
  • IP Ротатор

Сравнения и FAQ

  • Почему CaptchaKings?
  • Сравнение цен
  • vs 2Captcha
  • vs CapSolver
  • vs CapMonster
  • vs Anti-Captcha
  • Для ИИ-агентов

Компания

  • О нас
  • Демо
  • Кабинет
  • Поддержка
  • Политика конфиденциальности
  • Политика возврата
  • Условия обслуживания
  • SLA 99.9%

© 2026 CaptchaKings.com. Все права защищены.

🚀 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

Мы используем файлы cookie для улучшения работы сайта, анализа посещаемости и оптимизации API. Продолжая использовать наш сайт, вы соглашаетесь с нашей политикой использования файлов cookie. Политика конфиденциальности