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-clientCreate 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 |
| Image-to-Text | ImageToTextRequest |
| Complex image tasks | ComplexImageRecaptchaRequest, ComplexImageTaskRecognitionRequest |
| Custom anti-bot tasks | DataDomeRequest, ImpervaRequest, TSPDRequest, and other supported custom-task classes |
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
If this SDK helps your automation or testing workflow, please consider giving the repository a star.
MIT Β© ZennoLab / CapMonster Cloud