Node TwoCaptcha



Node TwoCaptcha is a Javascript package for 2Captcha -

Just run:

npm install @infosimples/node_two_captcha
JSDoc documentation can be found at

Create a client
// Import module
const Client = require('@infosimples/node_two_captcha');

// Declare your client
client = new Client('your_2captcha_key', {
                    timeout: 60000,
                    polling: 5000,
                    throwErrors: false});

The first parameter of the TwoCaptchaClient constructor is your API key from 2Captcha. The other parameters are:
  • timeout: Time (milliseconds) to wait before giving up on waiting for a captcha solution.
  • polling: Time (milliseconds) between polls to 2captcha server. 2Captcha documentation suggests this time to be at least 5 seconds, or you might get blocked.
  • throwErrors: Whether the client should throw errors or just log the errors.