Skip to main content

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

  1. Enable anti_captcha in your browser profile settings
  2. Gemini API Key - Get one from Google AI Studio
    • Pass it when starting your browser. See API Reference for details
  3. Use quality proxies to minimize FunCaptcha challenges

Solving Methods

The easiest way to handle FunCaptcha - detect and solve when needed:

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())

Method 2: Auto Solving

Let the browser automatically handle FunCaptcha challenges:

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())

Best Practices

  1. Gemini API Key Required - Visual detection needs AI analysis
  2. Be Patient - Multiple rounds may take 1-2 minutes to complete
  3. Quality Proxies reduce FunCaptcha challenge frequency
  4. 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].