Skip to main content

AI-powered CAPTCHA solver SDK. Solve reCAPTCHA, hCaptcha, Turnstile, and 40+ types.

Project description

CaptchaKings Python SDK

PyPI version Python 3.7+ License: MIT Downloads

The fastest AI-powered CAPTCHA solver API. Solve reCAPTCHA, hCaptcha, Turnstile, FunCaptcha, GeeTest, Amazon WAF, and 40+ more captcha types with a simple Python SDK.

🎉 Get 1000 free credits when you sign up!


⚡ Quick Start

pip install captchakings
from captchakings import CaptchaKings

solver = CaptchaKings(api_key="YOUR_API_KEY")

# Solve text/image captcha
result = solver.solve_image("captcha.png")
print(result.text)  # "xK9mP2"

# Solve reCAPTCHA v2
token = solver.recaptcha_v2(
    sitekey="6Le-wvkSAAAAAPBMRTvw...",
    url="https://example.com"
)
print(token)

That's it. 3 lines of code. 🚀


📦 Installation

pip install captchakings

Or install from source:

git clone https://github.com/CaptchaKings/captchakings-python.git
cd captchakings-python
pip install -e .

🎯 Supported Captcha Types

Type Method Avg Speed
Text/Image solve_image() < 1s
reCAPTCHA v2 recaptcha_v2() < 15s
reCAPTCHA v3 recaptcha_v3() < 10s
hCaptcha hcaptcha() < 20s
Cloudflare Turnstile turnstile() < 10s
FunCaptcha funcaptcha() < 15s
GeeTest v3/v4 geetest() < 10s
Amazon WAF amazon_waf() < 20s
DataDome datadome() < 15s
MTCaptcha solve_mtcaptcha() < 3s
Slider slider() < 5s
Rotate rotate() < 5s

📖 Examples

Text/Image Captcha

from captchakings import CaptchaKings

solver = CaptchaKings(api_key="YOUR_API_KEY")

# From file
result = solver.solve_image("captcha.png")
print(f"Text: {result.text}, Confidence: {result.confidence}")

# From URL
result = solver.solve_image_url("https://example.com/captcha.jpg")
print(result.text)

# From base64
import base64
with open("captcha.png", "rb") as f:
    b64 = base64.b64encode(f.read()).decode()
result = solver.solve_image_base64(b64)
print(result.text)

reCAPTCHA v2

token = solver.recaptcha_v2(
    sitekey="6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-",
    url="https://example.com/login",
    invisible=False  # Set True for invisible reCAPTCHA
)
print(f"Token: {token}")

reCAPTCHA v3

token = solver.recaptcha_v3(
    sitekey="6LdKlZEpAAAAAAOQjzC2v_d36tWxCl6dWsozdSy9",
    url="https://example.com",
    action="login",
    min_score=0.7
)

hCaptcha

token = solver.hcaptcha(
    sitekey="a5f74b19-9e45-40e0-b45d-47ff91b7a6c2",
    url="https://example.com"
)

Cloudflare Turnstile

token = solver.turnstile(
    sitekey="0x4AAAAAAABS7vwvV6VFfMcD",
    url="https://example.com"
)

FunCaptcha (Arkose Labs)

token = solver.funcaptcha(
    public_key="DE0B0BB7-1EE4-4D70-1853-31B835D4506B",
    url="https://example.com",
    service_url="https://client-api.arkoselabs.com"
)

GeeTest v4

result = solver.geetest(
    captcha_id="e392e1d7fd421dc63325744d5a2b9c73",
    url="https://example.com"
)

MTCaptcha (image → text)

# From file
result = solver.solve_mtcaptcha("mtcaptcha.jpg")
print(result.text, result.confidence)

# From base64 (e.g. extracted from the page)
result = solver.solve_mtcaptcha(image_base64="data:image/jpeg;base64,/9j/4AAQ...")
print(result.text)

Amazon WAF

token = solver.amazon_waf(
    sitekey="AQIDAHjcYu/GjX+QlghicBg...",
    url="https://www.amazon.com",
    iv="CgAHazEKBQgA...",
    context="qoJh+bGhBQ..."
)

🔧 Advanced Configuration

solver = CaptchaKings(
    api_key="YOUR_API_KEY",
    timeout=120,        # Max wait time (seconds)
    polling_interval=3, # Check interval (seconds)
    max_retries=3,      # Retry on failure
    debug=False         # Enable debug logging
)

Check Balance

balance = solver.get_balance()
print(f"Credits remaining: {balance}")

Error Handling

from captchakings import CaptchaKings, CaptchaError

try:
    result = solver.solve_image("captcha.png")
    print(result.text)
except CaptchaError as e:
    print(f"Error: {e.message}, Code: {e.code}")

Async Support

import asyncio
from captchakings import AsyncCaptchaKings

async def main():
    solver = AsyncCaptchaKings(api_key="YOUR_API_KEY")
    result = await solver.solve_image("captcha.png")
    print(result.text)

asyncio.run(main())

🆚 Why CaptchaKings?

Feature CaptchaKings 2Captcha Anti-Captcha
Speed ⚡ < 1s 🐌 5-15s 🐌 5-15s
Accuracy 99.9% 95% 95%
AI-Powered ✅ Yes ❌ Human ❌ Human
Price (text) $0.50/1K $2.99/1K $2.00/1K
40+ Types
Free Trial ✅ 1000 credits

💰 Pricing

Plan Price Credits
Free Trial $0 1,000
Starter $1 3,333
Pro $5 20,000
Business $20 100,000
Enterprise Custom Unlimited

👉 View full pricing


🔗 Links


📄 License

MIT License - see LICENSE for details.


⭐ Star this repo if CaptchaKings helped your project! ⭐

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

captchakings-1.1.0.tar.gz (9.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

captchakings-1.1.0-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

Details for the file captchakings-1.1.0.tar.gz.

File metadata

  • Download URL: captchakings-1.1.0.tar.gz
  • Upload date:
  • Size: 9.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.0

File hashes

Hashes for captchakings-1.1.0.tar.gz
Algorithm Hash digest
SHA256 9c4bf76fe6ebcc2e9687f56c9461437e4e25949749162cc358c185c33fe58346
MD5 62e4c0afa473a1d860ed036bc14fe857
BLAKE2b-256 1565493209ee9d10d9a14cc38c9e7fe97062c1bc1a8e75e5f08358810f8c2728

See more details on using hashes here.

File details

Details for the file captchakings-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: captchakings-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.0

File hashes

Hashes for captchakings-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 54cf5f134a571ab889d4ce15dc13b979cf710a7976c253217a53af14ebe2ebdc
MD5 c213e1e94a99812e560ec71c1ca2612c
BLAKE2b-256 12be4bacc12ba075832e8039af77d94c91c0348bebfd8af93e5df53cd9f5b5c0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page