Official Node.js and TypeScript SDK for automated CAPTCHA solving in web scraping, browser automation, and testing workflows.
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
- ⚡ 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
CommonCaptchato submit a full task payload. - 📖 Official docs: Current task parameters and API methods are maintained in CapMonster Cloud documentation.
Install the package from npm:
npm install @zennolab_com/capmonstercloud-clientThe package published on npm already includes the compiled files and is ready to use after installation.
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 buildRun npm run build again after changing the source.
Create an API key in the CapMonster Cloud Dashboard, install the package, then use one of the examples below.
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);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);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);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);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 |
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.
Set the DEBUG environment variable to enable the package logger:
DEBUG=cmc-* node app.js[ 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
- 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, andgetBalance.
- 📖 Getting Started
- 🧩 Supported CAPTCHA Types
- ⚙️ API Methods: createTask, getTaskResult, getBalance
- 🌐 Browser Extension Guides
- 💬 CapMonster Cloud