FunCaptcha / Arkose Labs Solving
Overview
FunCaptcha (Arkose Labs) is an advanced bot detection system that uses interactive challenges. Surfsky handles these challenges using AI-powered detection to identify and submit the correct answers automatically.
Quick Start
For most use cases, our simplified CAPTCHA solving approach handles FunCaptcha automatically. See our comprehensive CAPTCHA Solving Guide for full details.
Prerequisites
- Enable
anti_captcha
in your browser profile settings - Gemini API Key - Get one from Google AI Studio
- Pass it when starting your browser. See API Reference for details
- Use quality proxies to minimize FunCaptcha challenges
Solving Methods
Method 1: Simple Manual Solving (Recommended)
The easiest way to handle FunCaptcha - detect and solve when needed:
- Python
- JavaScript
import asyncio
from playwright.async_api import async_playwright
async def solve_funcaptcha_simple():
async with async_playwright() as p:
# Connect to your Surfsky browser with Gemini API key configured
browser = await p.chromium.connect_over_cdp("ws://your-browser-url")
page = await browser.new_page()
# Create CDP session
client = await page.context.new_cdp_session(page)
# Navigate to FunCaptcha protected site
await page.goto("https://example.com/protected")
# Check if FunCaptcha challenge appears
if await page.query_selector('iframe[src*="arkoselabs.com"]'):
print("FunCaptcha detected, solving...")
# Solve FunCaptcha
response = await client.send("Captcha.solve", {"type": "funcaptcha"})
if response.get("status") == "success":
print("✓ FunCaptcha solved!")
# Page will continue automatically after solution
await page.wait_for_load_state("networkidle")
content = await page.content()
print("Page loaded successfully")
else:
print("✗ Failed to solve FunCaptcha")
await browser.close()
asyncio.run(solve_funcaptcha_simple())
const { chromium } = require('playwright');
async function solveFuncaptchaSimple() {
// Connect to your Surfsky browser with Gemini API key configured
const browser = await chromium.connectOverCDP('ws://your-browser-url');
const page = await browser.newPage();
// Create CDP session
const client = await page.context().newCDPSession(page);
// Navigate to FunCaptcha protected site
await page.goto('https://example.com/protected');
// Check if FunCaptcha challenge appears
const funcaptchaFrame = await page.$('iframe[src*="arkoselabs.com"]');
if (funcaptchaFrame) {
console.log('FunCaptcha detected, solving...');
// Solve FunCaptcha
const response = await client.send('Captcha.solve', { type: 'funcaptcha' });
if (response.status === 'success') {
console.log('✓ FunCaptcha solved!');
// Page will continue automatically after solution
await page.waitForLoadState('networkidle');
const content = await page.content();
console.log('Page loaded successfully');
} else {
console.log('✗ Failed to solve FunCaptcha');
}
}
await browser.close();
}
solveFuncaptchaSimple().catch(console.error);
Method 2: Auto Solving
Let the browser automatically handle FunCaptcha challenges:
- Python
- JavaScript
import asyncio
from playwright.async_api import async_playwright
import httpx
CLOUD_API_TOKEN = "YOUR_API_TOKEN"
GEMINI_API_KEY = "YOUR_GEMINI_API_KEY"
async def start_browser_with_funcaptcha_auto():
"""Start browser with FunCaptcha auto-solving enabled"""
url = "https://api-public.surfsky.io/profiles/one_time"
headers = {
"Content-Type": "application/json",
"X-Cloud-Api-Token": CLOUD_API_TOKEN
}
data = {
"browser_settings": {
"inactive_kill_timeout": 60
},
"anti_captcha": {
"enabled": True,
"gemini_api_key": GEMINI_API_KEY,
"auto_captcha_types": ["funcaptcha"] # Enable auto-solving for FunCaptcha
}
}
async with httpx.AsyncClient(timeout=60) as client:
response = await client.post(url, headers=headers, json=data)
response.raise_for_status()
data = response.json()
return data["ws_url"]
async def solve_funcaptcha_auto():
async with async_playwright() as p:
# Start browser with auto-solving enabled
cdp_url = await start_browser_with_funcaptcha_auto()
browser = await p.chromium.connect_over_cdp(cdp_url)
page = await browser.new_page()
print("Auto-solve activated - FunCaptcha will be solved automatically")
# Navigate to any page - FunCaptcha challenges will be handled automatically
await page.goto("https://example.com/protected")
# Continue with your scraping
# Any FunCaptcha that appears will be solved in the background
await browser.close()
asyncio.run(solve_funcaptcha_auto())
const { chromium } = require('playwright');
const axios = require('axios');
const CLOUD_API_TOKEN = 'YOUR_API_TOKEN';
const GEMINI_API_KEY = 'YOUR_GEMINI_API_KEY';
async function startBrowserWithFuncaptchaAuto() {
const url = 'https://api-public.surfsky.io/profiles/one_time';
const headers = {
'Content-Type': 'application/json',
'X-Cloud-Api-Token': CLOUD_API_TOKEN
};
const data = {
browser_settings: {
inactive_kill_timeout: 60
},
anti_captcha: {
enabled: true,
gemini_api_key: GEMINI_API_KEY,
auto_captcha_types: ['funcaptcha'] // Enable auto-solving for FunCaptcha
}
};
const response = await axios.post(url, data, { headers });
return response.data.ws_url;
}
async function solveFuncaptchaAuto() {
// Start browser with auto-solving enabled
const cdpUrl = await startBrowserWithFuncaptchaAuto();
const browser = await chromium.connectOverCDP(cdpUrl);
const page = await browser.newPage();
console.log('Auto-solve activated - FunCaptcha will be solved automatically');
// Navigate to any page - FunCaptcha challenges will be handled automatically
await page.goto('https://example.com/protected');
// Continue with your scraping
// Any FunCaptcha that appears will be solved in the background
await browser.close();
}
solveFuncaptchaAuto().catch(console.error);
Best Practices
- Gemini API Key Required - Visual detection needs AI analysis
- Be Patient - Multiple rounds may take 1-2 minutes to complete
- Quality Proxies reduce FunCaptcha challenge frequency
- Human Emulation helps avoid triggering challenges
Need Help?
For more details on CAPTCHA solving, see our comprehensive CAPTCHA Solving Guide.
For Gemini API setup, visit Google AI Studio.
Questions? Contact us at [email protected].