ERROR_BAD_DUPLICATESCategory: CapacityHTTP 200

How to Fix ERROR_BAD_DUPLICATES in CAPTCHA Solver APIs

ERROR_BAD_DUPLICATES is returned when 100% identical task payloads (same image hash or token parameters) are submitted consecutively within seconds.

1. Root Causes for ERROR_BAD_DUPLICATES

  • Multiple scraper threads accidentally submitting identical image base64 strings
  • Overly aggressive retry loops firing duplicate requests before receiving task IDs
  • Submitting 100% identical normal OCR images without varying session parameters

2. How to Resolve & Prevent This Error

  1. Cache task IDs locally and wait for status before initiating retry attempts
  2. Ensure parallel scraping threads operate on distinct browser sessions and puzzle instances
  3. Implement request de-duplication in crawler queue middleware

3. Python Code Fix & Defensive Error Handling

# Prevent duplicate task dispatch using local ID cache
active_tasks = {}

def submit_task_safely(solver, sitekey, url):
    cache_key = f"{sitekey}:{url}"
    if cache_key in active_tasks:
        print("Task already in flight, waiting for completion...")
        return active_tasks[cache_key]
    
    result = solver.turnstile(sitekey=sitekey, url=url)
    active_tasks[cache_key] = result["code"]
    return result["code"]

4. Node.js Implementation

const inFlight = new Set();
async function solveDeduplicated(solver, key, url) {
  const hash = key + url;
  if (inFlight.has(hash)) {
    await new Promise(r => setTimeout(r, 1000));
  }
  inFlight.add(hash);
  try {
    return await solver.cloudflareTurnstile({ pageurl: url, sitekey: key });
  } finally {
    inFlight.delete(hash);
  }
}

5. Why 2Captcha Minimizes API Errors

2Captcha Reliability Architecture

Rank #1 Overall
  • No Slot Saturation: Tens of thousands of workers online 24/7 ensure sub-5 second task pickup
  • Zero Fee for Failures: Unsolvable CAPTCHAs are never charged to your account balance
  • Pay-As-You-Go: Deposits never expire, with a low minimum top-up of just $1.00
Get Started with 2Captcha ($0.50/1k) →

6. Frequently Asked Questions

Does 2Captcha charge for ERROR_BAD_DUPLICATES?

No. Duplicate requests rejected with ERROR_BAD_DUPLICATES are not deducted from your account balance.

How fast can I submit distinct tasks?

2Captcha supports high concurrency across distinct tasks with rates exceeding 100+ tasks/sec on API v2.

← Back to All Error Codes