What is CaptchaFox and how to recognise it
CaptchaFox describes itself as a privacy-first, GDPR-compliant bot-protection captcha built and hosted in Europe. It is behavioural: it scores cursor movement, click timing and scroll patterns together with technical signals and network context such as IP reputation. Only suspicious sessions get a visible challenge, which can be a slide puzzle, a one-click confirmation or an audio fallback.
A page that uses it loads cdn.captchafox.com/api.js and has a container with the captchafox class and a data-sitekey attribute. The integration is reCAPTCHA-compatible: on success the widget adds a hidden input with the response token. The task takes no script-host parameter, so it targets the standard host above; a site that serves the widget from a different script host, as some large mail providers do, may reject the token.

Solving it returns a token. It is single-use and short-lived, and the site verifies it server-side together with the IP it came from.
Why the token is tied to the solving IP
CaptchaFox makes one thing different from most widgets: the token is tied to the solving IP, so whatever submits the token must go out through the same proxy. In practice one sticky proxy session carries the whole flow: you create the task through the API with that proxy, then your own code submits the form through it. A proxy that rotates on every request breaks the match — use one session of at least five minutes per solve, and submit through it.
Plain HTTP clients, Playwright, Puppeteer and Selenium all work, as long as they exit through that same session; with browser automation, configure the browser to use that same proxy.
How to find the sitekey
CaptchaFox sitekeys start with sk_. There are three ways to find one.
Page source: press Ctrl+U and search for captchafox, sk_, data-key or CaptchaFox.init. You are looking for a container with data-sitekey or data-key, or a CaptchaFox.init({ key: "sk_..." }) call.

Network tab, the most reliable: open DevTools, reload, filter requests by captchafox, challenge or init, and read the key from the query parameters or response of the requests to the CaptchaFox host. Console: try document.querySelector('[data-key]')?.dataset.key.
Send the exact page URL that shows the widget as websiteURL, together with the sitekey and your proxy. The key can be dynamic per session on some sites, so if solves suddenly fail, read it again from a fresh page load.
Where the token goes
The widget's hidden input is submitted as the POST field cf-captcha-response, so that is where the token goes on a standard integration. The site then verifies it with CaptchaFox.

