Skip to main content
Are you experiencing issues obtaining the token?
Contact support

FunCaptcha

Attention!

CapMonster Cloud uses built-in proxies by default — their cost is already included in the service. You only need to specify your own proxies in cases where the website does not accept the token or access to the built-in services is restricted.

If you are using a proxy with IP authorization, make sure to whitelist the address 65.21.190.34.

Request parameters


IMPORTANT: some parameter values are dynamic — they change with each render of the page using FunCaptcha.
Extract them immediately before creating the task to avoid errors during solving.
See examples of parameter extraction in the sections Finding FunCaptcha parameters and Automatic FunCaptcha solving with data[blob].


type<string>required

FunCaptchaTask


websiteURL<string>required

The URL of the page where the captcha is located.


websitePublicKey<string>required

FunCaptcha key (value public key or pk).

Format example: EX72CCFB-26EX-40E5-91E6-85EX70BE98ED


data<string>optional

Additional parameter. Required if the site uses data[blob].

Important: Do not load the captcha iframe to extract blob. Once the captcha is loaded, the value becomes invalid.


funcaptchaApiJSSubdomain<string>optional

Arkose Labs subdomain (value surl). Specify only if it differs from the default: client-api.arkoselabs.com.

Important: Specify only the domain, without the https:// prefix.


userAgent<string>optional

Browser User-Agent. Use the current value supported by CapMonster Cloud: userAgentPlaceholder

You can get the latest value at: https://capmonster.cloud/api/useragent/actual.


cookies<string>optional

Pass additional cookies in the format:

cookieName1=value1; cookieName2=value2

proxyType<string>optional

http - regular http/https proxy;
https - try this option only if "http" doesn't work (required for some custom proxies);
socks4 - socks4 proxy;
socks5 - socks5 proxy.


proxyAddress<string>optional

