Fast image OCR & token solving with Axios, native Fetch, or Puppeteer — Updated August 2026
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.
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.
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:
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);
For token and widget-based challenges like MTCaptcha, send the page parameters to CaptchaKings and receive the verified token in response:
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');
}
Pair CaptchaKings solver with Puppeteer or Playwright for headless browser automation without running slow browser-side challenge scripts:
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();
Building an internal web scraping microservice? Wrap CaptchaKings in an Express route to provide a centralized solving hub for your distributed worker nodes:
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'));
Take full advantage of the Node.js asynchronous event loop by dispatching multiple solve requests concurrently instead of sequential blocking:
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);
| Challenge Type | Live Endpoint | Pricing & Output |
|---|---|---|
| Generic Image / OCR | captchakings.com/api/process.php | $0.80 / 1k • Synchronous JSON |
| MTCaptcha | captchakings.com/api/mtcaptcha.php | $1.00 / 1k • Verified Token |
| GeeTest / Tencent / xCaptcha | captchakings.com/api/{type}.php | $1.00 / 1k • Challenge Result |
| Amazon AWS WAF | captchakings.com/api/amazon.php | $1.00 / 1k • WAF Solution Token |
| 2Captcha Migration Protocol | captchakings.com/in.php & res.php | $0.80 - $1.00 / 1k • Drop-in 2captcha wrapper |
fetch and FormData to avoid extra dependency bloat.p-limit when scraping in bulk to avoid hitting local socket or memory constraints.process.env.CAPTCHAKINGS_KEY.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.
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().
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.
Get instant API access with $0.50 free trial balance — test with your actual scripts in minutes.
Get Your Free API Key