npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

recaptcha-v2-solver

v1.0.2

Published

ReCaptcha v2 bypass solution using three methods: Audio transcription, Visual (Gemini), and 2Captcha

Downloads

45

Readme

ReCaptcha V2 Solver

A collection of methods to solve Google ReCaptcha v2 challenges using different approaches. This project provides three different methods to bypass ReCaptcha:

Available Methods

1. 🎧 Audio Challenge Method

  • Uses wit.ai to transcribe ReCaptcha audio challenges
  • Requires FREE wit.ai API keys
  • Average success rate: 70-80%

2. 👥 2Captcha Service

  • Uses paid human captcha solving service
  • Most reliable but costs money ($2.99 per 1000 solves)
  • Requires 2captcha API key
  • Success rate: 95%+

3. 🤖 Visual Challenge Method (Experimental)

  • Uses AI (Gemini) to solve visual challenges
  • Experimental and less reliable
  • requires Free Gemini API key
  • Success rate: varies

Visual Challenge bypass demo: See Google Gemini solving Google ReCaptcha in action

Visual Challenge Demo

Installation

npm install recaptcha-v2-solver

Basic Usage Examples

Audio Method

const { generateCaptchaTokensWithAudio } = require('recaptcha-v2-solver');
const EventEmitter = require('events');

const eventEmitter = new EventEmitter();

eventEmitter.on('tokenGenerated', ({ token }) => {
    console.log('Got token:', token);
});

await generateCaptchaTokensWithAudio({
    eventEmitter,
    captchaUrl: 'https://your-target-website.com/page-with-recaptcha',
    wit: {
        apiKeys: ['YOUR_WIT_TOKEN']
    }
});

Visual Method (Gemini)

const { generateCaptchaTokensWithVisual } = require('recaptcha-v2-solver');
const EventEmitter = require('events');

const eventEmitter = new EventEmitter();

eventEmitter.on('tokenGenerated', ({ token }) => {
    console.log('Got token:', token);
});

await generateCaptchaTokensWithVisual({
    eventEmitter,
    captchaUrl: 'https://your-target-website.com/page-with-recaptcha',
    gemini: {
        apiKey: 'YOUR_GEMINI_API_KEY'
    }
});

2Captcha Method

const { generateCaptchaTokensWith2Captcha } = require('recaptcha-v2-solver');
const EventEmitter = require('events');

const eventEmitter = new EventEmitter();

eventEmitter.on('tokenGenerated', ({ token }) => {
    console.log('Got token:', token);
});

await generateCaptchaTokensWith2Captcha({
    eventEmitter,
    captchaUrl: 'https://your-target-website.com/page-with-recaptcha',
    "2captcha": {
        apiKey: 'YOUR_2CAPTCHA_API_KEY'
    }
});

See /examples directory for more complete working examples.

Events

Each solver emits the following events:

// 1. Token successfully generated
solver.on('tokenGenerated', (data) => {
    console.log(data);
    // {
    //     token: "03AGdBq24PBgq_DRbWL..."  // reCAPTCHA token
    // }
});

// 2. Error during token generation
solver.on('tokenError', (data) => {
    console.log(data);
    // {
    //     error: "Failed to solve captcha: Network error"
    // }
});

Configuration Options

Full configuration options with all possible settings:

{
    eventEmitter: EventEmitter,          // Required: Event emitter instance
    captchaUrl: 'https://example.com',   // Required: URL of the page containing reCAPTCHA
    tokensToGenerate: 3,                 // Optional: Number of tokens to generate (default: Infinity)
    concurrentBrowsers: 2,               // Optional: Number of concurrent browser instances (default: 1)
    tabsPerBrowser: 1,                   // Optional: Tabs per browser (default: 1)
    
    // Browser settings
    browser: {
        headless: true,                  // Optional: Run in headless mode (default: true)
        executablePath: '/path/to/chrome',// Optional: Chrome executable path
        userAgents: ['Mozilla/5.0...']   // Optional: Array of user agents to rotate
    },
    
    // Proxy settings
    proxy: {
        enabled: false,                  // Optional: Enable proxy (default: false)
        host: 'proxy.example.com',       // Required if proxy enabled
        port: '8080',                    // Required if proxy enabled
        username: 'user',                // Optional: Proxy authentication
        password: 'pass'                 // Optional: Proxy authentication
    },
    
    // Logger settings
    logger: {
        level: 'info'                    // Optional: 'error' | 'warn' | 'info' | 'debug' | 'silent'
    },
    
    // Method-specific options:
    
    // Audio Method only:
    wit: {
        apiKeys: [                       // Required for Audio method: Array of wit.ai API keys
            'WIT_TOKEN_1',
            'WIT_TOKEN_2'
        ]
    },
    
    // Visual Method only:
    gemini: {
        apiKey: 'GEMINI_API_KEY',       // Required for Visual method: Gemini API key
        model: 'gemini-1.5-flash'       // Optional for Visual method: Gemini model (default: 'gemini-1.5-flash')
    },
    
    // 2Captcha Method only:
    "2captcha": {
        apiKey: '2CAPTCHA_API_KEY'      // Required for 2Captcha method: 2captcha API key
    }
}

Notes

  • Use proxies to prevent IP bans
  • Rotate user agents and browser profiles
  • Handle rate limiting appropriately
  • Consider legal and ethical implications

Disclaimer

This project is for educational purposes only. Use of automated systems to bypass CAPTCHAs may violate terms of service of some websites. Always ensure you have permission to use automated solutions on target websites.