Sign In

@gatesolve/playwright-plugin

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@gatesolve/playwright-plugin

Automatic CAPTCHA solving for Playwright and playwright-extra. Detects and solves Cloudflare Turnstile, reCAPTCHA v2/v3, and hCaptcha via GateSolve API. Free tier included.

latest
Source
npmnpm
Version
0.2.1
Version published
Weekly downloads
13
550%
Maintainers
1
Weekly downloads
 
Created
Source

@gatesolve/playwright-plugin

Automatic CAPTCHA solving for Playwright. Detects Cloudflare Turnstile, reCAPTCHA, and hCaptcha challenges and solves them via GateSolve.

Install

npm install @gatesolve/playwright-plugin

Quick Start

One-shot: Solve CAPTCHA on current page

import { chromium } from 'playwright';
import { solveOnPage } from '@gatesolve/playwright-plugin';

const browser = await chromium.launch();
const page = await browser.newPage();
await page.goto('https://example.com/login');

// Detect and solve any CAPTCHA on the page
const result = await solveOnPage(page, {
  apiKey: 'gs_your_key_here', // Free at gatesolve.dev
});

if (result?.success) {
  console.log(`Solved ${result.type} in ${result.solveTimeMs}ms`);
  // Token is already injected into the page — submit the form
  await page.click('button[type="submit"]');
}

Auto-solve: Wrap browser context

import { chromium } from 'playwright';
import { withGateSolve } from '@gatesolve/playwright-plugin';

const browser = await chromium.launch();
const context = await browser.newContext();

// Every page in this context will auto-solve CAPTCHAs
withGateSolve(context, {
  apiKey: 'gs_your_key_here',
  debug: true,
});

const page = await context.newPage();
await page.goto('https://example.com/protected');
// CAPTCHA is solved automatically on page load

Detect only (no solve)

import { detectCaptcha } from '@gatesolve/playwright-plugin';

const detection = await detectCaptcha(page);
if (detection) {
  console.log(`Found ${detection.type} with siteKey ${detection.siteKey}`);
}

API

solveOnPage(page, options)

Detect and solve a CAPTCHA on the current page. Returns SolveResult | null.

withGateSolve(context, options)

Wrap a BrowserContext to auto-solve CAPTCHAs on every page load. Returns the same context.

detectCaptcha(page)

Detect CAPTCHA type and siteKey without solving. Returns CaptchaDetection | null.

Options

OptionTypeDefaultDescription
apiKeystringrequiredGateSolve API key
baseUrlstringhttps://gatesolve.devAPI base URL
timeoutnumber30000Max solve wait (ms)
pollIntervalnumber2000Poll frequency (ms)
debugbooleanfalseLog debug info

Supported CAPTCHAs

  • Cloudflare Turnstile — $0.02/solve
  • reCAPTCHA v2/v3 — $0.03/solve
  • hCaptcha — $0.03/solve

Free Tier

100 free solves per API key. No credit card required. Get your key at gatesolve.dev.

License

MIT

Keywords

recaptcha

FAQs

Package last updated on 02 Apr 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts