Deep, practical guides for wiring capsolv into scraping, account creation, checkout bots, QA, SERP monitoring and more — with the captcha types and code for each.
capsolv is a drop-in solving API. Send a captcha, poll for the result, get a token back — then submit that token to the target site yourself. The wire format is identical to 2captcha and CapSolver, so existing clients work unchanged: just change the base URL and key.
Identical to 2captcha & CapSolver. Keep your existing client — change the host.
No subscriptions or seats. You’re billed per successful solve.
If we can’t solve it, you don’t pay for it.
createTask returns instantly; poll getTaskResult until ready (~2–3s typical).
import requests, time
BASE = "https://THIS_HOST" # point any 2captcha / CapSolver client here
KEY = "cr_live_xxx" # your API key == clientKey
t = requests.post(BASE+"/createTask", json={"clientKey":KEY,"task":{
"type":"AntiTurnstileTaskProxyLess","websiteURL":"https://site.com",
"websiteKey":"0x4AAA..."}}).json()["taskId"]
while True:
r = requests.post(BASE+"/getTaskResult", json={"clientKey":KEY,"taskId":t}).json()
if r.get("status") == "ready":
token = r["solution"]["token"]; break
time.sleep(2)
# -> submit `token` from the SAME session/proxy that requested it/in.php & /res.php work too. See the full API reference.Most anti-bot walls in front of scrapers are captcha/JS challenges: Cloudflare Turnstile, DataDome, PerimeterX, AWS WAF, plus reCAPTCHA on search and listing pages. Solve the challenge, inject the returned token, and keep crawling.
data-sitekey) and page URL.ready and read the token.# Hit a page guarded by Cloudflare Turnstile, solve, then replay with the token
task = {"type":"AntiTurnstileTaskProxyLess",
"websiteURL":"https://target.com/listing",
"websiteKey":"0x4AAA..."} # the data-sitekey on the page
token = solve(task) # createTask -> poll (see Overview)
r = session.get("https://target.com/listing",
headers={"cf-turnstile-response": token})Sign-up and verification flows are usually gated by hCaptcha, reCAPTCHA, FunCaptcha (Arkose) or GeeTest. Solve the gate as part of your registration pipeline; pair with an inbox/SMS step for full PVA (phone-verified accounts).
h-captcha-response, g-recaptcha-response, …).task = {"type":"HCaptchaTaskProxyLess",
"websiteURL":"https://app.com/signup",
"websiteKey":"a1b2c3-..."}
token = solve(task)
# post the signup form with the hCaptcha token
session.post("https://app.com/signup", data={
"email":email, "password":pw, "h-captcha-response":token})Drops, queues and checkout pages defend with the heaviest stacks — Akamai, PerimeterX, DataDome, Kasada, FunCaptcha. Latency is everything, so run solves concurrently and pre-warm tokens before the drop.
# Pre-warm a pool of tokens so checkout never waits on a solve from concurrent.futures import ThreadPoolExecutor pool = ThreadPoolExecutor(max_workers=20) tokens = [pool.submit(solve, task) for _ in range(20)] # ... grab tokens[i].result() the instant a drop goes live
Automated end-to-end tests break when a real captcha sits in the flow. Solve it inside your Playwright, Selenium, Cypress or Puppeteer suite so CI can exercise the whole journey — login, checkout, signup — on staging or production you own.
# Playwright: solve a reCAPTCHA v2 in your own E2E test
sitekey = page.get_attribute(".g-recaptcha", "data-sitekey")
token = solve({"type":"ReCaptchaV2TaskProxyLess",
"websiteURL":page.url, "websiteKey":sitekey})
page.evaluate("""t => {
document.getElementById("g-recaptcha-response").value = t;
}""", token)
page.click("button[type=submit]")Search-engine results, ad placement checks and brand-safety crawls trip reCAPTCHA and regional walls like Yandex SmartCaptcha. Solve on demand to keep rank-tracking and ad verification pipelines flowing.
task = {"type":"ReCaptchaV2TaskProxyLess",
"websiteURL":"https://www.google.com/search?q=...",
"websiteKey":"6Lc_..."}
token = solve(task)
# replay the SERP request with the token + your residential proxyMarketplaces, travel and retail sites sit behind DataDome, PerimeterX, Akamai and Imperva. Fold solving into your scheduled crawl so price, stock and assortment data keeps updating without manual intervention.
for url in product_urls:
html = fetch(url)
if is_challenge(html): # DataDome / PerimeterX interstitial
token = solve(detect_task(html))
html = fetch(url, token=token)
yield parse_price(html)A few habits make integrations fast, cheap and reliable across every use case above.
createTask is async — run many in parallel rather than waiting on each.
Solve close to submit; reCAPTCHA tokens die ~120s after issue.
Submit the token from the same proxy/session the sitekey came from.
On a failed solve, retry — you’re only billed on success.
Only solve when a wall actually appears to keep spend proportional.
Solve only for sites you’re authorized to automate.
def solve(task, tries=3, timeout=120):
for _ in range(tries):
t = post("/createTask", {"clientKey":KEY,"task":task})
if t.get("errorId"): continue # bad params / no balance
tid, start = t["taskId"], time.time()
while time.time() - start < timeout:
r = post("/getTaskResult", {"clientKey":KEY,"taskId":tid})
if r.get("status") == "ready": return r["solution"]
if r.get("errorId"): break # solve failed -> retry
time.sleep(2)
raise RuntimeError("solve failed")errorId on every response. A non-zero id means bad params or no balance (won’t fix on retry); a failed solve can be retried for free.
Social automation & growth
Login, posting and engagement flows on large social platforms lean heavily on FunCaptcha (Arkose) and hCaptcha. The integration is the same — solve the gate, submit the token — just expect FunCaptcha to dominate.