Skip to main content

CapBypass Python SDK

PyPI version Python versions Downloads GitHub stars

Official Python SDK for the CapBypass CAPTCHA solving API.

Features

  • ✨ Simple solve() method with auto-polling (first poll after 1 s, then every 1-3 s)
  • 🎯 Advanced createTask() + getTaskResult() for granular control
  • 💰 getBalance() to check account balance
  • 🔄 Automatic retry logic for network failures
  • 🛡️ Comprehensive error handling
  • 📝 Type hints for better IDE support
  • 🧪 100% test coverage

Supported CAPTCHA Types

  • reCAPTCHA v2 (normal & invisible)
  • reCAPTCHA v3
  • reCAPTCHA v3 Enterprise
  • AWS WAF CAPTCHA

Installation

pip install capbypass-sdk

Quick Start

from capbypass import CapBypass

# Initialize client
client = CapBypass(api_key="your-api-key")
# Or use environment variable: export CAPBYPASS_API_KEY="your-key"

# Solve CAPTCHA (auto-polling)
solution = client.solve({
    "type": "ReCaptchaV2TaskProxyLess",
    "websiteURL": "https://example.com",
    "websiteKey": "6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-"
})

print(solution["gRecaptchaResponse"])

Advanced Usage

Granular Control

# Create task
task_id = client.createTask({
    "type": "ReCaptchaV2TaskProxyLess",
    "websiteURL": "https://example.com",
    "websiteKey": "site-key"
})

# Poll for result. getTaskResult does not wait by itself: wait 1 second after
# createTask, then 1 to 3 seconds between calls (not faster), until the task is
# ready or failed, and give up after your own deadline.
import time
deadline = time.monotonic() + 120
time.sleep(1)
while True:
    result = client.getTaskResult(task_id)
    if result["status"] == "ready":
        print(result["solution"])
        break
    if result["status"] == "failed":
        raise RuntimeError(result.get("errorDescription", "Task failed"))
    if time.monotonic() > deadline:
        raise TimeoutError("Task not ready in time")
    time.sleep(2)

Check Balance

balance = client.getBalance()
print(f"Balance: ${balance:.4f}")

Error Handling

from capbypass import CapBypass
from capbypass.errors import (
    AuthenticationError,
    InsufficientBalanceError,
    TimeoutError,
)

try:
    solution = client.solve(task)
except AuthenticationError:
    print("Invalid API key")
except InsufficientBalanceError:
    print("Insufficient balance")
except TimeoutError:
    print("Task timed out")

Documentation

📚 Core Documentation

🔧 Advanced Guides

🔄 Migration

Examples

Basic Examples

See examples/ directory for complete runnable examples:

Advanced Examples

Full integration examples in the documentation:

  • E-commerce checkout automation
  • Social media automation
  • Web scraping with CAPTCHA handling
  • Microservice integration patterns

Development

# Install dev dependencies
pip install -e ".[dev]"

# Run tests
pytest

# Run linter
ruff check .

# Run type checker
mypy src/

License

MIT

Support

Metadata

Release files for capbypass-sdk 1.0.11

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for capbypass-sdk 1.0.11
File Size Uploaded Provenance Actions
capbypass_sdk-1.0.11.tar.gz 11.2 kB Without provenance Details for capbypass_sdk-1.0.11.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for capbypass-sdk 1.0.11
File Interpreter ABI Platform Actions
capbypass_sdk-1.0.11-py3-none-any.whl Python 3 none any Details for capbypass_sdk-1.0.11-py3-none-any.whl

Total release size: 21.1 kB

Release files / capbypass_sdk-1.0.11.tar.gz

Download URL capbypass_sdk-1.0.11.tar.gz
Size 11.2 kB
Tags Source
SHA-256 checksum
How to use checksums
9294bda38fc77fcd0735a730541bd14d8797b22239997f63df28f6b41728c0ac
BLAKE2b-256 checksum
How to use checksums
3915fd1948e786fb51ea8408a22e3d96904dcb1eb848d41f27d7cbdc2db0e648
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / capbypass_sdk-1.0.11-py3-none-any.whl

Download URL capbypass_sdk-1.0.11-py3-none-any.whl
Size 9.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
15c7882ed899706cb65b4fdd585627f059bf2e40ef01f675f4123661fd318304
BLAKE2b-256 checksum
How to use checksums
466f093e187987b7e0f88a5594aad7027fbe29d6505d44f01a789346ead30d60
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for capbypass-sdk 1.0.11

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page