npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

anti-captcha-pingback

v0.1.5

Published

This package is for using the anti-captcha service. With a focus on pingbacks or callbacks from their servers.

Readme

Intro

This package is for use with Anti-Captcha.

This package aims to get you setup with an Anti-Captcha pingback server solution with just a few lines of code.

This package uses a pingback (callback url) rather than constantly asking anti-captcha's servers if they are ready yet. This will save bandwidth and computational resources for both you and Anti-Captcha.

Anti-Captcha will send a request to your pingback port when they have the solution to your captcha.

Prerequisites

  1. an Anti-Captcha account and api key
  2. port 8080 or other specified port open on your server or forwarded to your computer
    1. The open port is needed to get the pingback/callback from anti-captcha's servers

Getting Started

First add the package to your project using npm

npm i anti-captcha-pingback

Next replace <Your API Key Here> in the following code with your api key from Anti-Captcha

const ac = require("anti-captcha-pingback")
const anti_captcha = new ac.AntiCaptchaPingback("<Your API Key Here>");

async function main() {
    let result = await anti_captcha.solve_image_captcha("./captcha.png")
    console.log(result);
    await anti_captcha.close(); //close when done
}

main();

The result object will look like below if everything worked

if Anti-Captcha responds with an error the promise will reject

Output

{
  "rawResponseObject": {
    "taskId": 0,
    "errorId": 0,
    "status": "ready",
    "solution": {
      "text": "PRNU",
      "url": ""
    },
    "cost": "0.00070",
    "ip": "",
    "createTime": 0,
    "endTime": 0,
    "solveCount": 0
  },
  "solution": "PRNU"
}

Getting The Solution

While we provide the "rawResponseObject" from Anti-Captcha, we have normalized the solution of most of our solve functions to be able to jump right to the solution using the code below. This is the method we recommend using to solve your captchas.

GeeTestTask has 3 different solutions

const ac = require("anti-captcha-pingback")
const anti_captcha = new ac.AntiCaptchaPingback("<Your API Key Here>");

async function main() {
    let result = await anti_captcha.solve_image_captcha("./captcha.png")
    console.log(result.solution);
    await anti_captcha.close(); //close when done
}

main();

output

"PRNU"

Port

you can set the port to any number you want to use

const ac = require("anti-captcha-pingback")
const anti_captcha = new ac.AntiCaptchaPingback("<Your API Key Here>", 8085); //use port 8085 instead of 8080

async function main() {
    let result = await anti_captcha.solve_image_captcha("./captcha.png")
    console.log(result.solution);
    await anti_captcha.close(); //close when done
}

main();

IP

This package will get your public ip automatically on launch, but if you already know the ip of your server you can specifiy it as the 3rd parameter when creating the AntiCaptchaPingback object.

replace ip here with the ip you want the pingback to be sent to, this request needs to end up comming back to the pingback server of this package or it will not work however.

const ac = require("anti-captcha-pingback")
const anti_captcha = new ac.AntiCaptchaPingback("<Your API Key Here>", 8080, "ip here"); //set ip

async function main() {
    let result = await anti_captcha.solve_image_captcha("./captcha.png")
    console.log(result.solution);
    await anti_captcha.close(); //close when done
}

main();

RecaptchaV2 example

const ac = require("anti-captcha-pingback")
const anti_captcha = new ac.AntiCaptchaPingback("<Your API Key Here>")

async function main() {
    let result = await anti_captcha.solve_recaptchaV2("https://anti-captcha.com/tutorials/v2-textarea", "6LfydQgUAAAAAMuh1gRreQdKjAop7eGmi6TrNIzp")
    console.log(result.solution);
    await anti_captcha.close(); //close when done
}

main();

output

03AGdBq25WOtiVaKZA26E1Gw224aC4bcOHfSNt_m...

Base64 captcha

let result = await anti_captcha.solve_base64_captcha("base64 here")

RecaptchaV2

let result = await anti_captcha.solve_recaptchaV2("site url here", "sitekey here")

RecaptchaV2Enterprise

let result = await anti_captcha.solve_recaptchaV2Enterprise("site url here", "sitekey here")

RecaptchaV3

let result = await anti_captcha.solve_recaptchaV3("url", "key", minScore)

HCaptcha

let result = await anti_captcha.solve_hcaptcha("url", "key", "userAgent")

FunCaptcha

let result = await anti_captcha.solve_funCaptcha("url", "key")

GeeTestCaptchaV3

let result = await anti_captcha.solve_geeTestTaskV3("url", "gt", "challenge")

GeeTestCaptchaV4

let result = await anti_captcha.solve_geeTestTaskV4("url", "gt")

Extra Options

if you need to pass any extra options, you can pass an options object as an optional parameter to the solve_ functions.

let result = await anti_captcha.solve_image_captcha("./captcha.png", {case: false, math: true})

Get Balance

let balance = await anti_captcha.get_balance();
console.log(balance); // 12.3456

Get taskId before solution is ready

let result = undefined;
let taskId = new Promise((resolve, reject) => {
    result = anti_captcha.solve_base64_captcha("base64 here", {}, resolve)
})
taskId = await taskId;
console.log(taskId); //123456789
result = await result;

Future

May or maynot add these features in the future, just some ideas

  1. better way of getting back taskId
  2. error handling, right now you need to handle any thrown errors
  3. non pingback only
  4. api limiting, right now you need to handle any api limit errors
  5. proxy support, only supports proxyless currently