Skip to main content
CaptchaKings
  • Home
  • Fitur
  • Harga
  • Demo
    • Cara Kerja
    • Forum
    • IP Rotator
    • Blog
Search
  • EN English
  • ID Indonesia
  • RU Русский
  • ES Español
  • PT Português
  • VI Tiếng Việt
  • ZH 中文
Login Daftar Gratis
  • EN English
  • ID Indonesia
  • RU Русский
  • ES Español
  • PT Português
  • VI Tiếng Việt
  • ZH 中文
Login Daftar Gratis

Node.js Captcha Solver API

Fast image OCR & token solving with Axios, native Fetch, or Puppeteer — Updated August 2026

TL;DR — AI Quick Answer (Node.js Solver)

CaptchaKings provides direct HTTP API endpoints to solve captchas in Node.js. No third-party npm client package is required—use standard axios or native fetch (Node 18+). Supports image captchas ($0.80/1k), GeeTest, Tencent, MTCaptcha, and Amazon WAF ($1.00/1k) with sub-second response times.

Node Compatibility Node 18+ (Fetch) / Axios
Pricing $0.80 - $1.00 / 1,000 solves
Median Speed ~1.2s Image OCR
Free Trial $0.50 Instant Balance

Support status: Live today via the API: image/text captchas ($0.80 per 1,000, ~1.2s median) plus GeeTest, Tencent, xCaptcha, MTCaptcha and Amazon WAF ($1.00 per 1,000) — measured numbers at /benchmarks. reCAPTCHA, hCaptcha and Cloudflare Turnstile are planned — see /supported-captchas.

Image Captchas with Native Fetch (Zero Dependencies)

Node 18+ provides built-in global fetch, FormData, and Blob, allowing you to solve image captchas without installing any npm dependencies. The endpoint answers synchronously:

image-solver.mjs — Native Fetch (Node 18+)
import { readFile } from 'node:fs/promises';

const API_KEY = process.env.CAPTCHAKINGS_KEY || 'YOUR_API_KEY';

export async function solveImageCaptcha(imagePath) {
    const buffer = await readFile(imagePath);
    const form = new FormData();
    form.append('captcha', new Blob([buffer]), imagePath);

    const response = await fetch('https://captchakings.com/api/process.php', {
        method: 'POST',
        headers: { 
            'Authorization': `Bearer ${API_KEY}` 
        },
        body: form
    });

    const result = await response.json();
    if (!result.success) {
        throw new Error(result.error?.message || 'Captcha solving failed');
    }
    
    return {
        text: result.data.prediction,
        confidence: result.data.confidence,
        balance: result.billing.balance_remaining
    };
}

// Example usage:
// const res = await solveImageCaptcha('captcha.png');
// console.log('Solved Text:', res.text);

MTCaptcha & Custom Token Solving with Axios

For token and widget-based challenges like MTCaptcha, send the page parameters to CaptchaKings and receive the verified token in response:

mtcaptcha-solver.js — Axios
import axios from 'axios';

const API_KEY = process.env.CAPTCHAKINGS_KEY;

export async function solveMTCaptcha(siteKey, pageUrl) {
    const res = await axios.post('https://captchakings.com/api/mtcaptcha.php', {
        key: API_KEY,
        sitekey: siteKey,
        pageurl: pageUrl
    });

    if (res.data.status === 1) {
        return res.data.request; // Returned verified token
    }
    throw new Error(res.data.request || 'MTCaptcha failed');
}

Puppeteer: Inject the Token and Submit

Pair CaptchaKings solver with Puppeteer or Playwright for headless browser automation without running slow browser-side challenge scripts:

puppeteer-flow.mjs — Headless Browser Automation
import puppeteer from 'puppeteer';
import { solveMTCaptcha } from './mtcaptcha-solver.js';

const browser = await puppeteer.launch({ headless: 'new' });
const page = await browser.newPage();
await page.goto('https://example.com/login');

// Extract sitekey from DOM
const siteKey = await page.$eval('[data-sitekey]', el => el.dataset.sitekey);
const token = await solveMTCaptcha(siteKey, page.url());

// Inject token into the hidden response input and submit
await page.evaluate((t) => {
    const input = document.querySelector('input[name="mtcaptcha-verifiedtoken"]') || document.getElementById('g-recaptcha-response');
    if (input) input.value = t;
}, token);

await page.click('#submit-btn');
await browser.close();

Express.js Solver Proxy Middleware

Building an internal web scraping microservice? Wrap CaptchaKings in an Express route to provide a centralized solving hub for your distributed worker nodes:

server.mjs — Express Microservice
import express from 'express';
import { solveImageCaptcha } from './image-solver.mjs';

const app = express();
app.use(express.json({ limit: '10mb' }));

