The Problem
AI agents and web scrapers waste enormous amounts of time and money misclassifying web access blocks.
Here is what typically happens:
- Agent hits a Cloudflare page
- Agent assumes it is a CAPTCHA
- Agent submits a solve request
- Solve fails because it was actually a JS challenge, not a CAPTCHA
- Agent retries. Same result. Repeat until timeout.
Or worse:
- Agent hits a login page
- Agent sees a CAPTCHA widget on the login form
- Agent solves the CAPTCHA but still cannot access the content because authentication is the actual gate, not the CAPTCHA
The root cause: agents do not classify the block type before attempting to bypass it.
The Solution: Pre-flight Block Detection
We built a free endpoint at GateSolve that classifies URL access blocks:
curl "https://gatesolve.dev/api/detect?url=https://example.com"
Response:
{
"url": "https://example.com",
"classification": "captcha",
"captchaType": "cloudflare-turnstile",
"httpStatus": 403,
"solvable": true,
"confidence": 0.9,
"recommendation": "Submit to GateSolve /api/solve",
"checkedAt": "2026-03-26T12:00:00.000Z"
}
Classification Types
| Classification | What It Means | Solvable? | What To Do |
|---|---|---|---|
public-ok |
Page is accessible | No action needed | Proceed normally |
captcha |
CAPTCHA widget detected | Yes | Submit to a CAPTCHA solver |
js-challenge |
Cloudflare JS interstitial | No | Use a real browser, wait 5-10s |
auth-wall |
Login/auth required | No | Provide credentials |
blocked-silent |
403 with no pattern | No | Try different IP/user-agent |
rate-limited |
429 Too Many Requests | No | Back off and retry |
Why This Matters
Every failed solve attempt costs:
- Time: 7-15 seconds waiting for a result that was never going to work
- Money: CAPTCHA solving credits burned on unsolvable blocks
- Compute: retry loops that spiral into timeout
A 2-second pre-flight check saves all of that.
For Browser Automation: Client-Side Detection
If you are using Puppeteer or Playwright, we also ship detectBlock in our plugins:
import { detectBlock, solveOnPage } from '@gatesolve/puppeteer-plugin';
await page.goto('https://target-site.com');
const block = await detectBlock(page);
if (block.classification === 'captcha' && block.solvable) {
await solveOnPage(page, { apiKey: 'gs_...' });
} else if (block.classification === 'js-challenge') {
await page.waitForTimeout(10000);
const recheck = await detectBlock(page);
} else if (block.classification === 'auth-wall') {
console.log('Login required, not a CAPTCHA problem');
}
Install:
npm install @gatesolve/puppeteer-plugin
# or
npm install @gatesolve/playwright-plugin
Both v0.2.0, just published.
The Failure Taxonomy
This idea came from a community discussion. The insight: agents need a failure taxonomy before they need a bypass stack.
Classify first, then act. Not the other way around.
GateSolve is a CAPTCHA solving API for AI agents. Free tier with 100 solves, no credit card. The detect endpoint requires no API key at all.
- Detect endpoint: gatesolve.dev/api/detect
- Docs: gatesolve.dev/docs
- Status: gatesolve.dev/status
- Python SDK:
pip install gatesolve - Puppeteer plugin:
npm install @gatesolve/puppeteer-plugin - Playwright plugin:
npm install @gatesolve/playwright-plugin
Top comments (0)