Rucaptcha-solver - rucaptcha client for Node js



rucaptcha-solver requires Node v7.0.0 or greater
npm i rucaptcha-solver

How to use
// require solver module
const Solver = require('rucaptcha-solver');

// create new Solver instance
const solver = new Solver({
  apiKey: '1abc234de56fab7c89012d34e56fa7b8' // Required

// async/await example. For example with promises check "Examples" link above
(async () => {

  // wikipedia link to captcha
  const captchaUrl = '';

  // solve captcha
  const { id, answer } = await solver.solve(captchaUrl);

  console.log(`Your captcha answer is ${answer}`);
  console.log(`Your captcha id is ${id}`);


new Solver(settings)

Constructor settings
  • apiKey <String> required - Api key from your account. Should be length of 32 symbols.
  • retryInterval <Number> optional - retry interval for making request to get captcha in milliseconds. Default value is 3000 ms. Number shouldn't be less then 2000 ms, because you have a chance to get banned by rucaptcha server.
Available methods
solver.solve(imgPath, options) - solves captcha image. Image gets downloaded from imgPath.
  • imgPath <String> required - Path to captcha image. Can be url or local path
  • params <Object> optional - Additional params with POST request to help solve captcha more easily. All available parameters can be found here
  • returns <Promise> which resolves to <Object> with id and answer
Here's example with parameters:
const Solver = require('rucaptcha-solver');
  const solver = new Solver({ apiKey: 'some-api-key' });

  solver.solve('', {    
    // captcha consists of two or more words
    phrase: 1,
    // captcha uses only latin characters
    language: 2
  // resolves
  .then(({ id, answer }) => console.log(`captcha answer: ${answer}`))
  // handle error
  .catch(error => console.error(error));