Skip to main content

Browser Automation

Overview

SpiderBrowser is an anti-detect browser profile management system using Camoufox for C++-level fingerprint spoofing. It maintains persistent authenticated sessions at scale (200+ accounts) for platforms requiring login.

info

SpiderBrowser is an Admin-only feature. All endpoints require X-Admin-Key authentication.

Primary Use Cases

▶️

YouTube Cookie Export

Export authenticated cookies in Netscape format for yt-dlp video downloads

✉️

Email Warmup

Manage 200+ SmartLead.ai accounts for email deliverability warmup

🛡️

Platform Authentication

Maintain LinkedIn, Instagram sessions with realistic fingerprints

🗺️

Google Maps Quality

Warmed profiles get full data vs compact format from Google Maps

Key Features

  • Camoufox Integration - C++-level fingerprint spoofing (not JavaScript-based)
  • VNC Web Access - Manual login, CAPTCHA solving, 2FA via noVNC
  • Cookie Export - Netscape format compatible with yt-dlp
  • SpiderProxy Integration - Mobile IP rotation for realistic sessions
  • Profile Warmup - Automated browsing to build profile history
  • Batch Operations - Start/stop/export multiple profiles simultaneously

How It Works

Architecture

  • API Gateway (/api/v1/admin/browser/*) - Profile management, browser control
  • Browser Worker (workers/SpiderBrowser/) - Camoufox instances with VNC
  • noVNC - Web-based VNC access on port 6080
  • SpiderProxy - Mobile proxy assignment for each profile

Quick Start

1. Create a Profile

curl -X POST "https://spideriq.ai/api/v1/admin/browser/profiles" \
-H "X-Admin-Key: YOUR_ADMIN_KEY" \
-H "Content-Type: application/json" \
-d '{
"profile_name": "youtube-prod-01",
"platform": "youtube",
"account_email": "user@example.com",
"timezone": "Europe/London"
}'

Response:

{
"id": "550e8400-e29b-41d4-a716-446655440000",
"profile_name": "youtube-prod-01",
"platform": "youtube",
"status": "new",
"created_at": "2025-01-21T10:00:00Z"
}

2. Start Browser Session

curl -X POST "https://spideriq.ai/api/v1/admin/browser/profiles/{profile_id}/start" \
-H "X-Admin-Key: YOUR_ADMIN_KEY" \
-H "Content-Type: application/json" \
-d '{
"headless": false,
"navigate_to": "https://youtube.com"
}'

Response:

{
"success": true,
"vnc_url": "http://localhost:6080/vnc.html?autoconnect=true",
"browser_status": "running"
}

3. Access VNC for Manual Login

Open the VNC URL in your browser to access the Camoufox instance:

http://localhost:6080/vnc.html?autoconnect=true

Use VNC to:

  • Complete manual login
  • Solve CAPTCHAs
  • Handle 2FA verification
  • Verify session is active

4. Export Cookies

After successful login, export cookies:

curl -X POST "https://spideriq.ai/api/v1/admin/browser/profiles/{profile_id}/cookies/export" \
-H "X-Admin-Key: YOUR_ADMIN_KEY"

Response:

{
"profile_id": "550e8400-e29b-41d4-a716-446655440000",
"platform": "youtube",
"cookies_json": [...],
"netscape_format": "# Netscape HTTP Cookie File\n.youtube.com\tTRUE\t/\tTRUE\t...",
"expires_at": "2025-02-21T10:00:00Z"
}

5. Stop Browser

curl -X POST "https://spideriq.ai/api/v1/admin/browser/profiles/{profile_id}/stop" \
-H "X-Admin-Key: YOUR_ADMIN_KEY"

Profile Management

Create Profile

POST /api/v1/admin/browser/profiles

Request Body:

{
"profile_name": "linkedin-sales-01",
"platform": "linkedin",
"account_email": "sales@company.com",
"account_username": "john.smith",
"password": "secure_password",
"timezone": "America/New_York",
"locale": "en-US",
"notes": "Sales team account for outreach"
}

Parameters:

FieldTypeRequiredDescription
profile_namestringYesUnique profile identifier
platformstringYesyoutube, linkedin, instagram, smartlead, googlemaps
account_emailstringNoAccount email for the platform
account_usernamestringNoAccount username
passwordstringNoEncrypted password (Fernet)
timezonestringNoProfile timezone (default: Europe/Kiev)
localestringNoBrowser locale (default: en-US)
notesstringNoInternal notes

List Profiles

GET /api/v1/admin/browser/profiles?platform=youtube&status=active

Query Parameters:

ParameterDescription
platformFilter by platform
statusFilter by status (new, warming_up, active, needs_login, banned, cooldown)
limitResults per page (default: 50)
offsetPagination offset

Update Profile

PUT /api/v1/admin/browser/profiles/{profile_id}
{
"status": "active",
"notes": "Updated notes"
}

Delete Profile

DELETE /api/v1/admin/browser/profiles/{profile_id}

Profile Status Lifecycle

new

Profile just created, not yet used

warming_up

In warmup phase (2-3 weeks of gradual usage)

active

Ready for production use

needs_login

Session expired, requires re-authentication via VNC

banned

Account banned on platform (requires new account)

cooldown

Temporary rate-limit cooldown (auto-recovers)


VNC Access

SpiderBrowser provides web-based VNC access via noVNC for manual browser operations.

Access Methods

noVNC Web Interface:

http://localhost:6080/vnc.html?autoconnect=true

Direct VNC (port 5900):

vnc://localhost:5900
Password: spiderbrowser (configurable via VNC_PASSWORD)

Common VNC Operations

  1. Initial Login - Complete first-time platform login
  2. CAPTCHA Solving - Manually solve CAPTCHA challenges
  3. 2FA Verification - Enter SMS/authenticator codes
  4. Session Recovery - Re-login when session expires
  5. Manual Warmup - Browse naturally to build profile history
tip

Keep VNC sessions short. Close the browser when done to free resources. The profile state is automatically saved.


Export Single Profile

POST /api/v1/admin/browser/profiles/{profile_id}/cookies/export

Returns cookies in both JSON and Netscape format.

Export All YouTube Cookies

Aggregate cookies from all active YouTube profiles:

POST /api/v1/admin/browser/cookies/youtube

Response:

{
"profiles_count": 15,
"netscape_format": "# Netscape HTTP Cookie File\n...",
"exported_at": "2025-01-21T10:00:00Z"
}

Using Cookies with yt-dlp

Save the Netscape format to a file and use with yt-dlp:

# Save cookies to file
echo "$NETSCAPE_COOKIES" > youtube_cookies.txt

# Use with yt-dlp
yt-dlp --cookies youtube_cookies.txt "https://www.youtube.com/watch?v=VIDEO_ID"

Warmup & Automation

Profile Warmup

New profiles should be warmed up before production use to build browsing history and avoid detection.

Start Warmup:

POST /api/v1/admin/browser/profiles/{profile_id}/warmup/start

Warmup Activities:

  • Random Google searches
  • Visit popular websites
  • Watch YouTube videos
  • Scroll and click naturally
  • Build cookie history

Recommended Warmup Schedule:

  • Week 1: 15-30 minutes/day, light browsing
  • Week 2: 30-60 minutes/day, normal activity
  • Week 3: Full production usage

Platform-Specific Login

Automated login for supported platforms:

POST /api/v1/admin/browser/profiles/{profile_id}/login
warning

Automated login may trigger security challenges. Use VNC for manual verification if needed.

POST /api/v1/admin/browser/profiles/{profile_id}/navigate
{
"url": "https://youtube.com/feed/subscriptions"
}

Take Screenshot

POST /api/v1/admin/browser/profiles/{profile_id}/screenshot

Returns base64-encoded PNG screenshot.


SpiderProxy Integration

Each browser profile can be assigned a sticky mobile proxy from SpiderProxy for realistic IP rotation.

Automatic Assignment

When starting a browser, SpiderProxy automatically assigns an available modem:

POST /api/v1/admin/browser/profiles/{profile_id}/start

The proxy assignment is saved to the profile and reused for subsequent sessions.

Manual Assignment

Assign a specific modem to a profile:

PUT /api/v1/admin/browser/profiles/{profile_id}
{
"proxy_modem_id": "modem-uuid-here"
}

Proxy Benefits

  • Mobile IPs - Carrier-grade residential IPs
  • Sticky Sessions - Same IP across multiple sessions
  • Auto-Rotation - Scheduled IP rotation (configurable)
  • Health Monitoring - Automatic fallback on modem issues

Batch Operations

Start Multiple Browsers

POST /api/v1/admin/browser/batch/start
{
"profile_ids": [
"uuid-1",
"uuid-2",
"uuid-3"
]
}

Stop Multiple Browsers

POST /api/v1/admin/browser/batch/stop
{
"profile_ids": ["uuid-1", "uuid-2", "uuid-3"]
}
POST /api/v1/admin/browser/batch/cookies
{
"profile_ids": ["uuid-1", "uuid-2", "uuid-3"]
}

Pool Status

Get status of all running browsers:

GET /api/v1/admin/browser/pool/status

Response:

{
"active_browsers": 5,
"max_browsers": 10,
"memory_used_mb": 2048,
"memory_limit_mb": 8192,
"browsers": [
{
"profile_id": "uuid-1",
"platform": "youtube",
"status": "running",
"uptime_seconds": 3600
}
]
}

Best Practices

Profile Naming Convention

Use a consistent naming scheme:

{platform}-{purpose}-{number}

Examples:

  • youtube-media-01 - YouTube for SpiderMedia
  • linkedin-sales-01 - LinkedIn for sales outreach
  • smartlead-warmup-15 - SmartLead email warmup

Warmup Guidelines

tip

New profiles need 2-3 weeks of warmup before production use. Rushing warmup increases ban risk.

  1. Start Slow - Light activity in week 1
  2. Vary Behavior - Don't repeat exact same actions
  3. Use Real Content - Watch actual videos, read posts
  4. Respect Timing - Mimic human usage patterns (not 24/7)
  5. Monitor Health - Check for security challenges

Security Considerations

warning

Never commit credentials to version control. Use environment variables or the encrypted password field.

  • Store passwords encrypted (Fernet)
  • Rotate VNC passwords regularly
  • Limit admin key access
  • Monitor for unusual activity
  • Delete banned profiles promptly

Resource Management

  • Max 10 concurrent browsers per worker
  • 512MB memory per browser instance
  • 4GB shared memory (shm_size) for Chrome
  • Close idle browsers to free resources

Troubleshooting

Browser Won't Start

Check worker health
curl http://localhost:3010/health

Ensure the SpiderBrowser worker is running and healthy.

Check pool capacity
GET /api/v1/admin/browser/pool/status

If active_browsers >= max_browsers, stop some browsers first.

Check memory

If memory is exhausted, the worker may reject new browsers. Restart the worker or reduce concurrent browsers.

VNC Black Screen

Browser not started

Ensure the browser is running:

GET /api/v1/admin/browser/profiles/{id}/status
Display issue

The Xvfb virtual display may have crashed. Restart the browser worker.

Not logged in

Access VNC and verify the session is authenticated before exporting.

Cookies expired

Re-login via VNC to refresh the session.

Profile Banned

Immediate ban

The fingerprint may be detected. Try a different proxy/modem.

Gradual ban

Behavior patterns triggered detection. Use longer warmup and more natural browsing.


API Reference

Profile Endpoints

MethodEndpointDescription
POST/admin/browser/profilesCreate profile
GET/admin/browser/profilesList profiles
GET/admin/browser/profiles/{id}Get profile
PUT/admin/browser/profiles/{id}Update profile
DELETE/admin/browser/profiles/{id}Delete profile

Browser Control

MethodEndpointDescription
POST/admin/browser/profiles/{id}/startStart browser
POST/admin/browser/profiles/{id}/stopStop browser
GET/admin/browser/profiles/{id}/statusGet status
POST/admin/browser/profiles/{id}/navigateNavigate to URL
POST/admin/browser/profiles/{id}/screenshotTake screenshot
MethodEndpointDescription
POST/admin/browser/profiles/{id}/cookies/exportExport cookies
GET/admin/browser/profiles/{id}/cookies/latestGet latest export
POST/admin/browser/cookies/youtubeExport all YouTube cookies

Automation

MethodEndpointDescription
POST/admin/browser/profiles/{id}/loginAuto-login
POST/admin/browser/profiles/{id}/warmup/startStart warmup
POST/admin/browser/profiles/{id}/warmup/stopStop warmup

Batch & Stats

MethodEndpointDescription
POST/admin/browser/batch/startBatch start
POST/admin/browser/batch/stopBatch stop
POST/admin/browser/batch/cookiesBatch export
GET/admin/browser/pool/statusPool status
GET/admin/browser/statsStatistics
GET/admin/browser/healthWorker health

Need Help?