Using with CloakBrowser

Tools

Run the Solvecha extension or the API in CloakBrowser, a stealth Chromium that aims to keep captchas from appearing. Includes license facts and tested example code.

On this page

CloakBrowser is a Chromium build with a modified fingerprint, made by CloakHQ. It works as a drop-in replacement for Playwright and Puppeteer. Solvecha recommends it for scripts that need a real browser: CloakBrowser aims to keep captchas from appearing, and Solvecha solves the ones that still do.

#Why use both

  • Fewer challenges. Sites decide whether to show a captcha by looking at the browser. A browser that looks like a normal browser can lead to fewer challenges. CloakBrowser says that it prevents captchas from appearing and that it does not solve them. We did not measure how many fewer captchas you get. It depends on the site, the IP address and your behavior.
  • A solver for the rest. When a reCAPTCHA image challenge still appears, the Solvecha extension reads it, asks the API and clicks the tiles.
  • Normal Playwright code. CloakBrowser returns standard Playwright objects, so your code stays the same.

Use a good proxy as well. See Best practices.

#License and price

This is what the CloakBrowser README and binary license say on 17 October 2026. Check cloakbrowser.dev before you plan with it, because CloakHQ can change the terms.

  • The wrapper code (the cloakbrowser packages for Python and JavaScript) is MIT licensed.
  • The browser binary has its own license. Using it for your own scraping, automation and business workflows is allowed. Redistribution is not allowed, and you may not offer it to third parties as a service without a separate license.
  • The free binary is the older Chromium 146 build. It needs no key. In our test the wrapper downloaded it by itself.
  • The latest build (Chromium 154) is free with a GitHub sign-in and one concurrent session, according to the README. Pro adds more concurrent sessions. The license section of the same README says that builds from version 148 on need a Pro subscription, so the text is not fully consistent. Ask CloakHQ or read their pricing page if you need the latest build.
  • Do not use it for anything illegal. CloakHQ forbids unauthorized automation, credential stuffing and account abuse. The Acceptable Use Policy of Solvecha says the same.

We did not buy a license. Everything below was tested with the free binary.

#Solvecha extension in CloakBrowser

CloakBrowser loads extensions through a persistent context. The browser must be headed, so on a server use xvfb-run.

  1. Install the wrapper: npm install cloakbrowser playwright-core for Node.js, or pip install cloakbrowser for Python. The browser binary downloads on the first launch.
  2. Download the Solvecha extension and unzip it into a folder called solvecha-extension.
  3. Run the script below with your key in SOLVECHA_API_KEY: xvfb-run -a node example.mjs.

Node.js

Node.js
import { launchPersistentContext } from "cloakbrowser";
import { resolve } from "node:path";

const API_KEY = process.env.SOLVECHA_API_KEY ?? "YOUR_API_KEY";
const EXTENSION = resolve("./solvecha-extension"); // the unzipped Solvecha Chrome extension

const context = await launchPersistentContext({
  userDataDir: "./profile",
  headless: false,
  extensionPaths: [EXTENSION],
  viewport: { width: 1000, height: 900 },
});

// Save the API key in the extension (chrome.storage.local, key "apiKey").
let [worker] = context.serviceWorkers();
worker ??= await context.waitForEvent("serviceworker");
await worker.evaluate((key) => chrome.storage.local.set({ apiKey: key }), API_KEY);

const page = await context.newPage();
await page.goto("https://www.google.com/recaptcha/api2/demo", { waitUntil: "domcontentloaded" });

// The extension clicks the checkbox and solves the challenge. Wait for the token.
const tokenReady = () => document.querySelector('textarea[name="g-recaptcha-response"]')?.value.length > 100;
let pass = false;
try {
  await page.waitForFunction(tokenReady, null, { timeout: 150_000, polling: 500 });
  await page.click("#recaptcha-demo-submit");
  await page.waitForSelector(".recaptcha-success", { timeout: 15_000 }); // "Verification Success... Hooray!"
  pass = true;
} catch {}

console.log(pass ? "PASS" : "FAIL");
await context.close();
process.exit(pass ? 0 : 1);

Python

Python
import os
import sys
from pathlib import Path

from cloakbrowser import launch_persistent_context

