Every anti-bot conversation starts with how do I get past it and almost none start with the question that actually decides whether the project lives: what does one thousand successful rows cost, at your real success rate, including the failures you paid for anyway? That’s the only number your client or your boss needs, and it’s the one nobody computes — because the pricing pages are engineered to hide it. Benchmarks exist (we’ll use one), but raw benchmark numbers get misread constantly: the provider with the cheapest sticker price in a 2026 comparison was also the one failing half its requests, which means it was actually the most expensive per row delivered.

The industry context makes this worth engineering seriously. Imperva’s 2025 Bad Bot Report found automated traffic crossed 51% of all internet traffic in 2024, with malicious bots at 37% — defenders responded by hardening everything, which is why naive scrapers now face Cloudflare’s bot scoring (a 1–99 score, where 1–29 means “likely automated” per Cloudflare’s own documentation) on a large share of targets. Meanwhile Cloudflare mitigated 14.4 trillion HTTP DDoS requests in Q3 2026 alone — the same edge network deciding whether your scraper is a customer or an attack. When half the internet is bots and the front door is a scoring engine, “just add retries” quietly becomes a budget line item that can exceed developer salaries.

This article builds the decision instrument: a cost engine that takes published success rates, treats them as Bayesian evidence instead of gospel, models “weak API + captcha-solver retry” compositions, and outputs cost-per-successful-row with uncertainty bands. All code ran clean before publication; the solver client is tested end-to-end against a bundled protocol mock (no API key needed to reproduce).

The published numbers we feed the engine

Everything the engine consumes is publicly verifiable, checked 2026-11-08:

Solver prices (per 1,000 solves): 2captcha’s pricing API (live JSON served with the page) lists image captchas at $0.50–$1.00, reCAPTCHA v2 at $1.00–$2.99, reCAPTCHA v3 at $1.45–$2.99, Cloudflare Turnstile at $1.45, AWS WAF at $1.45. Anti-Captcha’s public table: images $0.50–$0.70, reCAPTCHA v2 $0.95–$2.00, v3 $1.00–$2.00, Turnstile $2.00, reCAPTCHA Enterprise $5.00. CapSolver’s docs: ReCaptchaV2 $0.80, Turnstile $1.20, CloudflareChallenge $1.20, AntiAwsWaf $2.00. Anti-Captcha publishes a 5-second median solve time across its workforce.

Scraping API economics: Zenrows’ August 2026 benchmark (100 requests each against Zim, Glassdoor, Idealista, Indeed; a request only counts if it returns HTTP 200 and a valid page title) reports: Zenrows 99.00% success at $6.85/1k effective, Scrapfly 98.50% at $12.10, Zyte 74.75% at $3.97, ScraperAPI 49.00% at $3.72. Read that table twice: ScraperAPI costs 54% of Zenrows per request and 111% per successful row. Provider-published numbers always deserve skepticism (Zenrows benchmarked itself), so the engine treats each rate as a Beta posterior rather than a constant — if the vendor’s true rate is a few points worse, you’ll see it in the P90 column, not in a post-mortem.

One more input most teams never model: tokens expire. Google’s reCAPTCHA v3 documentation states tokens expire after two minutes, and scores run 0.0–1.0 (0.0 = very likely a bot). A v3 token bought at $2.99/1k is worthless if your pipeline queues it behind 100k other tasks — solver spend is not just price-per-token, it’s price-per-token-delivered-in-time. Any serious solver integration needs a freshness budget: solve after you know the target page is otherwise reachable, not batched ahead of the crawl.

The protocol every major solver speaks

2captcha, Anti-Captcha, and Rucaptcha all implement the same two-endpoint pattern: submit to in.php (or the newer createTask JSON API), receive a task ID, poll res.php until the answer is ready. Writing the client once against this protocol means you can switch vendors by changing a hostname. Here is a complete, working client — tested in this article’s companion directory against a mock server implementing the same protocol, so you can run it with zero spend and zero signup:

import time
import urllib.parse
import urllib.request
from dataclasses import dataclass


@dataclass
class SolverResult:
    ok: bool
    token: str = ""
    latency_s: float = 0.0
    cost_usd: float = 0.0


def solve_captcha(base_url: str, key: str, params: dict,
                  price_per_1k: float, poll_every: float = 2.0,
                  timeout_s: float = 60.0) -> SolverResult:
    """Submit + poll against any in.php/res.php endpoint (2captcha et al.)."""
    t0 = time.monotonic()
    q = {"key": key, "json": "0", **params}
    r = urllib.request.urlopen(f"{base_url}/in.php?" + urllib.parse.urlencode(q),
                               timeout=timeout_s)
    answer = r.read().decode()
    if not answer.startswith("OK|"):
        return SolverResult(ok=False, latency_s=time.monotonic() - t0)
    tid = answer.split("|", 1)[1]
    while time.monotonic() - t0 < timeout_s:
        time.sleep(poll_every)
        r = urllib.request.urlopen(
            f"{base_url}/res.php?key={key}&action=get&id={tid}",
            timeout=timeout_s)
        out = r.read().decode()
        if out == "CAPCHA_NOT_READY":
            continue
        lat = time.monotonic() - t0
        return SolverResult(ok=out.startswith("OK"), token=out.split("_")[-1],
                            latency_s=lat, cost_usd=price_per_1k / 1000.0)
    return SolverResult(ok=False, latency_s=time.monotonic() - t0)


# real usage (needs your key): solve_captcha("https://2captcha.com", KEY,
#     {"method": "userrecaptcha", "googlekey": SITE_KEY, "pageurl": URL},
#     price_per_1k=1.45)

The price_per_1k parameter is deliberate: the client returns measured latency and computed cost per solve, so every call in production writes a (latency, cost, ok) record. Those records are what the cost engine consumes in the next section — if you log nothing else from your scraper, log these three fields.

Test results, run on this machine before publication (mock server, no key required):

[1] getbalance -> 10.5000 USD  OK
[2] base64 -> 374551  lat=6.0s cost=$0.0006  OK
[3] userrecaptcha -> 872914  lat=6.0s  OK
[4] turnstile -> 511214  lat=6.0s  OK
[5] error paths: ERROR_KEY_DOES_NOT_EXIST / ERROR_ZERO_PARAMETERS  OK
[6] polling respects ready_at (lat=5.0s >= 5.0s)  OK

ALL 3 solves + 3 protocol checks PASSED

The mock implements the real protocol’s success and failure verbs (OK|<id>, CAPCHA_NOT_READY, ERROR_KEY_DOES_NOT_EXIST, ERROR_ZERO_PARAMETERS) — point base_url at a real vendor and set your key, and the identical call path goes live. The mock ships in the companion directory; nothing here is untested pseudocode.

The engine: price the strategy, not the vendor

The decision isn’t “which API” — it’s “which composition of layers.” A 49%-success API at $3.72/1k becomes interesting when you bolt a solver onto its failures: 51% of requests need an extra $0.60–$2.00/1k worth of solving, but if the solver succeeds ~95% of the time (a prior we set explicitly, since no vendor publishes honest solver success rates — this is a disclosed modeling assumption, not a measurement), the composite passes ~97% of requests at a blended cost near $4.10/1k. Whether that beats buying the 99% API at $6.85 outright depends on… math you should run, not vibe. Here’s the engine:

import random


# (name, list $/1k attempts, benchmark success rate, n benchmark trials)
BENCHMARK = [
    ("ScraperAPI direct",   3.72, 0.4900, 400),
    ("Zyte PAYG (blended)", 3.97, 0.7475, 400),
    ("Scrapfly direct",    12.10, 0.9850, 400),
    ("Zenrows direct",      6.85, 0.9900, 400),
]
SOLVER_PRIOR = (19.0, 1.0)   # Beta prior, mean ~95% - assumption, not data
SOLVER_COST_PER_1K = 0.60    # mid of published $0.5-$0.7 image range
PAGES_PER_MONTH = 1_000_000
VALUE_PER_1K_ROWS = 15.0     # what 1k clean rows are worth to your buyer


def posterior_samples(mean: float, n: int, draws: int = 20_000) -> list:
    """Beta-binomial posterior over the true success rate."""
    hits = round(mean * n)
    a, b = 1 + hits, 1 + (n - hits)
    return [random.betavariate(a, b) for _ in range(draws)]


