Skip to main content
BETAUnder active development. Some features may not work as expected.

CAPTCHAs in Web Scraping: Types, Detection & Solutions

advanced

CAPTCHA (Completely Automated Public Turing test to tell Computers and Humans Apart) is a challenge-response test used to determine whether a user is human. In web scraping, CAPTCHAs are one of the most common blocking mechanisms.

Types of CAPTCHAs

reCAPTCHA (Google)

  • v2: "I'm not a robot" checkbox + image challenges
  • v3: Invisible — scores user behavior (0.0 to 1.0)
  • Enterprise: Advanced version with more signals

hCaptcha

  • Similar to reCAPTCHA v2 but privacy-focused
  • Increasingly common as sites move away from Google

Cloudflare Turnstile

  • Non-interactive challenge (runs in background)
  • Uses browser signals, not image puzzles

Text/Image CAPTCHAs

  • Legacy systems using distorted text or image recognition
  • Least sophisticated, easiest to bypass

Why CAPTCHAs Appear

CAPTCHAs trigger based on:

  • Too many requests from one IP
  • Missing or suspicious headers
  • Failed JavaScript challenges
  • Suspicious browser fingerprint
  • Geographic or behavioral anomalies

Handling Strategies

Strategy 1: Avoid Triggering Them

The best CAPTCHA solution is never seeing one:
  • Use residential proxies
  • Rotate User-Agents
  • Add realistic delays
  • Maintain proper headers and cookies

Strategy 2: CAPTCHA Solving Services

Services like 2Captcha or Anti-Captcha use human solvers:
python
# Conceptual example — send CAPTCHA to solving service
captcha_id = solver.submit(site_key, page_url)
solution = solver.get_result(captcha_id)  # returns token
# Submit the token with your request

Strategy 3: Browser Automation

Headless browsers with stealth plugins can pass some CAPTCHAs automatically, especially reCAPTCHA v3 and Turnstile.

Cost Considerations

ServiceCost per 1,000 solvesSpeed
2Captcha$1-320-60 seconds
Anti-Captcha$1-320-60 seconds
CapSolver$1-210-30 seconds
At scale, CAPTCHA solving adds significant cost. Invest in avoiding them rather than solving them.

Learn CAPTCHA hands-on

This glossary entry covers the basics. The Master Web Scraping course teaches you to use captcha in real projects across 16 in-depth chapters.

Get Instant Access — $19

$ need_help?

We're here for you