Custom integrations rename it. Complete the captcha once by hand and read the request in the Network tab: observed variants include cf_token, captcha_response, captchafox_token, a header such as X-Captcha-Token, or a field inside a JSON body. Use whatever name the site's own request uses.
Submit the token immediately and through the same proxy IP as the solve, with the user agent you sent in the task. Tokens live a few minutes and are single-use.
Common mistakes
The most common failure is a context mismatch: a different IP at submission fails verification with invalid-ip-match. Submit with the user agent you sent in the task, and pick a proxy in a geography that suits the target.
The second is a stale or replayed token. Tokens are single-use and expire within minutes, so poll and submit straight away. A replay comes back as timeout-or-duplicate.
The third is posting to the wrong place. If the standard field name does not work, sniff the real one from a manual solve instead of guessing.
The fourth is a stale sitekey: it can change per session, so re-extract it when a previously working integration starts failing.
Solve it with SurSolver
Send the page URL, the sitekey, your browser userAgent and your proxy to createTask with the task type CaptchaFoxToken, then poll getTaskResult until the status is ready. The solution carries the token. A task is charged when it is accepted, and failed tasks automatically return their original charge once; the accepted names and parameters are listed by the public catalog (GET /v1/task-types).
Examples in your language
The official client wraps createTask and polling in one solve call; each language tab is its Quick start with this captcha's request, and prints the solved token. The token is tied to the solving IP, so submit it from the same proxy. The Playwright tab launches the browser through your proxy, solves the task with that same proxy and submits the form on the page. Chromium cannot send credentials to a SOCKS5 proxy, so use an http:// proxy for browser runs.
import { SurSolver, TaskType } from 'sursolver';
const API_KEY = 'YOUR_API_KEY';
const USER_AGENT =
'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/155.0.0.0 Safari/537.36';
const client = new SurSolver(API_KEY);
const { solution } = await client.solve({
type: TaskType.CaptchaFoxToken,
websiteURL: 'https://example.com/login',
websiteKey: 'YOUR_SITE_KEY',
userAgent: USER_AGENT,
proxy: 'http://user:password@203.0.113.10:8000',
});
console.log(solution.token);
from sursolver import SurSolver, TaskType
API_KEY = "YOUR_API_KEY"
USER_AGENT = (
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 "
"(KHTML, like Gecko) Chrome/155.0.0.0 Safari/537.36"
)
client = SurSolver(API_KEY)
result = client.solve(
{
"type": TaskType.CaptchaFoxToken,
"websiteURL": "https://example.com/login",
"websiteKey": "YOUR_SITE_KEY",
"userAgent": USER_AGENT,
"proxy": "http://user:password@203.0.113.10:8000",
}
)
print(result.solution["token"])
package main
import (
"context"
"fmt"
"log"
sursolver "github.com/sursolver/sursolver-go"
)
const (
APIKey = "YOUR_API_KEY"
UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/155.0.0.0 Safari/537.36"
)
func main() {
client, err := sursolver.New(APIKey)
if err != nil {
log.Fatal(err)
}
result, err := client.Solve(context.Background(), sursolver.Task{
"type": sursolver.TaskTypeCaptchaFoxToken,
"websiteURL": "https://example.com/login",
"websiteKey": "YOUR_SITE_KEY",
"userAgent": UserAgent,
"proxy": "http://user:password@203.0.113.10:8000",
})
if err != nil {
log.Fatal(err)
}
fmt.Println(result.Solution["token"])
}
use serde_json::json;
use sursolver::{Client, task_types};
const API_KEY: &str = "YOUR_API_KEY";
const USER_AGENT: &str = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/155.0.0.0 Safari/537.36";
#[tokio::main]
async fn main() -> Result<(), sursolver::Error> {
let client = Client::new(API_KEY)?;
let result = client
.solve(&json!({
"type": task_types::CAPTCHA_FOX_TOKEN,
"websiteURL": "https://example.com/login",
"websiteKey": "YOUR_SITE_KEY",
"userAgent": USER_AGENT,
"proxy": "http://user:password@203.0.113.10:8000",
}))
.await?;
println!("{}", result.solution["token"]);
Ok(())
}
<?php
require __DIR__ . '/vendor/autoload.php';
use SurSolver\Client;
use SurSolver\TaskTypes;
const API_KEY = 'YOUR_API_KEY';
const USER_AGENT = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/155.0.0.0 Safari/537.36';
$client = new Client(API_KEY);
$result = $client->solve([
'type' => TaskTypes::CAPTCHA_FOX_TOKEN,
'websiteURL' => 'https://example.com/login',
'websiteKey' => 'YOUR_SITE_KEY',
'userAgent' => USER_AGENT,
'proxy' => 'http://user:password@203.0.113.10:8000',
]);
echo $result->solution['token'];
require "sursolver"
API_KEY = "YOUR_API_KEY"
USER_AGENT = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/155.0.0.0 Safari/537.36"
client = SurSolver::Client.new(API_KEY)
result = client.solve(
"type" => SurSolver::TaskTypes::CAPTCHA_FOX_TOKEN,
"websiteURL" => "https://example.com/login",
"websiteKey" => "YOUR_SITE_KEY",
"userAgent" => USER_AGENT,
"proxy" => "http://user:password@203.0.113.10:8000"
)
puts result.solution["token"]
import com.sursolver.SolveResult;
import com.sursolver.SurSolverClient;
import com.sursolver.TaskTypes;
import java.util.Map;
public class QuickStart {
static final String API_KEY = "YOUR_API_KEY";
static final String USER_AGENT = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/155.0.0.0 Safari/537.36";
public static void main(String[] args) throws InterruptedException {
SurSolverClient client = SurSolverClient.create(API_KEY);
SolveResult result = client.solve(Map.of(
"type", TaskTypes.CaptchaFoxToken,
"websiteURL", "https://example.com/login",
"websiteKey", "YOUR_SITE_KEY",
"userAgent", USER_AGENT,
"proxy", "http://user:password@203.0.113.10:8000"));
System.out.println(result.solution().get("token"));
}
}
using System.Text.Json.Nodes;
using SurSolver;
const string ApiKey = "YOUR_API_KEY";
const string UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/155.0.0.0 Safari/537.36";
var client = new SurSolverClient(ApiKey);
var result = await client.SolveAsync(new JsonObject
{
["type"] = TaskTypes.CaptchaFoxToken,
["websiteURL"] = "https://example.com/login",
["websiteKey"] = "YOUR_SITE_KEY",
["userAgent"] = UserAgent,
["proxy"] = "http://user:password@203.0.113.10:8000",
});
Console.WriteLine(result.Solution["token"]);
// captchafox-playwright.js - solve CaptchaFox on the live page and submit the form with the
// token.
// Install: npm install playwright && npx playwright install chromium
// Run: node captchafox-playwright.js
const { chromium } = require('playwright');
const { setTimeout: sleep } = require('node:timers/promises');
// Your SurSolver API key.
const CLIENT_KEY = 'sur_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';
// The page that renders the widget, with its path and query string.
const TARGET_URL = 'https://example.com/page';
// The proxy for the solve and the replay: http://user:pass@host:port or socks5://host:port.
const PROXY_URL = 'http://username:password@proxy.example.com:8080';
// Optional, read from the page when empty: data-sitekey or data-key on the CaptchaFox container
// (it starts with sk_).
const SITE_KEY = '';
// The User-Agent the solve runs with; send the result with this same user agent.
const USER_AGENT = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/155.0.0.0 Safari/537.36';
// The control that submits the form.
const SUBMIT_SELECTOR = '.PASTE_SUBMIT_SELECTOR';
// A selector that matches only after the site accepted the result.
const SUCCESS_SELECTOR = '.PASTE_ACCEPTED_SELECTOR';
const API = 'https://api.sursolver.com';
const POLL_ATTEMPTS = 60;
// API errors are HTTP 200 with errorId 1; anything else is a transport failure.
async function call(path, body) {
const res = await fetch(`${API}${path}`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(body),
});
if (!res.ok) throw new Error(`HTTP ${res.status}`);
const data = await res.json();
if (data.errorId !== 0) throw new Error(`${data.errorCode}: ${data.errorDescription}`);
return data;
}
async function solve(task) {
const created = await call('/createTask', { clientKey: CLIENT_KEY, task });
for (let attempt = 0; attempt < POLL_ATTEMPTS; attempt += 1) {
const result = await call('/getTaskResult', {
clientKey: CLIENT_KEY,
taskId: created.taskId,
});
if (result.status === 'ready') return result.solution;
await sleep(3000);
}
throw new Error(`task ${created.taskId} was not ready in ${POLL_ATTEMPTS} polls`);
}
// Optional task fields are sent only when they have a value.
function withoutEmpty(fields) {
return Object.fromEntries(
Object.entries(fields).filter(([, value]) => value !== undefined && value !== ''),
);
}
// A value the page did not show must be pasted into its constant at the top.
function need(name, value) {
if (value === undefined || value === null || value === '') {
throw new Error(`Could not read ${name} from the page; fill in the ${name} constant.`);
}
return value;
}
// Chromium takes the proxy as a server plus credentials rather than one URL.
// It cannot send credentials to a SOCKS5 proxy; use an http:// proxy for browser runs.
function proxyOption(proxyUrl) {
const url = new URL(proxyUrl);
return {
server: `${url.protocol}//${url.host}`,
...(url.username
? { username: decodeURIComponent(url.username), password: decodeURIComponent(url.password) }
: {}),
};
}
// Opens the page once and reads what the solve needs from it.
async function readPage(browser) {
const page = await browser.newPage({ userAgent: USER_AGENT });
try {
await page.goto(TARGET_URL, {
waitUntil: 'domcontentloaded',
timeout: 45000,
});
// The widget is often added after the page loads; give it a moment to appear.
await page
.waitForFunction(
() =>
!!document.querySelector('[data-sitekey]')?.dataset.sitekey ??
document.querySelector('[data-key]')?.dataset.key,
undefined,
{ timeout: 10000 },
)
.catch(() => undefined);
const dom = await page.evaluate(() => ({
websiteKey: document.querySelector('[data-sitekey]')?.dataset.sitekey ??
document.querySelector('[data-key]')?.dataset.key,
}));
return {
pageUrl: page.url(),
...dom,
};
} finally {
await page.close();
}
}
async function main() {
const browser = await chromium.launch({ proxy: proxyOption(PROXY_URL) });
try {
const found = await readPage(browser);
const solution = await solve({
type: 'CaptchaFoxToken',
websiteURL: found.pageUrl,
websiteKey: need('websiteKey', SITE_KEY || found.websiteKey),
userAgent: USER_AGENT,
proxy: PROXY_URL,
});
// Submit from a fresh session with the user agent the solve ran with.
const context = await browser.newContext({ userAgent: USER_AGENT });
const page = await context.newPage();
await page.goto(found.pageUrl);
const applied = await page.evaluate(
({ token }) => {
let filled = false;
for (const name of ['cf-captcha-response']) {
for (const field of document.querySelectorAll(`[name="${name}"]`)) {
field.value = token;
filled = true;
}
}
const callback = null;
if (callback && typeof window[callback] === 'function') {
window[callback](token);
filled = true;
}
return filled;
},
{ token: solution.token },
);
if (!applied) {
throw new Error('The page has no token field or callback; check how it passes the token.');
}
await page.click(SUBMIT_SELECTOR);
await page.locator(SUCCESS_SELECTOR).first().waitFor({ timeout: 15000 });
console.log('The site accepted the token.');
} finally {
await browser.close();
}
}
main().catch((error) => {
console.error(error);
process.exitCode = 1;
});
The CaptchaFox solver API guide walks the same Playwright flow and the checks that separate a token rejection from an IP mismatch.