👑 CaptchaKings
  • Home
  • Features
  • Pricing
  • Documentation
Login Sign Up

Puppeteer Captcha Solver

Bypass reCAPTCHA, hCaptcha & Turnstile in Puppeteer / Node.js — Last Updated: August 29, 2026

⚡ TL;DR: Skip the flaky puppeteer-extra-plugin-recaptcha. The production-grade pattern: pull the sitekey → POST it to CaptchaKings → inject the returned token with page.evaluate(). No browser extensions, no iframe clicking, ~3 seconds per solve. Free $0.50 credit on signup.

Why Not puppeteer-extra-plugin-recaptcha?

The popular plugin runs solving logic inside the automated browser. That leaves a detectable footprint, breaks whenever Google ships a reCAPTCHA update, and struggles with Enterprise score-based challenges. A server-side solving API decouples you from the cat-and-mouse game: your bot just asks for a token and injects it — the same technique used by large-scale scraping teams.

Install

bash
npm install puppeteer axios
# Recommended companion:
npm install puppeteer-extra puppeteer-extra-plugin-stealth

Complete Working Example (Node.js)

javascript
const puppeteer = require('puppeteer-extra');
const StealthPlugin = require('puppeteer-extra-plugin-stealth');
const axios = require('axios');

puppeteer.use(StealthPlugin());

const API_KEY  = 'ck_your_api_key_here';
const PAGE_URL = 'https://example.com/register';

async function solveRecaptchaV2(sitekey, pageUrl) {
    const { data } = await axios.post('https://captchakings.com/api', {
        api_key: API_KEY,
        captcha_type: 'recaptcha_v2',
        sitekey: sitekey,
        page_url: pageUrl
    });
    if (!data.token) throw new Error('Solve failed: ' + JSON.stringify(data));
    return data.token;   // valid g-recaptcha-response, ~3s average
}

(async () => {
    const browser = await puppeteer.launch({ headless: 'new' });
    const page = await browser.newPage();
    await page.goto(PAGE_URL, { waitUntil: 'networkidle2' });

    // 1. Extract the sitekey
    const sitekey = await page.$eval('[data-sitekey]', el => el.dataset.sitekey);

    // 2. Solve server-side
    const token = await solveRecaptchaV2(sitekey, PAGE_URL);

    // 3. Inject + submit
    await page.evaluate((t) => {
        document.getElementById('g-recaptcha-response').innerHTML = t;
    }, token);
    await Promise.all([
        page.waitForNavigation({ waitUntil: 'networkidle2' }),
        page.click('button[type=submit]')
    ]);

    console.log('Passed:', page.url());
    await browser.close();
})();

Image & Text CAPTCHAs via Screenshot

javascript
const el = await page.$('#captcha-img');
await el.screenshot({ path: 'captcha.png' });

const FormData = require('form-data');
const fs = require('fs');
const form = new FormData();
form.append('captcha', fs.createReadStream('captcha.png'));
form.append('api_key', API_KEY);

const { data } = await axios.post('https://captchakings.com/api/process.php', form, {
    headers: form.getHeaders()
});
console.log('Answer:', data.prediction, '| confidence:', data.confidence);

Production Checklist for Puppeteer Bots

  1. Stealth + solver, not stealth alone. Stealth reduces how often you're challenged; the solver guarantees you pass when you are.
  2. Match your proxy IP. The token is bound to the visiting IP. Route the browser through the same proxy you register with the solver — or use the CaptchaKings IP Rotator.
  3. Cache sessions. Save page.cookies() after passing and reuse them; only re-solve when the session dies.
  4. Never pay for failures. CaptchaKings only bills successful solves — report bad tokens for instant credit-back.

Cost at Scale

Monthly VolumeTypeApprox. Cost
10,000 solvesreCAPTCHA v2~$6 – $20
100,000 solvesreCAPTCHA v2~$60 – $200
100,000 solvesImage / text OCRfrom $30
TestingAny$0 — free $0.50 signup credit

Frequently Asked Questions

Does this work with puppeteer-extra-plugin-stealth?

Yes — it's the recommended pairing. Stealth masks automation signals while CaptchaKings clears the challenge server-side.

Can I use it with Puppeteer cluster / concurrent browsers?

Yes. The API is stateless and handles high concurrency, so puppeteer-cluster workers can request tokens in parallel without rate issues on paid plans.

What if the injected token gets rejected?

Report it via the API for an automatic refund, then request a new token. Rejection is rare (<1% on reCAPTCHA v2) and never billed.

🎁 Free $0.50 credit — run this exact script today, on us. Create your API key →

Related Integration Guides

Selenium Captcha Solver Playwright Captcha Solver hCaptcha Solver API Node.js + Puppeteer Tutorial API Documentation
Get Your Free API Key
Back to Home
👑 CaptchaKings

Fastest and Cheapest AI CAPTCHA Solver Service

Integrations

  • Selenium
  • Playwright
  • Puppeteer
  • API Docs

Legal

  • Privacy Policy
  • Refund Policy
  • Terms of Service
  • SLA 99.9%

© 2026 CaptchaKings.com. All rights reserved.