📈 GH Trending Explorer 🎲 Surprise me

← all repos

jamespolyakov9829 / captcha-api

git clone https://github.com/jamespolyakov9829/captcha-api.git

Captcha-solving API client - Cloudflare Challenge and Turnstile in one interface, with cost tracking and concurrent batch solves.

—
stars, 24h
—
stars, 7 days
+84
stars, 30 days · #2,712
84
★ total
17
forks · 0 open issues

Star history starts 2026-10-20; the chart appears after the second daily snapshot.

LanguagePython
LicenseMIT
Created2026-09-25 (25d ago)
Last push25d ago
Watchers2
OwnerUser

GitHub topics

Links

README excerpt
# captcha-api
A dependency-free Python client and CLI for the Clearance captcha-solving API.
One interface for both Cloudflare services that block automation - the Challenge (the "Just a moment." interstitial) and the Turnstile widget. It adds the parts a production integration needs: cost tracking so you know what a batch charges before it runs, concurrent batch solves on a thread pool, and the browser identity block so your replayed token actually clears.
- **Free credits on sign-up.** No card, no trial countdown.
- **$0.40 per 1,000** for both Cloudflare services. $0.00040 a solve.
- **451ms** average Turnstile solve, **1.3s** for the Challenge.
- **Failed solves are refunded** in full - you pay for tokens you received.
- **Cost tracking built in.** Know the bill before you run the batch.
- **No runtime dependencies.** Standard library only, Python 3.8+.
---
## Contents
- Pricing
- Why this exists
- Install
- Quickstart
- Cost tracking
- Concurrent batches
- Task types
- The response: a token and its identity
- The polling rhythm
- Error handling
- CLI reference
- FAQ
---
## Pricing
Two services, one price. Billed per solve, with no subscription and no minimum spend.
| Service | `task.type` | Price / 1,000 | Per solve | Avg solve |
| --- | --- | --- | --- | --- |
| **Cloudflare Turnstile** | `AntiTurnstileTask` | **$0.40** | $0.00040 | **451ms** |
| **Cloudflare Challenge** | `AntiCloudflareTask` | **$0.40** | $0.00040 | **1.3s** |
**Free credits on sign-up** - enough to run your first integration before you spend anything.
**Unlimited plans** are available for sustained volume - ask for pricing.
### How that compares
Published per-1,000 rates for Cloudflare Turnstile, gathered from each provider's own pricing page:
| Provider | Turnstile / 1,000 |
| --- | --- |
| **Clearance** | **$0.40** |
| CapMonster Cloud | $0.80 |
| CapSolver | $0.80 - $1.00 |
| Anti-Captcha | $1.50 |
| CaptchaSonic | $1.45 |
| 2Captcha | $1.45 - $1.99 |
At $0.40 that is roughly a third of what the field charges, without giving up solve time.
---
## Why this exists
Every captcha API gives you a token. Almost none of them tell you what it cost, and almost none of them handle a batch without you writing the concurrency yourself.
This package is built for the integration that runs at scale:
- **Know the bill first.** `estimate_cost(10000)` tells you the charge before a single task is submitted.
- **Track spend as you go.** `CostTracker` records every solve, refunds nothing, and summarises in one call.
- **Batch without threads.** `Solver.batch()` fans out across a pool and records per-URL results. One bad URL never kills the run.
- **Replay correctly.** Every result carries the browser identity - User-Agent, TLS handshake, HTTP/2 settings - so the token clears on the follow-up request instead of being thrown away.
---
## Install
 [code] 
Or straight from source:
 [code] 
---
## Quickstart
Create an account to get your key - it takes about a minute and comes with **free cred