Captcha Solving
Automatically solve CAPTCHAs during browser sessions. Browser Forest integrates with third-party captcha solving services so your automation flows never get stuck on verification challenges.
Supported Providers
We support multiple captcha solving providers. Configure your provider API key once and all sessions will use it automatically.
| Provider | Captcha Types | Status |
|---|---|---|
| Capsolver | reCAPTCHA v2/v3, hCaptcha, Cloudflare Turnstile, AWS WAF, FunCaptcha, DataDome, ImageToText | Stable |
| YesCaptcha | reCAPTCHA v2/v3, hCaptcha, FunCaptcha | Planning |
Solve a Captcha
Attach a captcha to a running session. The solver will detect and resolve the challenge automatically.
With Node.js SDK:
import { BrowserForest } from '@browser-forest/sdk';
const client = new BrowserForest({ apiKey: 'bf_live_xxxx' });
// Create a session and solve captcha on a page
const session = await client.sessions.create();
await client.captcha.solve({
sessionId: session.id,
url: 'https://example.com/login',
captchaType: 'recaptcha_v2', // optional, auto-detected
timeout: 120, // optional, default 120s
});
// Continue with your automation...
await client.sessions.stop(session.id);Direct API Call
Without SDK, you can call the captcha API directly:
curl -X POST https://bf.mktindex.com/api/v1/captcha/solve \
-H "X-API-Key: bf_live_xxxx" \
-H "Content-Type: application/json" \
-d '{
"sessionId": "ses_xxxx",
"url": "https://example.com/login",
"captchaType": "recaptcha_v2",
"timeout": 120
}'Response
On success:
{
"success": true,
"solvedAt": "2026-06-09T10:30:00Z",
"provider": "capsolver",
"captchaType": "recaptcha_v2",
"durationMs": 8234
}How It Works
Captcha solving happens synchronously within a session. When you post a captcha request, the worker:
- Navigates to the target URL
- Detects the captcha type (reCAPTCHA, hCaptcha, etc.)
- Sends the challenge to the configured solving provider
- Executes the solution token in the browser
- Returns the solved status to your code
Request Parameters
Parameters for POST /v1/captcha/solve:
| Parameter | Type | Required | Description |
|---|---|---|---|
sessionId | string | Yes | Session ID to attach captcha solving to |
url | string | Yes | Page URL containing the captcha |
captchaType | string | No | Force captcha type (recaptcha_v2, recaptcha_v3, hcaptcha, turnstile). Auto-detected if omitted. |
timeout | integer | No | Max solve time in seconds (default: 120) |
proxyId | string | No | Proxy to use for captcha solving (if different from session proxy) |
Error Handling
Common captcha solving errors:
| Code | Meaning | Action |
|---|---|---|
CAPTCHA_TIMEOUT | Solving exceeded timeout | Increase timeout or retry |
CAPTCHA_UNSOLVABLE | Captcha type not supported | Try a different provider or captchaType |
CAPTCHA_PROVIDER_ERROR | Provider API error | Check provider API key and quota |
INSUFFICIENT_CREDITS | No captcha quota remaining | Upgrade plan or purchase credits |
Common Use Cases
Web Scraping with Login
When scraping sites behind Cloudflare or reCAPTCHA login walls, enable captcha solving to bypass the challenge page.
Account Creation
Automated account registration flows often hit captcha checks. Attach a captcha solve request before submitting the registration form.
E-commerce Checkout
Some checkout flows trigger bot detection. Integrate captcha solving to complete purchases without manual intervention.