The DeathByCaptcha API Explained: Endpoints, Types, and Flow

The DeathByCaptcha API Explained: Endpoints, Types, and Flow

Posted on 2026-08-11 | Last Updated: 2026-08-13 | 3 min read | Category: learning-intermediate | By DeathByCaptcha Engineering Team

Learning Intermediate


The beginner articles got you solving your first CAPTCHA. Now it is time to understand the API properly so you can build reliable integrations. This article walks through the endpoints, the CAPTCHA type system, and the full request flow.

The Two API Styles

DeathByCaptcha exposes two ways to talk to it:

  1. The REST API at api.dbcapi.me, which uses plain HTTP. It is easy to use with any language or even curl.
  2. The socket API, used by the official client libraries. It is faster because it reuses a persistent connection, which matters when you solve many CAPTCHAs.

The official clients default to the socket API and fall back to HTTP if the socket connection fails.

The Full Request Flow

The flow has four steps:

1. Submit the CAPTCHA

curl --data-urlencode "username=YOUR_USERNAME" \
     --data-urlencode "password=YOUR_PASSWORD" \
     --data-urlencode "captchafile=captcha.png" \
     http://api.dbcapi.me/api/captcha

The response is JSON and contains a captcha object with a numeric captcha ID.

2. Poll until solved

curl --data-urlencode "username=YOUR_USERNAME" \
     --data-urlencode "password=YOUR_PASSWORD" \
     "http://api.dbcapi.me/api/captcha/CAPTCHA_ID"

When the CAPTCHA is still being solved, the response contains no text field. When it is done, text holds the answer.

3. Use the answer

Pass the token or text to your website automation.

4. Report bad solves (optional)

curl --data-urlencode "username=YOUR_USERNAME" \
     --data-urlencode "password=YOUR_PASSWORD" \
     -X POST http://api.dbcapi.me/api/captcha/CAPTCHA_ID/report

This teaches the service and helps future solves. Only report when the website rejected the answer.

The Type System

The REST API uses an integer type field to know what kind of CAPTCHA you are submitting. The most important ones:

Type CAPTCHA
1 Standard image CAPTCHA
2 Coordinates CAPTCHA (click positions)
4 reCAPTCHA v2
5 reCAPTCHA v3
7 hCaptcha
8 GeeTest v3
9 GeeTest v4
12 Cloudflare Turnstile
21 DataDome
24 ATB Captcha

Each type expects a different payload. For example, reCAPTCHA types take a JSON object with the sitekey and page URL, while image types take the file directly.

Client-Side Idioms

The official clients wrap the flow in a single call. With the Python client:

import deathbycaptcha

client = deathbycaptcha.SocketClient("user", "pass")

# image captcha
captcha = client.decode(open("captcha.png", "rb").read(), timeout=60)

# token captcha
captcha = client.decode({
    "googlekey": "SITE_KEY",
    "pageurl": "https://example.com",
}, type=4, timeout=60)

if captcha:
    print(captcha.text)

Behind the scenes the client submits, polls with exponential backoff, and honors the timeout you pass.

In Node.js the call looks like this:

const DBC = require('deathbycaptcha');
const fs = require('fs');

const client = new DBC.SocketClient('user', 'pass');

// image captcha
let captcha = await client.decode(fs.readFileSync('captcha.png'), 60);

// token captcha
captcha = await client.decode({
    googlekey: 'SITE_KEY',
    pageurl: 'https://example.com',
}, 60, 4);

if (captcha) {
    console.log(captcha.text);
}

And in C#:

using System;
using System.Collections;
using System.IO;
using DeathByCaptcha;

Client client = new DeathByCaptcha.HttpClient("user", "pass");

// image captcha
Captcha captcha = client.Decode(File.ReadAllBytes("captcha.png"), Client.DefaultTimeout);

// token captcha
string tokenParams = "{\"googlekey\":\"SITE_KEY\",\"pageurl\":\"https://example.com\"}";
captcha = client.Decode(Client.DefaultTimeout,
    new Hashtable { { "type", 4 }, { "token_params", tokenParams } });

if (captcha != null)
    Console.WriteLine(captcha.Text);

Reading the Response Object

The decoded object has useful fields:

  • captcha: the numeric ID.
  • text: the answer, when solved.
  • is_correct: whether the answer was reported as correct.
  • is_solved: whether the service produced an answer.

Key Takeaways

  • Use the socket API for high throughput and the REST API for simple scripts.
  • The flow is always submit, poll, use, and optionally report.
  • The integer type selects the CAPTCHA engine and dictates the payload shape.
  • Official clients collapse the flow into a single decode call.

Next up: how to pick the right CAPTCHA type for your specific use case.

Common pitfalls

  • Using a CAPTCHA solving service for illegitimate purposes instead of legitimate automation and testing.
  • Hard-coding credentials or API keys in client-side code that users can inspect.
  • Sending the wrong CAPTCHA type parameter, which returns incorrect or empty responses.
  • Failing to poll for the solution status and not handling timeouts gracefully.
  • Scaling automation without monitoring error rates, response times, and CAPTCHA type coverage.
DBC
Written by DeathByCaptcha Engineering Team
DeathByCaptcha engineers build and operate the CAPTCHA solving technology behind this site. Articles are written by our technical team and checked for accuracy before publishing.
Reviewed by DeathByCaptcha Editorial Team

Start solving CAPTCHAs today

Create a free account and get started with the DeathByCaptcha API in minutes. No credit card required.

Create a free account


Status: OK

Servers are fully operational with faster than average response time.
  • Average solving time
  • 6 seconds - Normal CAPTCHAs (1 min. ago)
  • 15 seconds - reCAPTCHA V2, V3 (1 min. ago)
  • 7 seconds - others (1 min. ago)
Chrome and Firefox logos
Browser extensions available

Updates

  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. Previous updates…

Support

Our system is designed to be completely user-friendly and easy-to-use. Should you have any trouble with it, simply email us at DBC technical support emailcom, and a support agent will get back to you as soon as possible.

Live Support

Available Monday to Friday (10am to 4pm EST) Live support image. Link to live support page