# capsolver-npm

> manage to solve captcha challenges with node

Latest version **2.1.11** (published 2026-04-28) · 0 weekly downloads

## Install

```sh
npm install capsolver-npm
pnpm add capsolver-npm
yarn add capsolver-npm
bun add capsolver-npm
```

## Health

**Score 50/100 (C)** — status: stable.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

## Facts

| | |
|---|---|
| Version | 2.1.11 |
| Published | 2026-04-28 |
| First published | 2022-11-18 |
| Weekly downloads | 0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 306.3 KB |
| Known vulnerabilities | 0 (+24 in 1 direct dependencies) |
| Install scripts | no |
| Maintainers | rmtanto |

## Links

- npm: https://www.npmjs.com/package/capsolver-npm
- npm.io page: https://npm.io/package/capsolver-npm

## Dependencies (2)

- [axios](https://npm.io/package/axios.md) ^0.27.2
- [dotenv](https://npm.io/package/dotenv.md) ^16.4.5

## Recent versions

- 2.1.11 (latest) — 2026-04-28
- 2.1.10 — 2025-05-31
- 2.1.9 — 2025-02-10
- 2.1.8 — 2025-02-10
- 2.1.7 — 2025-02-10
- 2.1.6 — 2025-02-10
- 2.1.5 — 2025-02-08
- 2.1.4 — 2025-02-08
- 2.1.3 — 2025-02-08
- 2.1.2 — 2025-02-08
- 2.1.1 — 2025-02-07
- 2.0.2 — 2024-07-27
- 2.0.1 — 2024-07-27
- 2.0.0 — 2024-07-27
- 1.0.9 — 2023-04-14
- … 9 more at https://npm.io/package/capsolver-npm/versions

## README

# capsolver-npm

manage to solve captcha challenges with node

- ❗ API key it's **required** [**Get here**](https://dashboard.capsolver.com/passport/register?inviteCode=CHhA_5os)

[![npm version](https://img.shields.io/npm/v/capsolver-npm)](https://www.npmjs.com/package/capsolver-npm)
[![](https://img.shields.io/badge/documentation-docs.capsolver.com-darkgreen)](https://docs.capsolver.com/guide/getting-started.html)

## Install

`npm i capsolver-npm`

## Usage

- 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<void> => {
  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`

## 📁 Updated examples

**Figure out [here](https://www.npmjs.com/package/capsolver-npm?activeTab=code).**

## 🔨 Supported Methods

- Consider `null` as an optional parameter.
- Refer to the official documentation for more details.

[**_Solving AwsWaf with Classification ..._**](https://docs.capsolver.com/en/guide/recognition/AwsWafClassification/) | [**_Solving AwsWaf ..._**](https://docs.capsolver.com/en/guide/captcha/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,
});
```

[**_Solving DataDome ..._**](https://docs.capsolver.com/en/guide/captcha/datadome/)

```javascript
await solver.datadome({
  proxy,
  websiteURL,
  captchaUrl,
  userAgent,
});
```

[**_Solving FriendlyCaptcha ..._**](https://docs.capsolver.com/en/guide/captcha/FriendlyCaptcha/)

```javascript
await solver.friendlycaptchaproxyless({
  websiteURL,
  websiteKey,
});
```

[**_Solving GeeTest ..._**](https://docs.capsolver.com/en/guide/captcha/Geetest/)

```javascript
await solver.geetest({
  proxy,
  websiteURL,
  gt,
  challenge,
  captchaId: null,
  geetestApiServerSubdomain: null,
});

await solver.geetestproxyless({
  websiteURL,
  gt,
  challenge,
  captchaId: null,
  geetestApiServerSubdomain: null,
});
```

[**_Solving ImageToText ..._**](https://docs.capsolver.com/guide/recognition/ImageToTextTask.html)

```javascript
await solver.image2text({
  body,
  module: null,
  score: null,
});
```

[**_Solving Imperva ..._**](https://docs.capsolver.com/guide/antibots/datadome.html)

```javascript
await solver.imperva({
  websiteURL,
  reeseScriptURL,
});
```

[**_Solving MTCaptcha ..._**](https://docs.capsolver.com/guide/captcha/MtCaptcha.html)

```javascript
await solver.mtcaptcha({
  proxy,
  websiteURL,
  websiteKey,
});
```

[**_Solving ReCaptchaV2 with Classification ..._**](https://docs.capsolver.com/en/guide/recognition/ReCaptchaClassification/) | [**_Solving ReCaptchaV2 / Enterprise ..._**](https://docs.capsolver.com/en/guide/captcha/ReCaptchaV2/)

```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 ..._**](https://docs.capsolver.com/guide/captcha/ReCaptchaV3.html)

```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,
});
```

[**_Solving Turnstile ..._**](https://docs.capsolver.com/en/guide/captcha/cloudflare_turnstile/)

```javascript
await solver.turnstileproxyless({
  websiteURL,
  websiteKey,
  metadata: null,
});
```

[**_Solving VisionEngine ..._**](https://docs.capsolver.com/en/guide/recognition/VisionEngine/)

```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.

---
_Source: https://npm.io/package/capsolver-npm · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
