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
- 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 PerimeterX challenges
Solving Methods
Method 1: Simple Manual Solving (Recommended)
The easiest way to handle PerimeterX - detect and solve when needed:
- Python
- JavaScript
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())
const { chromium } = require('playwright');
async function solvePerimeterxSimple() {
// Connect to your Surfsky browser
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 page with PerimeterX
await page.goto('https://example.com/protected');
// Check if PerimeterX challenge is present
const pxElement = await page.$('#px-captcha, .px-captcha-container');
if (pxElement) {
console.log('PerimeterX detected, solving...');
// Solve PerimeterX (Press & Hold challenge)
const response = await client.send('Captcha.solve', { type: 'perimeterx' });
if (response.status === 'success') {
console.log('✓ PerimeterX solved!');
// Continue with your automation
await page.waitForLoadState('networkidle');
} else {
console.log('✗ Failed to solve PerimeterX');
}
}
await browser.close();
}
solvePerimeterxSimple().catch(console.error);
Method 2: Auto Solving
Let the browser automatically detect and solve PerimeterX challenges:
- Python
- JavaScript
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())
const { chromium } = require('playwright');
async function solvePerimeterxAuto() {
const browser = await chromium.connectOverCDP('ws://your-browser-url');
const page = await browser.newPage();
const client = await page.context().newCDPSession(page);
// Enable auto-solving for PerimeterX
await client.send('Captcha.autoSolve', { type: 'perimeterx' });
console.log('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();
}
solvePerimeterxAuto().catch(console.error);
How It Works
PerimeterX uses a "Press & Hold" button challenge. Our solver:
- Uses Gemini AI to visually locate the button
- Moves the mouse naturally to the button
- Presses and holds for the required duration (typically 8-10 seconds)
- Releases when the challenge is complete
Best Practices
- Gemini API Key Required - Visual detection needs AI analysis
- Be Patient - Press & Hold takes 8-10 seconds to complete
- Quality Proxies reduce PerimeterX challenge frequency
- 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].