Skip to main content

PerimeterX / HUMAN Solving

Overview

PerimeterX (now HUMAN) is an advanced bot detection system that uses "Press & Hold" challenges. Surfsky handles these challenges using AI-powered visual detection to locate and interact with the button naturally.

Quick Start

For most use cases, our simplified CAPTCHA solving approach handles PerimeterX 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 PerimeterX challenges

Solving Methods

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

import asyncio
from playwright.async_api import async_playwright

async def solve_perimeterx_simple():
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 PerimeterX
await page.goto("https://example.com/protected")

# Check if PerimeterX challenge is present
if await page.query_selector("#px-captcha, .px-captcha-container"):
print("PerimeterX detected, solving...")

# Solve PerimeterX (Press & Hold challenge)
response = await client.send("Captcha.solve", {"type": "perimeterx"})

if response.get("status") == "success":
print("✓ PerimeterX solved!")
# Continue with your automation
await page.wait_for_load_state("networkidle")
else:
print("✗ Failed to solve PerimeterX")

await browser.close()

asyncio.run(solve_perimeterx_simple())

Method 2: Auto Solving

Let the browser automatically detect and solve PerimeterX challenges:

import asyncio
from playwright.async_api import async_playwright

async def solve_perimeterx_auto():
async with async_playwright() as p:
browser = await p.chromium.connect_over_cdp("ws://your-browser-url")
page = await browser.new_page()
client = await page.context.new_cdp_session(page)

# Enable auto-solving for PerimeterX
await client.send("Captcha.autoSolve", {"type": "perimeterx"})

print("Auto-solve activated - PerimeterX will be solved automatically")

# Navigate to any page - PerimeterX challenges will be handled automatically
await page.goto("https://example.com/protected")

# Continue with your automation
# Any PerimeterX challenge will be solved in the background

await browser.close()

asyncio.run(solve_perimeterx_auto())

How It Works

PerimeterX uses a "Press & Hold" button challenge. Our solver:

  1. Uses Gemini AI to visually locate the button
  2. Moves the mouse naturally to the button
  3. Presses and holds for the required duration (typically 8-10 seconds)
  4. Releases when the challenge is complete

Best Practices

  1. Gemini API Key Required - Visual detection needs AI analysis
  2. Be Patient - Press & Hold takes 8-10 seconds to complete
  3. Quality Proxies reduce PerimeterX challenge frequency
  4. Human Emulation helps avoid triggering challenges

Need Help?

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

Questions? Contact us at [email protected].