Back to Blog

CAPTCHA Solving for AI Agents

March 22, 2026|7 min read

CAPTCHAs are the most common obstacle that AI agents and scrapers encounter on the web. They are designed to distinguish humans from bots, and they are effective. Without a solving strategy, your automation will fail on a significant percentage of websites.

This guide covers the practical side of CAPTCHA handling: what you will encounter, how to solve them, and how to reduce their frequency.

Why CAPTCHAs Exist

CAPTCHAs serve a legitimate purpose. They protect websites from spam, credential stuffing, inventory hoarding, and abusive scraping. Sites use them as a last line of defense when other anti-bot measures (fingerprinting, rate limiting, behavioral analysis) are inconclusive.

Understanding why CAPTCHAs appear helps you reduce their frequency. If your automation triggers CAPTCHAs on every request, something else is wrong: your stealth configuration, your request pattern, or your IP reputation.

Types of CAPTCHAs

reCAPTCHA v2 (checkbox). Google's "I'm not a robot" checkbox. It evaluates browser signals and user behavior. If suspicious, it presents image selection challenges ("select all traffic lights"). This is the most common CAPTCHA on the web.

reCAPTCHA v3 (invisible). A score-based system that runs invisibly in the background. It assigns each user a score from 0.0 (bot) to 1.0 (human). The website decides what score threshold triggers a challenge. Because it is invisible, you may not realize it is blocking your automation until requests start failing silently.

hCaptcha. Similar to reCAPTCHA v2 with image selection challenges. Used by Cloudflare and many sites that want a reCAPTCHA alternative. hCaptcha is increasingly common because it pays website operators for traffic.

Cloudflare Turnstile. Cloudflare's lightweight alternative to traditional CAPTCHAs. It usually runs invisibly and presents a visual challenge only when the browser signals are suspicious. Turnstile is fast and less intrusive than reCAPTCHA or hCaptcha.

Text-based CAPTCHAs. Distorted text that users must read and type. These are older and less common but still appear on some sites. They are the easiest to solve with OCR.

Custom CAPTCHAs. Some sites build their own CAPTCHA systems: slider puzzles, math problems, or drag-and-drop challenges. These require custom solving logic.

How Solving Services Work

CAPTCHA solving services like 2captcha use a combination of human workers and machine learning to solve CAPTCHAs:

  1. Your automation detects a CAPTCHA on the page
  2. It sends the CAPTCHA parameters (site key, page URL, CAPTCHA type) to the solving service
  3. The service solves the CAPTCHA (typically in 10-30 seconds for reCAPTCHA, 5-15 seconds for hCaptcha)
  4. Your automation receives a token
  5. You inject the token into the page to bypass the CAPTCHA

The cost is typically $1-3 per 1,000 CAPTCHAs for reCAPTCHA and hCaptcha.

Integration with BrowseFleet

BrowseFleet includes built-in CAPTCHA solving via 2captcha. When enabled, it automatically detects CAPTCHAs on pages and solves them without any additional code on your part.

import { BrowseFleet } from 'browsefleet';

const bf = new BrowseFleet({ apiKey: 'bf_...' });

// CAPTCHA solving is handled automatically
const session = await bf.sessions.create({
  stealth: 'full',
  captchaSolving: true,
});

const browser = await puppeteer.connect({
  browserWSEndpoint: session.websocketUrl,
});

const page = await browser.newPage();
await page.goto('https://protected-site.com');

// If a CAPTCHA appears, BrowseFleet solves it automatically
// Your code does not need to handle it

const data = await page.evaluate(() =>
  document.querySelector('.content')?.textContent
);

await session.close();

For quick actions, CAPTCHA solving works the same way:

const { markdown } = await bf.scrape(
  'https://protected-site.com/data',
  { stealth: 'full', captchaSolving: true }
);

BrowseFleet handles the detection, submission to the solving service, and token injection transparently. You do not need to write any CAPTCHA-specific code.

Reducing CAPTCHA Frequency

Solving CAPTCHAs costs money and adds latency. The best strategy is to reduce how often they appear:

Use stealth mode. BrowseFleet's stealth mode patches all known browser fingerprint leaks. Sites present CAPTCHAs when they suspect automation, so good stealth reduces suspicion.

Use residential proxies. Datacenter IPs are frequently flagged by CAPTCHA services. Residential proxies have better reputation scores.

Maintain cookies. BrowseFleet's cookie persistence feature lets you save and restore browser profiles. A browser with established cookies and browsing history looks less suspicious than a fresh instance.

Add realistic delays. Do not navigate at inhuman speeds. Add 1-3 second delays between page loads and interactions. Vary the timing randomly.

Warm up sessions. Before visiting the target page, navigate to a few other pages on the same domain. This builds a browsing history that makes the session look more legitimate.

With good stealth, residential proxies, and cookie persistence, most sites will not present CAPTCHAs at all. Solving should be a fallback, not the primary strategy.

CAPTCHA solving exists in a gray area. Here are the considerations:

Terms of service. Most websites prohibit automated access in their ToS. Using a CAPTCHA solving service to bypass protections may violate these terms. This is a legal and ethical decision you need to make based on your use case.

Legitimate use cases. Automated accessibility testing, compliance monitoring, academic research, and price comparison services often have legitimate reasons to access CAPTCHA-protected content.

Rate and impact. There is a difference between scraping a site once per day for price monitoring and hammering it with thousands of requests per hour. Respectful automation that does not harm the site's performance is viewed more favorably.

Alternatives. Before solving CAPTCHAs, check if the site offers an API, a data feed, or an affiliate program that provides the data you need through official channels. These are always preferable to scraping.

The decision to use CAPTCHA solving should be made thoughtfully, considering the specific use case, the target site's terms of service, and the potential impact on the site and its users.

Ready to try BrowseFleet?

Get started in under 2 minutes with a free tier. No credit card required.