Capsolver NodeJS captcha client - use CapSolver with ease
Docs: https://docs.capsolver.com
Installation
npm i @captcha-libs/capsolver
Usage
import { CapSolver, ReCaptchaV3EnterpriseTaskProxyLess } from "@captcha-libs/capsolver";
const capsolverClient = new CapSolver({
clientKey: "<YOUR_CLIENT_KEY>",
pollingInterval: 5000, // optional, default: 5000ms
timeout: 120_000 // optional, default: 120000ms
});
const reCaptchaV3Request = new ReCaptchaV3EnterpriseTaskProxyLess({
websiteKey: "6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-",
websiteURL: "https://www.google.com/recaptcha/api2/demo"
});
const reCaptchaV3Solution = await capsolverClient.solve(reCaptchaV3Request);
const {
solution, errorId, errorCode, errorDescription, status
} = reCaptchaV3Solution;
const { gRecaptchaResponse, userAgent, expireTime } = solution;
const feedback = await capsolverClient.feedbackTask({
taskId,
invalid: false,
message: "success",
code: 1,
});
const balance = await capsolverClient.getBalance();
Features
- Supports all captcha types, solutions, and methods from CapSolver docs (updated Feb 2025)
- TypeScript-first design
- Automatically waits for solution
- Fully tested task payloads
Currently supported task payloads
Classification
- ImageToTextTask
- ReCaptchaClassification
- AwsWafClassification
- VisionEngine
DEPRECATEDHCaptchaClassificationDEPRECATEDFunCaptchaClassification
Token
- ReCaptchaV2Task | ReCaptchaV2EnterpriseTask | ReCaptchaV2TaskProxyLess | ReCaptchaV2EnterpriseTaskProxyLess
- ReCaptchaV3Task | ReCaptchaV3EnterpriseTask | ReCaptchaV3TaskProxyLess | ReCaptchaV3EnterpriseTaskProxyLess
- DatadomeSliderTask
- AntiAwsWafTask | AntiAwsWafTaskProxyLess
- AntiCloudflareTurnstileTask
DEPRECATEDHCaptchaTask | HCaptchaTaskProxyLessDEPRECATEDFunCaptchaTaskProxyLessDEPRECATEDGeeTestTask | GeeTestTaskProxyLessDEPRECATEDAntiCyberSiAraTask | AntiCyberSiAraTaskProxyLessDEPRECATEDAntiImpervaTask | AntiImpervaTaskProxyLessDEPRECATEDAntiCloudflareChallengeTaskDEPRECATEDAntiAkamaiBMPTaskDEPRECATEDAntiAkamaiWebTask
DEPRECATED = Task type removed from service support, but you can still try to send the task.