Skip to main content

Image CAPTCHA Solving

Overview

Image CAPTCHAs display distorted text or numbers that users need to type. These are classic CAPTCHAs commonly found on older websites and forms. Surfsky handles these challenges through our manual solving system.

Quick Start

For most use cases, our simplified CAPTCHA solving approach handles Image CAPTCHAs. See our comprehensive CAPTCHA Solving Guide for full details.

Prerequisites

  1. Enable anti_captcha in your browser profile settings
  2. Use quality proxies for better success rates

Manual Solving

Image CAPTCHA requires providing the URL of the CAPTCHA image:

import asyncio
from playwright.async_api import async_playwright

async def solve_image():
async with async_playwright() as p:
# Connect to your Surfsky browser
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 page with Image CAPTCHA
await page.goto("https://example.com/protected")

# Find the CAPTCHA image and get its URL
captcha_img = await page.query_selector("img[src*='captcha'], .captcha-image img")
if captcha_img:
# Get the image URL
image_url = await captcha_img.get_attribute("src")

# If it's a relative URL, make it absolute
if image_url and not image_url.startswith("http"):
image_url = f"https://example.com{image_url}"

print(f"Image CAPTCHA detected, solving: {image_url}")

# Solve Image CAPTCHA with required image_url parameter
response = await client.send("Captcha.solve", {
"type": "image",
"image_url": image_url # Required parameter
})

if response.get("status") == "success":
print(f"✓ Image CAPTCHA solved: {response.get('solution')}")

# Type the solution into the input field
input_field = await page.query_selector("input[name='captcha'], #captcha-input")
if input_field and response.get("solution"):
await input_field.fill(response.get("solution"))

# Continue with your automation
await page.wait_for_load_state("networkidle")
else:
print("✗ Failed to solve Image CAPTCHA")

await browser.close()

asyncio.run(solve_image())

How It Works

Image CAPTCHAs show distorted text that needs to be typed. Our solver:

  1. Captures the CAPTCHA image
  2. Uses OCR technology to read the distorted text
  3. Automatically types the answer in the input field
  4. Handles various distortion and noise levels

Best Practices

  1. Clear Images - Higher quality images solve more reliably
  2. Retry Logic - Some CAPTCHAs may need multiple attempts
  3. Quality Proxies help avoid rate limiting
  4. Session Persistence - Reuse profiles when possible

Need Help?

For more details on CAPTCHA solving, see our comprehensive CAPTCHA Solving Guide.

Questions? Contact us at [email protected].