# nocaptchasolver

> Solve HCaptcha Challenges With The Power of NoCaptcha's AI Recognition!

Latest version **3.0.0** (published 2023-03-01) · ISC license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install nocaptchasolver
pnpm add nocaptchasolver
yarn add nocaptchasolver
bun add nocaptchasolver
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 3.0.0 |
| Published | 2023-03-01 |
| First published | 2022-09-18 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 26.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 18 |
| Author | Hammad |
| Maintainers | hammad70-1 |
| Keywords | Hcaptcha, captcha, captcha-solver, anti-captcha |

## Links

- npm: https://www.npmjs.com/package/nocaptchasolver
- Repository: https://github.com/Hammad69275/NoCaptchaSolver
- Homepage: https://github.com/Hammad69275/NoCaptchaSolver#readme
- Issues: https://github.com/Hammad69275/NoCaptchaSolver/issues
- npm.io page: https://npm.io/package/nocaptchasolver

## Dependencies (3)

- [node-fetch](https://npm.io/package/node-fetch.md) ^2.6.7
- [sync-fetch](https://npm.io/package/sync-fetch.md) ^0.4.1
- [selenium-webdriver](https://npm.io/package/selenium-webdriver.md) ^4.4.0

## Recent versions

- 3.0.0 (latest) — 2023-03-01
- 2.3.0 — 2023-02-28
- 2.2.1 — 2023-01-12
- 2.1.7 — 2022-10-18
- 2.1.6 — 2022-10-18
- 2.1.5 — 2022-09-25
- 2.1.4 — 2022-09-25
- 2.1.3 — 2022-09-25
- 2.1.2 — 2022-09-19
- 2.1.1 — 2022-09-19
- 2.0.0 — 2022-09-19
- 1.0.2 — 2022-09-19
- 1.0.1 — 2022-09-18
- 1.0.0 — 2022-09-18

## README

<h1 align="center"> 🤖 NoCaptchaSolver </h1>
<h3 align="center"> Solve HCaptcha Challenges With The Power Of NoCaptchaAI! </h3>

- Faster Than Most Of The Captcha Solving APIs
- Cheaper Than Most Of The Other APIs
- Fully Maintained

<h2>Installation</h2>

```npm install nocaptchasolver```

<h2>Usage</h2>

<h3>Instantiating The Wrapper</h3>

```js
const {HCaptchaSolver} = require("nocaptchasolver")

const config = {
    apiKey,
    userAgent,
    siteKey,
    siteURL,
    enableLogger,
    loggerFunction,
    delay // in milliseconds (default is 7000ms)
}

const Solver = new HCaptchaSolver(config)

```

<h3>Solving Captcha</h3>
<p>After Instantiating The Wrapper, You Can Start Solving Captchas By Calling The solve() Method</p>

```js
await Solver.solve() // { status:1,key:P0_eyadwa... }
```

<h3>Invisible Captcha</h3>
<p>For Solving Invisible Captchas Like The Ones On Discord DMs, Pass In The rqdata Parameter</p>

```js
await Solver.solve(rqdata) // { status:1,key:P0.eadaea... }
```

<h3>Other Properties</h3>
<p>You Can Check Your NoCaptcha Account Balance With The remainingSolves Property</p>

```js
console.log(Solver.remainingSolves)
// 81
```

<p>You Can Also Check Your Account Limit With The solveLimit Property</p>

```js
console.log(Solver.solveLimit)
// 100
```
<h2>Logger</h2>

The Wrapper Has A Default Logger That You Can Enable By Passing The ENABLE_LOGGING Parameter As true
Moreover You Can Also Use Your Own Logger Function By Passing That Function As LOGGER_FUNCTION Parameter

Following Code Examples Demonstrate Their Working

<h3>Default Logger</h3>
<h4>Code</h4>

```js
const {HCaptchaSolver} = require("nocaptchasolver")


const config = {
    apiKey:"free-api-b0ec566e....",
    userAgent:"(Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.5060.134 Safari/537.36",
    siteKey:"a9b5fb07-92ff-493f-86fe-352a2803b3df",
    siteURL:"discord.com",
    enableLogger:true,
    delay:2000
}


const solver = new HCaptchaSolver(config)

async function main(){
    let token = await solver.solve()
}
main()
```

<h4>Output</h4>

![Image](https://media.discordapp.net/attachments/1009809854157832286/1021407152461598730/image1.png?width=502&height=177)

<h3>Custom Logger With Terminal Kit</h3>
<h4>Code</h4>

```js
const {HCaptchaSolver} = require("nocaptchasolver")
const Terminal = require("terminal-kit").terminal

const logger = (type,message) => {
    Terminal(`[ ${type == "DONE" ? `^g${type + ` `.repeat("PROCESSING".length - type.length)}^` : `^r${type}^` } ] ${message}\n`)
}

const config = {
    ...config,
    loggerFunction:logger
}

const solver = new HCaptchaSolver(config)

async function main(){
    let token = await solver.solve()
}
main()
```

<h4>Output</h4>

![Image](https://media.discordapp.net/attachments/1009809854157832286/1021407152901996604/image2.png?width=556&height=169)

<h2>Examples</h2>

```js
const {HCaptchaSolver} = require("nocaptchasolver")

const Solver = new HCaptchaSolver(config)

async function main()
{ 
   if(Solver.remainingSolves === 0) return
   let solvedCaptcha = await Solver.solve()
   console.log(solvedCaptcha)
}

main() // { status:1,key:"F0_ey......" }
```

<h2>API</h2>

Register on https://nocaptchaai.com/register and join their server to get the API Key

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