API_KEY = os.environ.get("SOLVECHA_API_KEY", "YOUR_API_KEY")
EXTENSION = str(Path("./solvecha-extension").resolve())  # the unzipped Solvecha Chrome extension

context = launch_persistent_context(
    "./profile",
    headless=False,
    extension_paths=[EXTENSION],
    viewport={"width": 1000, "height": 900},
)

# Save the API key in the extension (chrome.storage.local, key "apiKey").
workers = context.service_workers
worker = workers[0] if workers else context.wait_for_event("serviceworker")
worker.evaluate("key => chrome.storage.local.set({ apiKey: key })", API_KEY)

page = context.new_page()
page.goto("https://www.google.com/recaptcha/api2/demo", wait_until="domcontentloaded")

# The extension clicks the checkbox and solves the challenge. Wait for the token.
token_ready = """() => (document.querySelector('textarea[name="g-recaptcha-response"]')?.value.length ?? 0) > 100"""
passed = False
try:
    page.wait_for_function(token_ready, timeout=150_000, polling=500)
    page.click("#recaptcha-demo-submit")
    page.wait_for_selector(".recaptcha-success", timeout=15_000)  # "Verification Success... Hooray!"
    passed = True
except Exception:
    pass

print("PASS" if passed else "FAIL")
context.close()
sys.exit(0 if passed else 1)

#What we tested

On 17 October 2026 we ran the scripts on a Linux server with cloakbrowser 0.6.3, the free Chromium 146 binary without a key, and extension version 0.1.1 against Google's public reCAPTCHA demo page.

  • 15 runs, 15 passed. 9 runs with Node.js and 6 with Python. The last 4 runs (2 Node.js, 2 Python) used the scripts exactly as printed above. Every run ended with the success page of the demo.
  • 7 to 37 seconds from opening the page to the success page.
  • The demo page is an easy target. Other sites, IP addresses and captcha settings can differ.

Not tested: the latest Chromium 154 build (it needs a key), the humanize option, proxies, headless mode, Windows, macOS and concurrent sessions.

#Solvecha API in CloakBrowser

If the page shows a text captcha, you can take a screenshot of the picture and ask the API for the text. CloakBrowser gives you the same Playwright page object as always. We ran this script against a local imitation of the API and a local page, not against a real captcha site.

Python
import base64
import time

import requests
from cloakbrowser import launch

API = "https://api.solvecha.com"
HEADERS = {"Authorization": "Bearer YOUR_API_KEY"}


def solve_text(png: bytes) -> str:
    image = base64.b64encode(png).decode()
    job = requests.post(f"{API}/v1/recognition/textcaptcha", headers=HEADERS, json={"image_data": [image]}).json()
    for _ in range(30):
        time.sleep(1)
        r = requests.get(f"{API}/v1/recognition/textcaptcha", headers=HEADERS, params={"id": job["data"]})
        if r.status_code == 409:  # error 14: not ready yet
            continue
        r.raise_for_status()
        return r.json()["data"][0]
    raise TimeoutError("no answer after 30 seconds")


browser = launch(headless=False)
page = browser.new_page()
page.goto("https://example.com/form-with-captcha")
text = solve_text(page.locator("img.captcha").screenshot())
page.fill("input[name=captcha]", text)
browser.close()

Install requests as well (pip install cloakbrowser requests). Replace the URL and the selectors with those of your page. For reCAPTCHA grids, the extension is the simpler way, because it also clicks the tiles.

#Tips

  • Use a residential proxy for sites with strong protection, and match the time zone and language to the proxy. CloakBrowser has options for this. Read its README.
  • Use Playwright, not Puppeteer, for sites that use reCAPTCHA Enterprise. The CloakBrowser README says that Puppeteer can leak automation signals there.
  • Keep one persistent profile per identity. A profile keeps its fingerprint, cookies and the saved Solvecha key.
  • Send feedback when you solve through the API. The extension does it for you.

Solvecha is an independent service. It is not affiliated with NopeCHA, 2Captcha, CapSolver, Google or CloakHQ. Their names describe compatibility or recommendations only. Figures come from our own tests, see the compare page.

    ↑↓ to moveEnter to open