Catalog npm
Back to packageRELEASE DETAILS

2.2.1

npm

2captcha-node

A NodeJS wrapper to solve image captchas with 2captcha

2captchacaptchasolvewrapper
Published1 Nov 2020
Direct dependencies6
Transitive dependenciesNot calculated

README

Current package documentation

Welcome to 2captcha-node 👋

NPM version Bundle size MIT

A NodeJS wrapper to solve image captchas with 2captcha

Prerequisites:

You will need a 2Captcha API key

Install

npm install 2captcha-node

or

yarn add 2captcha-node

Usage

Set up your api key:

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

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

const balance = await captcha.balance();

You can use the Report Captcha is valid or not.

await captcha.report(id, isValid);

Author

👤 Pedro Filho pedro@filho.me

🤝 Contributing

Contributions, issues and feature requests are welcome!
Feel free to check issues page.

Show your support

Give a ⭐️ if this project helped you!

Buy Me A Coffee

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 6

Native requirements
6 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
node-fetch
Environment
{
  "local_name": "node-fetch",
  "alias": false,
  "peer_metadata": null
}
^2.6.1runtime
@types/node-fetch
Environment
{
  "local_name": "@types/node-fetch",
  "alias": false,
  "peer_metadata": null
}
^2.5.7development
husky
Environment
{
  "local_name": "husky",
  "alias": false,
  "peer_metadata": null
}
^4.3.0development
tsdx
Environment
{
  "local_name": "tsdx",
  "alias": false,
  "peer_metadata": null
}
^0.14.1development
tslib
Environment
{
  "local_name": "tslib",
  "alias": false,
  "peer_metadata": null
}
^2.0.3development
typescript
Environment
{
  "local_name": "typescript",
  "alias": false,
  "peer_metadata": null
}
^4.0.5development

Distribution files

1 collected
Distribution 1

Source distribution

Source file
Checksums from source
{
  "shasum": "821d845ad410181668afbf968815a0b838fd6d21",
  "integrity": "sha512-wv9k4WYGIYgxlniqaSlCEZ92F2mEifN9dEgXoda2/iQEMAhN4q4IWsWY0DZ/OfkKxxEuZtAp8vNvCxs/c6RGeA==",
  "tarball": "https://registry.npmjs.org/2captcha-node/-/2captcha-node-2.2.1.tgz",
  "fileCount": 15,
  "unpackedSize": 226555,
  "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfn0JXCRA9TVsSAnZWagAA5d8P+wU5aGC9JzxgfrQFqmzS\nnYxhnTa23tzYiKBOtq5jP5QjURFO7n1PVbWlmGge72TGoJrljzHEp3FbCoh1\nstlOudWjFS/yk4IHNiIFUaT9hoseke8uiOsvASfg+0cKCXth4MSor7vc7BCq\ndi4B6tpQ3fffiUU4+nAQil5cYx4dN4e7uxMb7D46mgSZOPPm7sOI/7EaFDp4\nXLdbusiu2VyA3TX0Pxcq42GC6jOv6eyufWLPTY8SvKo34CO43pQoTtRTgW5S\nGAhV3oo7sLbWXHHALj8UNoQvSCwl7g2ivP71p1b9TXTcMMdeZxrCas8B60Ik\nv7qj9f4EaCTj/519p0Jo9j6ayNdG6EUTL7EI38rxUcXlXsvGYzeJFuvukTtF\nYR5qx/ilOa/YOm8lwMn3ZOihzEVzjSY4CUG8I1IM78lOyOkQrSjQIxF4Af1u\na4HAytbdz3FhEaLhBgHlQX8QrLCUGaeL+3YQ0d8MhosWm0Iyru7v06z9+24/\nJCDdUNDERSjIT/UanAbFT/CvUk0uB+j7b0PzZuhiOmFQV+0BVrRuSb7b6GGZ\nXyuT4NeE6tvgE4YjZVX6jLrKAumSbOBDR487s19xzGwxpX7tdQ7Ic+3S8W37\nSlVESwajZ/IDO/BC+QtcZExRgSwyLOsrTqAyCP3MKVng1q195ebO30Nvc2Mb\nnZro\r\n=bx9U\r\n-----END PGP SIGNATURE-----\r\n",
  "signatures": [
    {
      "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
      "sig": "MEUCIAk2mDgmXOFcIMLg5VZ8n6lLdG12szvTvBKuZiRvc54pAiEA8p8vrCYmKAxUC8reqnPEV1iURg6S/PLG++KS6meAj9g="
    }
  ]
}

Repository

PENDING
pedroapfilho/2captcha-node

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 19:09 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:f12844ce4c8e10d64ea9655df80704647e496c48c1eac3610e17a1452af2fbe3

Other collected versions

2.2.01 Oct2.1.21 Sept2.1.122 Aug2.1.010 Aug2.0.63 Aug2.0.517 JulView all collected versions →