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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@zennolab_com/capmonstercloud-client

v2.9.1

Published

Official JS client library for https://capmonster.cloud/ captcha recognition service

Downloads

13,874

Readme

CapMonster Cloud Node.js SDK: TypeScript CAPTCHA Solver & Anti-Bot API Client


Official JavaScript and TypeScript client library for CapMonster Cloud. Add automated CAPTCHA-solving tasks to Node.js, TypeScript, Puppeteer, Playwright, Cypress, and HTTP-based workflows.

Use the SDK with supported CAPTCHA and anti-bot task types, including reCAPTCHA v2/v3/Enterprise, Cloudflare Turnstile, GeeTest, DataDome, Amazon WAF, Imperva, and image-to-text tasks.

👉 Get your Free API Key & Free Trial Balance on CapMonster Cloud


⚡ Highlights

  • ⚡ Node.js & TypeScript: Typed request models for supported task types.
  • 🧩 Modern CAPTCHA coverage: Work with reCAPTCHA, Turnstile, GeeTest, Amazon WAF, DataDome, Imperva, and more.
  • 🌐 Automation-ready: Use with Playwright, Puppeteer, Cypress, scraping tools, and custom HTTP clients.
  • 🛠️ Dedicated or custom payloads: Use request classes or CommonCaptcha to submit a full task payload.
  • 📖 Official docs: Current task parameters and API methods are maintained in CapMonster Cloud documentation.

📦 Installation

Install the package from npm:

npm install @zennolab_com/capmonstercloud-client

The package published on npm already includes the compiled files and is ready to use after installation.

Build from this repository

Git does not contain the compiled dist output. The examples below import @zennolab_com/capmonstercloud-client, and inside this repository that name points at dist. After cloning, install dependencies and build before running an example or a test:

npm install
npm run build

Run npm run build again after changing the source.


🚀 Quick Start

Create an API key in the CapMonster Cloud Dashboard, install the package, then use one of the examples below.

1. Solve reCAPTCHA v2 (TypeScript)

import {
  CapMonsterCloudClientFactory,
  ClientOptions,
  RecaptchaV2Request,
} from '@zennolab_com/capmonstercloud-client';

const client = CapMonsterCloudClientFactory.Create(
  new ClientOptions({ clientKey: 'YOUR_API_KEY' }),
);

const result = await client.Solve(
  new RecaptchaV2Request({
    websiteURL: 'https://lessons.zennolab.com/captchas/recaptcha/v2_simple.php?level=high',
    websiteKey: '6Lcg7CMUAAAAANphynKgn9YAgA4tQ2KI_iqRyTwd',
  }),
);

console.log(result.solution);

2. Solve Cloudflare Turnstile (TypeScript)

import {
  CapMonsterCloudClientFactory,
  ClientOptions,
  TurnstileRequest,
} from '@zennolab_com/capmonstercloud-client';

const client = CapMonsterCloudClientFactory.Create(
  new ClientOptions({ clientKey: 'YOUR_API_KEY' }),
);

const result = await client.Solve(
  new TurnstileRequest({
    websiteURL: 'https://tsinvisble.zlsupport.com',
    websiteKey: '0x4AAAAAAABUY0VLtOUMAHxE',
  }),
);

console.log(result.solution);

3. CommonJS Example and Balance Check

const {
  CapMonsterCloudClientFactory,
  ClientOptions,
  RecaptchaV2Request,
} = require('@zennolab_com/capmonstercloud-client');

async function run() {
  const client = CapMonsterCloudClientFactory.Create(
    new ClientOptions({ clientKey: 'YOUR_API_KEY' }),
  );

  console.log('Balance:', await client.getBalance());

  const task = new RecaptchaV2Request({
    websiteURL: 'https://lessons.zennolab.com/captchas/recaptcha/v2_simple.php?level=high',
    websiteKey: '6Lcg7CMUAAAAANphynKgn9YAgA4tQ2KI_iqRyTwd',
  });

  const result = await client.Solve(task);
  console.log(result.solution);
}

run().catch(console.error);

4. Submit a Custom Payload with CommonCaptcha

Use CommonCaptcha when you need to provide a complete task payload directly.

const {
  CapMonsterCloudClientFactory,
  ClientOptions,
  CommonCaptcha,
} = require('@zennolab_com/capmonstercloud-client');

async function run() {
  const client = CapMonsterCloudClientFactory.Create(
    new ClientOptions({ clientKey: 'YOUR_API_KEY' }),
  );

  const task = new CommonCaptcha({
    task: {
      type: 'RecaptchaV2Task',
      websiteURL: 'https://lessons.zennolab.com/captchas/recaptcha/v2_simple.php?level=high',
      websiteKey: '6Lcg7CMUAAAAANphynKgn9YAgA4tQ2KI_iqRyTwd',
    },
  });

  console.log(await client.Solve(task));
}

run().catch(console.error);

🛡️ Supported Task Families

Refer to the official Supported CAPTCHA Types for current task parameters, response formats, and examples.

| Task family | Example request classes in this SDK | | :--- | :--- | | reCAPTCHA | RecaptchaV2Request, RecaptchaV2EnterpriseRequest, RecaptchaV3ProxylessRequest | | Cloudflare Turnstile | TurnstileRequest | | GeeTest | GeeTestRequest | | Amazon WAF | AmazonRequest, AmazonProxylessRequest | | Image-to-Text | ImageToTextRequest | | Complex image tasks | ComplexImageRecaptchaRequest, ComplexImageTaskRecognitionRequest | | Custom anti-bot tasks | DataDomeRequest, ImpervaRequest, TenDIRequest, ProsopoRequest, BasiliskRequest |


🌐 Browser Use

The package can also be bundled for browser use. Browser implementations use native fetch, so use a compatible module bundler such as Webpack when integrating it into a frontend build.

Keep API keys private. Do not expose production CapMonster Cloud API keys in public frontend code.


🐛 Debugging

Set the DEBUG environment variable to enable the package logger:

DEBUG=cmc-* node app.js

🛠️ How It Works

[ Node.js Script / Browser Automation ]
                    │
                    ▼
      [ Create task request with target data ]
                    │
                    ▼
[ CapMonster Cloud Node.js SDK ] ──► createTask API request
                    │
                    ▼
       [ SDK waits for the task result ]
                    │
                    ▼
[ Receive token / solution ] ──► Use it in your workflow

⚙️ Best Practices

  • Use the right task model: Choose a request type that matches the target protection; validate all required fields against the official documentation.
  • Keep session context consistent: For tasks that use a proxy, align the proxy settings with the associated browser or scraping session.
  • Use tokens promptly: CAPTCHA tokens can expire, so submit or inject the returned solution immediately.
  • Monitor balance and API responses: See the API methods reference for createTask, getTaskResult, and getBalance.

📚 Documentation & Support

Other official SDKs


📄 License

MIT © ZennoLab / CapMonster Cloud