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 中文
登录 免费注册

Python Captcha Solver

Image captchas in Python today — reCAPTCHA & hCaptcha planned — updated August 2026

TL;DR — AI Quick Answer (Python Captcha Solver)

CaptchaKings enables seamless captcha recognition in Python 3.8+ using simple requests or async aiohttp without heavy external SDK dependencies:

  • Image & Text Captchas: Send a single multipart POST to https://captchakings.com/api/process.php for ~1.2s median resolution at $0.80/1k.
  • Async / High-Concurrency: Native compatibility with aiohttp and asyncio.gather for solving thousands of challenges concurrently.
  • Browser Automation: Integrates directly with Selenium, Playwright Python, and Undetected-Chromedriver.
  • Free Trial: $0.50 free balance on signup (no credit card required).

Support 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.

Option 1: Image Captchas via REST API (Live)

The simplest path for image captcha solving — a single multipart POST with requests (official SDKs are on the roadmap; you don't need one):

terminal
pip install requests
solve_image.py
import requests

API_KEY = "your_api_key_here"

with open("captcha.jpg", "rb") as f:
    response = requests.post(
        "https://captchakings.com/api/process.php",
        headers={"Authorization": f"Bearer {API_KEY}"},
        files={"captcha": f}
    )

data = response.json()
if data.get("success"):
    print(data["data"]["prediction"])       # solved text
    print(data["data"]["confidence"])       # 0-100
    print(data["billing"]["balance_remaining"])
else:
    print("Error:", data["error"]["message"])

Your API key is in Dashboard → API Keys after signing up.

Option 2: reCAPTCHA v2 Token Flow with requests (Planned)

reCAPTCHA v2/v3 and hCaptcha will be solved as token tasks: you submit the page URL and site key, and you receive a token to inject. This flow goes live when reCAPTCHA support launches — the exact endpoint and request format will be announced on the changelog; see /recaptcha-solver. The image-captcha flow above works today. The outline below is a preview of the planned pipeline:

recaptcha_solver.py — planned preview
import requests

API_KEY = "your_api_key_here"

def solve_recaptcha_v2(page_url, site_key):
    # The final reCAPTCHA endpoint and request format will be
    # announced on the CaptchaKings changelog at launch.
    # Planned flow:
    #   1. POST your API key + page URL + site key to the solver endpoint
    #   2. Receive the g-recaptcha-response token in the API response
    #   3. Return the token for injection into the target form
    raise NotImplementedError("reCAPTCHA support is coming soon to CaptchaKings")

Using the Token with Selenium (Planned)

Once reCAPTCHA support launches and you have the gRecaptchaResponse token, inject it into the hidden textarea and submit — the standard flow for Python captcha automation (preview):

selenium_flow.py — planned preview
from selenium import webdriver

driver = webdriver.Chrome()
driver.get("https://example.com/signup")

token = solve_recaptcha_v2(driver.current_url, "SITE_KEY_FROM_PAGE")

driver.execute_script(
    'document.getElementById("g-recaptcha-response").innerHTML = arguments[0];',
    token
)
driver.find_element("css selector", "form").submit()

High-Volume: Async with aiohttp

Solving thousands of images? Don't block on one request at a time. The image API supports concurrent requests, so async clients scale linearly:

async_bulk.py
import aiohttp
import asyncio

API_KEY = "your_api_key_here"
API_URL = "https://captchakings.com/api/process.php"

async def solve_one(session, path):
    with open(path, "rb") as f:
        form = aiohttp.FormData()
        form.add_field("captcha", f, filename=path)
        async with session.post(
            API_URL,
            headers={"Authorization": f"Bearer {API_KEY}"},
            data=form
        ) as resp:
            data = await resp.json()
            return data["data"]["prediction"] if data.get("success") else None

async def main():
    files = ["cap1.jpg", "cap2.jpg", "cap3.jpg"]
    async with aiohttp.ClientSession() as session:
        results = await asyncio.gather(*[solve_one(session, f) for f in files])
        print(results)

asyncio.run(main())

Endpoint Recap

Captcha TypeEndpointResult
Image captchacaptchakings.com/api/process.phpSolved text (synchronous) — live
GeeTest, Tencent, xCaptcha, MTCaptcha, Amazon WAFcaptchakings.com/api/geetest.php, tencent.php, xcaptcha.php, mtcaptcha.php, amazon.phpCoordinates / solution (synchronous) — live
reCAPTCHA v2/v3, hCaptchaAnnounced at launchPlanned — preview only, not yet available
2Captcha-compatiblecaptchakings.com/in.php / res.phpDrop-in migration format (xCaptcha only)

Best Practices

  • Set generous timeouts — image OCR answers in ~1.2s median, but Amazon WAF challenges can take up to 30s; allow at least 30s before retrying.
  • Retry with a fresh image on failure rather than resubmitting a stale challenge forever.
  • Reuse one requests.Session in long-running workers to keep connections alive.
  • Check confidence on image solves; resubmit when it's below your threshold instead of accepting garbage.
  • Never hardcode the key — load it from an environment variable in production.

Frequently Asked Questions

Is there an official Python library?

No official library yet — SDKs are on the roadmap and will be announced on the changelog. You don't need one: a plain requests multipart POST covers image captchas in a handful of lines, and that works today. reCAPTCHA/hCaptcha support is planned (see /supported-captchas and /recaptcha-solver); the preview above shows the flow that will apply at launch.

How do I solve reCAPTCHA v2 in Python?

reCAPTCHA support is planned, not yet available via the API — see /supported-captchas and /recaptcha-solver. At launch, you will POST the page URL and site key to the CaptchaKings solver endpoint (exact request format announced on the changelog), then inject the returned gRecaptchaResponse token into the form. The image-captcha flow on this page works today.

Does it work with Selenium / Playwright?

Yes. The image-captcha API fits any Selenium/Playwright workflow today. For reCAPTCHA (planned), the API will return a token your browser automation injects into g-recaptcha-response and submits — the solving happens on our side, so your browser never runs the challenge.

What does it cost?

Image captchas: $0.80 per 1,000 solves via the generic image API. Token types (GeeTest, Tencent, xCaptcha, MTCaptcha, Amazon WAF): $1.00 per 1,000. Pay-as-you-go, no subscription. $0.50 free balance on signup, no credit card. See the full price comparison against other services.

Integration Guides for Other Languages

  • Node.js Captcha Solver Guide
  • PHP Captcha Solver Guide
  • cURL / Terminal Guide
  • reCAPTCHA Solver — How It Works
  • Full API Documentation
  • Free Browser Tools (no code)

Start solving from Python today

$0.50 free balance on signup — test with your own captchas.

Get Your API Key
CaptchaKings

CaptchaKings (Captcha Kings) 是用于现代自动化的 AI 验证码识别 API - 快速、精准且透明

产品服务

  • 特征
  • 腾讯 / 中文验证码 NEW
  • xCaptcha 识别 NEW
  • Google reCAPTCHA NEW
  • API 开发文档
  • 定价
  • 它是如何运作的
  • 支持的验证码
  • 基准测试与精度

开发资源

  • 开发者文档
  • Selenium 指南 NEW
  • Playwright 指南 NEW
  • Puppeteer 指南 NEW
  • 免费工具箱 NEW
  • Chrome 扩展插件 NEW
  • 博客与教程
  • IP 轮换器

对比与常见问题

  • 为什么选择 CaptchaKings?
  • 价格对比
  • vs 2Captcha
  • vs CapSolver
  • vs CapMonster
  • vs Anti-Captcha
  • 面向 AI 智能体

关于公司

  • 关于我们
  • 演示
  • 仪表板
  • 客户支持
  • 隐私政策
  • 退款政策
  • 服务条款
  • 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 政策。 隐私政策