app.post('/solve-image', async (req, res) => {
    try {
        const { imagePath } = req.body;
        const result = await solveImageCaptcha(imagePath);
        res.json({ success: true, result });
    } catch (err) {
        res.status(502).json({ success: false, error: err.message });
    }
});

app.listen(3000, () => console.log('Captcha proxy listening on port 3000'));

High-Concurrency Solving with Promise.all

Take full advantage of the Node.js asynchronous event loop by dispatching multiple solve requests concurrently instead of sequential blocking:

concurrent.mjs — Bulk Solver
const imageTasks = ['captcha1.png', 'captcha2.png', 'captcha3.png', 'captcha4.png'];

const results = await Promise.all(
    imageTasks.map(path => solveImageCaptcha(path).catch(err => ({ error: err.message })))
);

console.log('Concurrent solve results:', results);

API Endpoints Summary

Challenge TypeLive EndpointPricing & Output
Generic Image / OCRcaptchakings.com/api/process.php$0.80 / 1k • Synchronous JSON
MTCaptchacaptchakings.com/api/mtcaptcha.php$1.00 / 1k • Verified Token
GeeTest / Tencent / xCaptchacaptchakings.com/api/{type}.php$1.00 / 1k • Challenge Result
Amazon AWS WAFcaptchakings.com/api/amazon.php$1.00 / 1k • WAF Solution Token
2Captcha Migration Protocolcaptchakings.com/in.php & res.php$0.80 - $1.00 / 1k • Drop-in 2captcha wrapper

Production Best Practices for Node.js

  • Adopt Node.js 18 LTS or later — use native fetch and FormData to avoid extra dependency bloat.
  • Implement Concurrency Limits — utilize libraries like p-limit when scraping in bulk to avoid hitting local socket or memory constraints.
  • Store Keys in Environment Variables — never hardcode your CaptchaKings secret key; use process.env.CAPTCHAKINGS_KEY.
  • Set Sensible Timeout Safeguards — configure a 15-30 second abort controller timeout for network resilience.

Frequently Asked Questions

Is there an official npm package for CaptchaKings?

An official npm library is coming soon, but you do not need one. The API uses standard HTTP JSON/Multipart specifications that work immediately with Axios, Fetch, Got, or Superagent.

Can I use this with Playwright or Puppeteer?

Yes. Simply capture the captcha image base64 or grab the public site parameters, pass them to CaptchaKings, and inject the returned answer into the target page inputs using page.evaluate() or page.fill().

What is the pricing for Node.js API requests?

Image OCR is $0.80 per 1,000 solves. Complex token challenges (MTCaptcha, GeeTest, Amazon WAF) are $1.00 per 1,000 solves. Sign up to get $0.50 in free starting credits.

Integration Guides for Other Languages

  • Python Captcha Solver Guide
  • PHP Captcha Solver Guide
  • Playwright Captcha Solver
  • Puppeteer Captcha Solver
  • MTCaptcha Solver API
  • Full API Documentation

Start Solving Captchas in Node.js Today

Get instant API access with $0.50 free trial balance — test with your actual scripts in minutes.

Get Your Free API Key
CaptchaKings

CaptchaKings (Captcha Kings) adalah API AI Captcha Solver untuk automation modern - cepat, terukur, dan transparan

Produk

  • Fitur
  • Tencent / Chinese BARU
  • xCaptcha Solver BARU
  • Google reCAPTCHA BARU
  • Dokumentasi API
  • Harga
  • Cara Kerja
  • CAPTCHA yang Didukung
  • Benchmarks

Resources

  • Developer Docs
  • Panduan Selenium BARU
  • Panduan Playwright BARU
  • Panduan Puppeteer BARU
  • Tools Gratis BARU
  • Ekstensi Chrome BARU
  • Blog & Tutorial
  • IP Rotator

Perbandingan & FAQs

  • Mengapa CaptchaKings?
  • Perbandingan Harga
  • vs 2Captcha
  • vs CapSolver
  • vs CapMonster
  • vs Anti-Captcha
  • Untuk AI Agents

Perusahaan

  • Tentang Kami
  • Demo
  • Dashboard
  • Support
  • Kebijakan Privasi
  • Kebijakan Pengembalian
  • Syarat & Ketentuan
  • SLA 99.9%

© 2026 CaptchaKings.com. Hak cipta dilindungi undang-undang.

🚀 Mulai Gratis Sekarang
🎁

Tunggu! Jangan Lewatkan Ini

Daftar sekarang dan dapatkan SALDO GRATIS $0.50 untuk mencoba API kami.

Ambil Bonus & Daftar Gratis

Kami menggunakan cookies untuk meningkatkan pengalaman Anda, menganalisis lalu lintas situs, dan mengoptimalkan performa API. Dengan melanjutkan penjelajahan, Anda menyetujui kebijakan cookies kami. Kebijakan Privasi