The official Node.js and TypeScript SDK for CapMonster Cloud β the fastest AI-powered CAPTCHA solver and anti-bot bypass API.
Easily integrate automated CAPTCHA solving capabilities into your JavaScript/TypeScript web scraping, automation, and testing scripts. Fully compatible with Puppeteer, Playwright, Cypress, and raw HTTP requests.
π Get your Free API Key and Start Bypassing CAPTCHAs
Install the client library via NPM
npm i @zennolab_com/capmonstercloud-client- Get your API key in the CapMonster Cloud Dashboard
- Install the package.
- Copy the snippet below, replace
YOUR_API_KEY, and run your scraper.
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); // { gRecaptchaResponse: '...' }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); // { token: '...' }If you are using standard CommonJS (require) without TypeScript:
const { CapMonsterCloudClientFactory, ClientOptions, RecaptchaV2Request } = require('@zennolab_com/capmonstercloud-client');
async function run() {
const cmcClient = CapMonsterCloudClientFactory.Create(new ClientOptions({ clientKey: '<your capmonster.cloud API key>' }));
// Check your balance
console.log(await cmcClient.getBalance());
const recaptchaV2Request = new RecaptchaV2Request({
websiteURL: 'https://lessons.zennolab.com/captchas/recaptcha/v2_simple.php?level=high',
websiteKey: '6Lcg7CMUAAAAANphynKgn9YAgA4tQ2KI_iqRyTwd',
});
console.log(await cmcClient.Solve(recaptchaV2Request));
}
run()
.then(() => {
console.log('DONE');
process.exit(0);
})
.catch((err) => {
console.error('Error solving CAPTCHA:', err);
process.exit(1);
});Use CommonCaptcha when you want to pass a full task payload directly (for example, when a new CAPTCHA type is released and not yet covered by a dedicated request class).
const { CapMonsterCloudClientFactory, ClientOptions, CommonCaptcha } = require('@zennolab_com/capmonstercloud-client');
async function run() {
const cmcClient = CapMonsterCloudClientFactory.Create(new ClientOptions({ clientKey: '<your capmonster.cloud API key>' }));
const commonCaptcha = new CommonCaptcha({
task: {
type: 'RecaptchaV2Task',
websiteURL: 'https://lessons.zennolab.com/captchas/recaptcha/v2_simple.php?level=high',
websiteKey: '6Lcg7CMUAAAAANphynKgn9YAgA4tQ2KI_iqRyTwd',
},
});
console.log(await cmcClient.Solve(commonCaptcha));
}
run();Browser implementations use native fetch instead of Node's http(s). For browser usage, you need a module bundler like Webpack.
import { CapMonsterCloudClientFactory, ClientOptions, RecaptchaV2Request } from '@zennolab_com/capmonstercloud-client';
document.addEventListener('DOMContentLoaded', async () => {
const cmcClient = CapMonsterCloudClientFactory.Create(new ClientOptions({ clientKey: '<your capmonster.cloud API key>' }));
console.log(await cmcClient.getBalance());
const recaptchaV2Request = new RecaptchaV2Request({
websiteURL: 'https://lessons.zennolab.com/captchas/recaptcha/v2_simple.php?level=high',
websiteKey: '6Lcg7CMUAAAAANphynKgn9YAgA4tQ2KI_iqRyTwd',
proxy: {
proxyType: 'http',
proxyAddress: '8.8.8.8',
proxyPort: 8080,
proxyLogin: 'proxyLoginHere',
proxyPassword: 'proxyPasswordHere',
},
// check actual user agent here: https://capmonster.cloud/api/useragent/actual
userAgent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36',
});
console.log(await cmcClient.Solve(recaptchaV2Request));
});For debugging, set the DEBUG environmental variable to one of the possible values (see the debug module).
DEBUG=cmc-* node app.js- AmazonRequest
- BinanceRequest
- FunCaptchaRequest
- GeeTestRequest
- ImageToTextRequest
- MTCaptchaRequest
- ProsopoRequest
- RecaptchaV2Request
- RecaptchaV2EnterpriseRequest
- RecaptchaV3ProxylessRequest
- TurnstileRequest - Cloudflare Turnstile
- TurnstileRequest - Cloudflare Challenge
- TurnstileRequest - Cloudflare Waiting Room
- YidunRequest
- AlibabaRequest
- AltchaRequest
- BasiliskRequest
- DataDomeRequest
- FriendlyRequest
- HuntRequest
- ImpervaRequest
- TenDIRequest
- TSPDRequest