manage to solve captcha challenges with node
npm install capsolver-npmmanage to solve captcha challenges with node
- ❗ API key it's required Get here


npm i capsolver-npm
- Initialize and use Solver and SolverError
- TS example:
``typescript
import { Solver, SolverError } from 'capsolver-npm';
const solver = new Solver({
apiKey: 'CAP-XXXXXX ...',
});
const main = async (): Promise
await solver
.turnstileproxyless({
websiteURL: 'https://peet.ws/turnstile-test/non-interactive.html',
websiteKey: '...',
metadata: { action: 'login', cdata: 'xxxx-xxxx-xxxx-xxxx-example-cdata' },
})
.then((s: any) => {
console.log(s);
})
.catch((e: SolverError) => {
console.error(${e.errorTaskId} - ${e.errorCode} - ${e.errorDescription});
});
};
main();
`
- Debug custom implementation parameters to send.
- When provide proxy is required, match the following pattern: ip:port:user:pass
Figure out here.
- Consider null as an optional parameter.
- Refer to the official documentation for more details.
_Solving AwsWaf with Classification ..._ | _Solving AwsWaf ..._
`javascript
await solver.awswafclassification({
websiteURL: null,
images,
question,
});
await solver.awswaf({
proxy,
websiteURL,
awsKey: null,
awsIv: null,
awsContext: null,
awsChallengeJS: null,
});
await solver.awswafproxyless({
websiteURL,
awsKey: null,
awsIv: null,
awsContext: null,
awsChallengeJS: null,
});
`
`javascript`
await solver.datadome({
proxy,
websiteURL,
captchaUrl,
userAgent,
});
`javascript`
await solver.friendlycaptchaproxyless({
websiteURL,
websiteKey,
});
`javascript
await solver.geetest({
proxy,
websiteURL,
gt,
challenge,
captchaId: null,
geetestApiServerSubdomain: null,
});
await solver.geetestproxyless({
websiteURL,
gt,
challenge,
captchaId: null,
geetestApiServerSubdomain: null,
});
`
`javascript`
await solver.image2text({
body,
module: null,
score: null,
});
`javascript`
await solver.imperva({
websiteURL,
reeseScriptURL,
});
`javascript`
await solver.mtcaptcha({
proxy,
websiteURL,
websiteKey,
});
_Solving ReCaptchaV2 with Classification ..._ | _Solving ReCaptchaV2 / Enterprise ..._
`javascript
await solver.recaptchav2classification({
websiteURL: null,
question,
image,
});
await solver.recaptchav2({
proxy,
websiteURL,
websiteKey,
userAgent: null,
isInvisible: null,
pageAction: null,
enterprisePayload: null,
apiDomain: null,
cookies: null,
});
await solver.recaptchav2proxyless({
websiteURL,
websiteKey,
userAgent: null,
isInvisible: null,
pageAction: null,
enterprisePayload: null,
apiDomain: null,
cookies: null,
});
await solver.recaptchav2enterprise({
proxy,
websiteURL,
websiteKey,
userAgent: null,
enterprisePayload: null,
apiDomain: null,
cookies: null,
});
await solver.recaptchav2enterpriseproxyless({
websiteURL,
websiteKey,
userAgent: null,
enterprisePayload: null,
apiDomain: null,
cookies: null,
});
`
_Solving ReCaptchaV3 / Enterprise ..._
`javascript
await solver.recaptchav3({
proxy,
websiteURL,
websiteKey,
pageAction,
enterprisePayload: null,
apiDomain: null,
cookies: null,
});
await solver.recaptchav3proxyless({
websiteURL,
websiteKey,
pageAction,
enterprisePayload: null,
apiDomain: null,
cookies: null,
});
await solver.recaptchav3enterprise({
proxy,
websiteURL,
websiteKey,
pageAction,
enterprisePayload: null,
apiDomain: null,
cookies: null,
});
await solver.recaptchav3enterpriseproxyless({
websiteURL,
websiteKey,
pageAction,
enterprisePayload: null,
apiDomain: null,
cookies: null,
});
`
`javascript`
await solver.turnstileproxyless({
websiteURL,
websiteKey,
metadata: null,
});
`javascript``
await solver.visionengine({
websiteURL: null,
module,
image,
imageBackground,
question: null,
});
#### Big Disclaimer
By using this package, you acknowledge and agree that:
- You are solely responsible for how you use the API and the author does not assume any liability for misuse, abuse, or violations of Capsolver’s terms of service.
- This package provides a service connector for the Capsolver API and is not affiliated.