# 2captcha-node

> A NodeJS wrapper to solve image captchas with 2captcha

Latest version **2.2.1** (published 2020-11-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install 2captcha-node
pnpm add 2captcha-node
yarn add 2captcha-node
bun add 2captcha-node
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.2.1 |
| Published | 2020-11-01 |
| First published | 2019-04-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 221.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 16 |
| Author | Pedro Filho |
| Maintainers | pedroapfilho |
| Keywords | 2captcha, captcha, wrapper, solve |

## Links

- npm: https://www.npmjs.com/package/2captcha-node
- Repository: https://github.com/pedroapfilho/2captcha-node
- Homepage: https://github.com/pedroapfilho/2captcha-node#readme
- Issues: https://github.com/pedroapfilho/2captcha-node/issues
- npm.io page: https://npm.io/package/2captcha-node

## Dependencies (1)

- [node-fetch](https://npm.io/package/node-fetch.md) ^2.6.1

## Alternatives

- [base64url](https://npm.io/package/base64url.md) — 6.1M weekly downloads
- [get-installed-path](https://npm.io/package/get-installed-path.md) — 502.9K weekly downloads
- [@uppy/url](https://npm.io/package/@uppy/url.md) — 185.8K weekly downloads
- [@d3fc/d3fc-shape](https://npm.io/package/@d3fc/d3fc-shape.md) — 16.2K weekly downloads
- [localizer](https://npm.io/package/localizer.md) — 226 weekly downloads

## Recent versions

- 2.2.1 (latest) — 2020-11-01
- 2.2.0 — 2020-10-01
- 2.1.2 — 2020-09-01
- 2.1.1 — 2020-08-22
- 2.1.0 — 2020-08-10
- 2.0.6 — 2020-08-03
- 2.0.5 — 2020-07-17
- 2.0.4 — 2020-04-07
- 2.0.3 — 2020-03-01
- 2.0.2 — 2020-03-01
- 2.0.1 — 2020-03-01
- 2.0.0 — 2020-03-01
- 1.4.1 — 2020-02-09
- 1.4.0 — 2020-02-09
- 1.3.6 — 2020-01-28
- … 30 more at https://npm.io/package/2captcha-node/versions

## README

<h1 align="center">Welcome to 2captcha-node 👋</h1>

<p align="center">
  <a href="https://www.npmjs.com/package/2captcha-node"><img alt="NPM version" src="https://img.shields.io/npm/v/2captcha-node"></a>
  <a href="https://bundlephobia.com/result?p=2captcha-node"><img alt="Bundle size" src="https://img.shields.io/bundlephobia/minzip/2captcha-node"></a>
  <img alt="MIT" src="https://img.shields.io/github/license/pedroapfilho/2captcha-node">
</p>

> A NodeJS wrapper to solve image captchas with 2captcha

## Prerequisites:

You will need a `2Captcha API key`

## Install

```sh
npm install 2captcha-node

or

yarn add 2captcha-node
```

## Usage

Set up your api key:

```js
import captchaSolver from '2captcha-node';

const captcha = captchaSolver('your-api-key');
```

It'll return an object with the `solve` function, and you'll be able to use it inside of your script

```js
const options = {
  image: 'base64-image',
  maxAttempts: 60, // Optional
};

const { id, text } = await captcha.solve(options);
```

And this solvedCaptcha will return object, with captcha id and captcha text

You can use the `balance` function too, to see your balance at 2Captcha

```js
const balance = await captcha.balance();
```

You can use the Report Captcha is valid or not.

```js
await captcha.report(id, isValid);
```

## Author

👤 **Pedro Filho <pedro@filho.me>**

- Twitter: [@pedrofilhome](https://twitter.com/pedrofilhome)
- Github: [@pedroapfilho](https://github.com/pedroapfilho)

## 🤝 Contributing

Contributions, issues and feature requests are welcome!<br />Feel free to check [issues page](https://github.com/pedroapfilho/2captcha-node/issues).

## Show your support

Give a ⭐️ if this project helped you!

<a href="https://www.buymeacoffee.com/khcUAVF" target="_blank"><img src="https://bmc-cdn.nyc3.digitaloceanspaces.com/BMC-button-images/custom_images/orange_img.png" alt="Buy Me A Coffee" style="height: auto !important;width: auto !important;" ></a>

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