CaptchaKings Python SDK
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 |
🔗 Links
- 🌐 Website: captchakings.com
- 📖 API Docs: captchakings.com/docs
- 🐛 Issues: GitHub Issues
- 💬 Support: support@captchakings.com
- 🧩 Chrome Extension: Chrome Web Store
📄 License
MIT License - see LICENSE for details.
⭐ Star this repo if CaptchaKings helped your project! ⭐
Release files for captchakings 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| captchakings-1.1.0.tar.gz | 9.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| captchakings-1.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 17.4 kB
Release files / captchakings-1.1.0.tar.gz
| Download URL | captchakings-1.1.0.tar.gz |
|---|---|
| Size | 9.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9c4bf76fe6ebcc2e9687f56c9461437e4e25949749162cc358c185c33fe58346
|
|
BLAKE2b-256 checksum How to use checksums |
1565493209ee9d10d9a14cc38c9e7fe97062c1bc1a8e75e5f08358810f8c2728
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.0
|
Release files / captchakings-1.1.0-py3-none-any.whl
| Download URL | captchakings-1.1.0-py3-none-any.whl |
|---|---|
| Size | 7.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
54cf5f134a571ab889d4ce15dc13b979cf710a7976c253217a53af14ebe2ebdc
|
|
BLAKE2b-256 checksum How to use checksums |
12be4bacc12ba075832e8039af77d94c91c0348bebfd8af93e5df53cd9f5b5c0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.0
|