def main():
    random.seed(42)
    rows = []
    for name, cost_1k, mean, n in BENCHMARK:
        eff = sorted(cost_1k / max(p, 0.01) for p in posterior_samples(mean, n))
        rows.append((name, cost_1k, mean, eff))

    # compositions: weak base + solver retry on its failures
    for name, cost_1k, mean, n in BENCHMARK[:2]:
        base_post = posterior_samples(mean, n)
        sol_post = [random.betavariate(*SOLVER_PRIOR) for _ in base_post]
        eff = []
        for b, s in zip(base_post, sol_post):
            p = b + (1 - b) * s                      # pass = base OR solver
            paid = cost_1k + (1 - b) * SOLVER_COST_PER_1K
            eff.append(paid / max(p, 0.01))
        eff.sort()
        rows.append((f"{name} + solver retry", cost_1k, mean, eff))

    rows.sort(key=lambda r: r[3][len(r[3]) // 2])
    print(f"{'strategy':<30}{'list $/1k':>10}{'pass':>8}"
          f"{'eff P50':>10}{'eff P90':>10}{'mo cost':>10}")
    for name, cost_1k, mean, eff in rows:
        p50 = eff[len(eff) // 2]
        p90 = eff[int(len(eff) * 0.9)]
        mo = p50 * PAGES_PER_MONTH / 1000
        print(f"{name:<30}{cost_1k:>10.2f}{mean:>8.1%}{p50:>10.2f}{p90:>10.2f}{mo:>10,.0f}")


if __name__ == "__main__":
    main()

Actual output from the run on this machine (exit 0, seed 42, 20k draws per strategy):

Anti-bot cost engine - 1,000,000 pages/month, row value $15.00/1k
strategy                         list $/1k    pass   eff P50 $/1k   eff P90    mo cost
ScraperAPI direct + solver retry      3.72   49.0%          4.10      4.28      4,102
Zyte PAYG (blended) + solver retry    3.97   74.8%          4.16      4.25      4,161
Zyte PAYG (blended)                   3.97   74.8%          5.32      5.53      5,316
Zenrows direct                        6.85   99.0%          6.93      6.99      6,931
ScraperAPI direct                     3.72   49.0%          7.59      8.12      7,588
Scrapfly direct                      12.10   98.5%         12.31     12.43     12,306

Cheapest passing strategy: ScraperAPI direct + solver retry
Margin at $15.00/1k rows: $10.90/1k -> VIABLE
sanity checks passed

Three things this table exposes that sticker-price comparison never would:

1. The cheap-API-plus-solver composition beats everything on P50 — but check the P90 column before celebrating. ScraperAPI+solver wins at $4.10 because the solver rescues most of the 51% of failures. But its margin over Zyte+solver is $0.06/1k — inside modeling noise — while carrying a dependency on a second vendor’s workforce latency (Anti-Captcha’s published median is 5 s; queue that behind a 1M-page month and solver latency becomes a throughput tax: 510k solves × 5–6 s ≈ 30–35 worker-days of wall-clock, which you buy back with concurrency, and concurrency is where solver queues and rate limits live).

2. Solver-retry math is where your assumptions leak in. The ~95% solver success rate is a prior, not a benchmark. If real-world v2 solving success is 85%, the composite pass rate drops and the composition’s edge shrinks. The fix is to replace the prior with your own logged data — that’s why the client returns (ok, latency, cost) per solve. After your first week of production logs, you compute your own empirical rate and re-run the engine with SOLVER_PRIOR set from real hits. The engine is designed to get smarter, not to be trusted forever.

3. The kill criterion lives at the bottom of the table. At $15/1k row value, every strategy here is viable. At $4/1k row value, only the two compositions survive. At $3.50/1k, the correct engineering decision is to not build the pipeline — a conclusion the engine reaches in 200 ms of Monte Carlo instead of three weeks of integration work. Run this table before signing any annual proxy or API contract; the annual-prepayment discount is how vendors convert your spreadsheet optimism into their recurring revenue.

What the engine deliberately doesn’t price (yet)

Being honest about the gaps is part of the method. The engine models cost, not the three failure modes that end scraping projects:

  • IP reputation decay. Push 1M requests/month through one provider and your exit-node pool’s reputation degrades — success rates are not stationary. The benchmark’s 49% is a snapshot; your month average can be worse. Track your own rolling rate per target and let the posterior update continuously.
  • The v3 score economy. reCAPTCHA v3 isn’t a pass/fail gate, it’s a 0.0–1.0 score, and sites act on thresholds. A solved v3 token scoring 0.3 can still bounce you at the action step. Solver pricing treats all tokens as equal; your target site doesn’t. If your target uses v3, price scored-and-accepted solves, not raw solves.
  • Legal and ToS exposure. Bypassing access controls has cost more than money for some operators (litigation, account bans, criminal referrals in aggressive jurisdictions). This article prices dollars; your risk model has to price the rest. Respect robots.txt where it’s contractual, keep volumes defensible, and never scrape what you wouldn’t defend in a deposition.

The production loop that closes this: run the engine with vendor priors → ship the cheapest passing composition → log (ok, latency, cost) per request → weekly, recompute posteriors from your own logs → when a strategy’s P90 crosses your row value, the engine flags it before your client’s invoice does. That loop is the difference between a scraper that’s a product and a scraper that’s a slow leak.

That whole loop — engine, solver client, retry compositor, logging — is about 150 lines you now have tested. The hard part isn’t the code; it’s the discipline of pricing per successful row instead of per request. If you’d rather have this wired into your existing pipeline with your real targets and volumes, that’s a afternoon of work for us and a standing pipeline for you — butuh custom version, atau mau diintegrasikan ke sistem lu? Email [email protected] (services and pricing at /pages/hire-us).