Python CAPTCHA Solving API: Getting Started with DeathByCaptcha

Python CAPTCHA Solving API: Getting Started with DeathByCaptcha

Posted on 2026-07-17 | Category: guides


Python CAPTCHA Solving API: Getting Started with DeathByCaptcha

Python is the most popular language for web scraping, automation, and data collection, and DeathByCaptcha's python captcha api makes integrating CAPTCHA solving straightforward.

This guide covers installation, basic usage, and advanced patterns.

Installation

pip install deathbycaptcha

Quick Start

import deathbycaptcha

client = deathbycaptcha.SocketClient("username", "password")

with open("captcha.png", "rb") as f:
    cid, solution = client.decode(f.read(), timeout=60)

if solution:
    print(f"Solved: {solution}")

Supported Captcha Types

Type Method
Image captcha client.decode(image_data)
reCAPTCHA v2 client.decode({"googlekey": key, "pageurl": url}, type=4)
reCAPTCHA v3 client.decode({"googlekey": key, "pageurl": url}, type=5)
Cloudflare Turnstile client.decode({"sitekey": key, "pageurl": url}, type=13)
GeeTest client.decode({"gt": gt, "challenge": challenge, "pageurl": url}, type=6)
DataDome client.decode({"pageurl": url, "captcha_url": captcha_url}, type=12)

HTTP API Alternative

import requests
url = "https://api.deathbycaptcha.com/api/captcha/solve"
response = requests.post(url, json={
    "username": "user", "password": "pass",
    "captcha": {"type": 1, "image": base64_image}
})

Error Handling

try:
    cid, solution = client.decode(image_data, timeout=60)
except deathbycaptcha.AccessDeniedException:
    print("Invalid credentials")
except deathbycaptcha.SolveTimeoutException:
    print("Solve timed out")

Performance Tips

  • Reuse the client instance across requests.
  • Use callback URLs for high-throughput workflows.
  • For bulk operations, send captchas in parallel using concurrent.futures.

Next Steps



地位: OK

服务器以比平均响应时间更快的速度全面运行。
  • 平均求解时间
  • 3 秒 - Normal CAPTCHAs (1分钟。前)
  • 16 秒 - reCAPTCHA V2, V3 (1分钟。前)
  • 12 秒 - 其他的 (1分钟。前)
Chrome and Firefox logos
可用的浏览器扩展名

更新

  1. May 13: Crypto payments got better! You can now purchase your CAPTCHAs using cryptocurrency through the Hekelet payment processor at https://deathbycaptcha.com/user-pay and receive an extra 20% FREE CAPTCHA credit with every package purchased this way.
  2. Apr 15: GitHub Updates: We’ve upgraded our libraries, expanded sample code, enhanced documentation, and added support for C++ and Go, making integration smoother than ever. Explore what’s new at github.com/deathbycaptcha!
  3. Jan 27: RESOLVED - If your email to one of our official addresses ([email protected], [email protected], or [email protected]) has bounced or you haven’t received a response, please try resending it or reach out via our Live Chat Support at https://deathbycaptcha.com/es/contact.

  4. 之前的更新…

支持

我们的系统设计为完全用户友好且易于使用。如果您有任何问题,只需发送电子邮件至DBC 技术支持电子邮件com,支持代理将尽快与您联系。

现场支持

周一至周五可用(美国东部标准时间上午 10 点至下午 4 点) Live support image. Link to live support page