IPv4/IPv6 proxy IP address. Not allowed:

  • using transparent proxies (where you can see the client's IP);
  • using proxies on local machines.


proxyPort<integer>optional

Proxy port.


proxyLogin<string>optional

Proxy-server login.


proxyPassword<string>optional

Proxy-server password.

Create task method

POST
https://api.capmonster.cloud/createTask

Request example

{
"clientKey": "API_KEY",
"task": {
"type": "FunCaptchaTask",
"websiteURL": "https://yourwebsite.com/page-with-funcaptcha",
"websitePublicKey": "your-website-key",
"funcaptchaApiJSSubdomain": "example-api.arkoselabs.com",
"data": "{\"blob\":\"your-blob-value-1234567890\"}",
"userAgent": "userAgentPlaceholder"
}
}

Response example

{
"errorId":0,
"taskId":407533077
}

Get task result method

Use getTaskResult to get the FunCaptcha solution.

POST
https://api.capmonster.cloud/getTaskResult

Request example

{
"clientKey": "API_KEY",
"taskId": 407533077
}

Response example

{
"errorId": 0,
"errorCode": null,
"errorDescription": null,
"solution": {
"token": "337187b9f57678923.5060184402|r=us-west-2|lang=en|pk=EX72CCFB-26EX-40E5-91E6-85EX70BE98ED|at=40|ag=101|cdn_url=https%3A%2F%2Fclient-api.arkoselabs.com%2Fcdn%2Ffc|surl=https%3A%2F%2Fclient-api.arkoselabs.com|smurl=https%3A%2F%2Fclient-api.arkoselabs.com%2Fcdn%2Ffc%2Fassets%2Fstyle-manager",
"userAgent": "userAgentPlaceholder"
},
"status": "ready"
}

Finding FunCaptcha parameters

websitePublicKey and funcaptchaApiJSSubdomain

Open DevTools → Elements and find the hidden input with ID verification-token or FunCaptcha-Token. These contain the pk (websitePublicKey) and surl (funcaptchaApiJSSubdomain) values.

Get parameters via console:

const v = document.querySelector("#verification-token, #FunCaptcha-Token").value;
const p = Object.fromEntries(v.split("|").map(x => x.split("=")));
console.log("pk:", p.pk);
console.log("surl:", decodeURIComponent(p.surl));

data (blob)

If the site uses an additional blob parameter, you can obtain it as follows:

1. Identify the data source

The blob parameter can be located in:

  • HTML attributes: e.g., data-blob or other data-* attributes.

  • JSON API response: returned after a user action (e.g., click or captcha request).

  • Query parameter in URL within JSON: sometimes blob is passed as part of the URL.

2. Perform the request

  • GET request to the page where the captcha is displayed, or
  • POST request to the API returning captcha data.

Important: Do not load the captcha iframe to extract blob. Once the captcha is loaded, the parameter becomes invalid.

3. Extract the parameter

  • If the response is HTML — use regex or an HTML parsing tool to locate the attribute.
  • If the response is JSON — get the value of the corresponding key (e.g., data.blob).
  • If the blob is in a URL — parse the query parameters to extract the value.

You can also find the blob parameter and its value using network requests in DevTools:

  1. Go to the page with the captcha, open DevTools, and trigger the captcha to appear. Then open the Network tab and find a request like: https://arkoselabs.example.com/fc/gt2/public_key/176068BF-9607-4799-B53D-366BE98E2B84

  2. Block the loading of the captcha iframe to obtain a valid blob. To do this, press Ctrl + Shift + P (in Chromium browsers), type Enable network request blocking, enable request blocking, and add a pattern such as: /fc/gt2

    After reloading the page, the frame will be blocked. Copy the value of the blob parameter and use it in your captcha-solving request.

Automatic FunCaptcha solving with data[blob]

The JavaScript (Node.js), Python, and C# examples show how to use Playwright to extract the public_key and blob parameters, create a task in CapMonster Cloud, and obtain the captcha solution token. You can implement the same logic using other automation or testing tools.


Show code
// npm install playwright

const { chromium } = require("playwright");

const apiKey = "YOUR_API_KEY"; // CapMonster Cloud API key
const websiteURL = "https://www.example.com/"; // Page with FunCaptcha

// Wait for FunCaptcha request, check it, and extract public_key and blob
async function captureBlobAndPublicKey(page) {
return new Promise(resolve => {
page.on("request", req => {
const url = req.url();

// Check if the request is related to FunCaptcha initialization
if (url.includes("/fc/gt2/public_key/")) {
const publicKey = url.split("/fc/gt2/public_key/")[1].split("/")[0];
const post = req.postData();

// Check for the presence of blob in POST data and extract it
if (post && post.includes("data[blob]")) {
const params = new URLSearchParams(post);
const blob = params.get("data[blob]");

console.log("Extracted blob:", blob);
console.log("Extracted public_key:", publicKey);

resolve({ blob, publicKey });
}
}
});
});
}

// Create a FunCaptchaTask in CapMonster Cloud and send parameters
async function createTask(blob, publicKey) {
const task = {
type: "FunCaptchaTask",
websiteURL,
websitePublicKey: publicKey,
data: JSON.stringify({ blob }),
userAgent: "userAgentPlaceholder"
};

const res = await fetch("https://api.capmonster.cloud/createTask", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ clientKey: apiKey, task })
});

const json = await res.json();

// Check CapMonster Cloud response and wait for taskId
if (!json.taskId) {
console.error("createTask error:", json);
process.exit(1);
}

console.log("Task created:", json.taskId);
return json.taskId;
}

// Wait for the task solution
async function getTaskResult(taskId) {
while (true) {
const res = await fetch("https://api.capmonster.cloud/getTaskResult", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ clientKey: apiKey, taskId })
});

const json = await res.json();

// Check if solution is ready
if (json.status === "ready") return json.solution;

console.log("Processing...");
await new Promise(r => setTimeout(r, 2500));
}
}

(async () => {
const browser = await chromium.launch({ headless: false });
const page = await browser.newPage();

// Block captcha iframe
await page.route("**/fc/gt2/**", route => route.abort());

console.log("Opening page...");
await page.goto(websiteURL, { waitUntil: "domcontentloaded" });

console.log("Capturing public_key + blob...");

/**
* IMPORTANT!
* AT THIS STEP, YOU NEED TO TRIGGER THE CAPTCHA.
* - click Login / Sign up
* - enter email / username
* - wait for FunCaptcha to appear
*
* Example:
* await page.click('text="Create account"');
* await page.waitForTimeout(1000);
*/

const { blob, publicKey } = await captureBlobAndPublicKey(page);

// Check if parameters were successfully extracted
if (!blob || !publicKey) {
console.error("Failed to extract blob or public_key");
await browser.close();
return;
}

console.log("Creating CapMonster task...");
const taskId = await createTask(blob, publicKey);

console.log("Waiting for solution...");
const solution = await getTaskResult(taskId);

// Get the final token
console.log("CAPTCHA SOLVED");
console.log("Token:", solution.token);

await browser.close();
})();