Friendly Captcha
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
type<string>requiredCustomTask
class<string>requiredfriendly
websiteURL<string>requiredFull URL of the page with the captcha.
websiteKey<string>requiredFriendly Captcha key (see section How to find the sitekey value).
apiGetLib (inside metadata)<string>requiredURL of the JS file. Specify the URL depending on the captcha version:
-
V1:
apiGetLib=https://cdn.jsdelivr.net/npm/[email protected]/widget.module.min.js, whereX.Y.Zis the client version from thex-frc-clientheader. -
V2:
apiGetLib= URL of thesite.min.jsfile loaded on the page. Example:https://cdn.jsdelivr.net/npm/@friendlycaptcha/[email protected]/site.min.js, where X.Y.Z is the client version.
See also sections Create task method and How to determine Friendly Captcha version.
userAgent<string>optionalBrowser User-Agent.
Provide only the current Windows UA: userAgentPlaceholder
proxyType<string>optionalhttp - regular HTTP/HTTPS proxy;
https - use if http doesn’t work (required for some custom proxies);
socks4 - SOCKS4 proxy;
socks5 - SOCKS5 proxy.
proxyAddress<string>optionalProxy IP address (IPv4/IPv6). Not allowed:
- Transparent proxies
- Local machine proxies
proxyPort<integer>optionalProxy port.
proxyLogin<string>optionalProxy login.
proxyPassword<string>optionalProxy password.
Create task method
Use the apiGetLib parameter value in metadata according to the Friendly Captcha version.
Example:
For V1
"apiGetLib": "https://cdn.jsdelivr.net/npm/[email protected]/widget.module.min.js"
For V2
"apiGetLib": "https://cdn.jsdelivr.net/npm/@friendlycaptcha/[email protected]/site.min.js"
- CustomTask (without proxy)
- CustomTask (with proxy)
https://api.capmonster.cloud/createTask
Request
{
"clientKey": "API_KEY",
"task": {
"type": "CustomTask",
"class": "friendly",
"websiteKey": "FFMGEMAD2K3JJ35P",
"websiteURL": "https://example.com",
"userAgent": "userAgentPlaceholder",
"metadata": {
"apiGetLib":"https://cdn.jsdelivr.net/npm/[email protected]/widget.module.min.js"
}
}
Response
{
"errorId": 0,
"taskId": 407533077
}
https://api.capmonster.cloud/createTask
Request
{
"clientKey": "API_KEY",
"task": {
"type": "CustomTask",
"class": "friendly",
"websiteKey": "FFMGEMAD2K3JJ35P",
"websiteURL": "https://example.com",
"userAgent": "userAgentPlaceholder",
"metadata": {
"apiGetLib":"https://cdn.jsdelivr.net/npm/[email protected]/widget.module.min.js"
},
"proxyType": "http",
"proxyAddress": "8.8.8.8",
"proxyPort": 8080,
"proxyLogin": "proxyLoginHere",
"proxyPassword": "proxyPasswordHere"
}
}
Response
{
"errorId": 0,
"taskId": 407533077
}
Get task result method
Use the getTaskResult method to obtain the Friendly Captcha solution.
The token format in the response depends on the captcha version used on the website:
V1: "56a3727f1f9ae4f339c8e512913cd6f8.ac7W...MAKgAAAN+MAQArAAAAjxMBACwAAAB5QgAA.AgAB"
V2: "AQQA.8Q2TbgK_..._pknXDweJjKT2qwmroOhHcZsU4dHyu-jaGIPx9k7432p_num13buuTu6n4lVA=="
https://api.capmonster.cloud/getTaskResult
Request
{
"clientKey": "API_KEY",
"taskId": 407533077
}
Response
{
"errorId": 0,
"errorCode": null,
"errorDescription": null,
"status": "ready",
"solution": {
"data": {
"token": "56a3727f1f9ae4f339c8e512913cd6f8.ac7W...MAKgAAAN+MAQArAAAAjxMBACwAAAB5QgAA.AgAB"
}
}
}
The obtained token value should be inserted into the corresponding field:
| Version | Token field |
|---|---|
| V1 | input.frc-captcha-solution |
| V2 | input.frc-captcha-response |
How to find the sitekey value
- For V1, this parameter can be found in network requests by filtering them with the keywords
sitekeyorpuzzle?sitekey=:

- For V2, use search with the keywords
sitekeyordata-sitekeyin network requests or in the page source elements:

How to determine Friendly Captcha version
Friendly Captcha can be used in two main versions: V1 and V2.
The version can be identified by loaded scripts or network requests.
Friendly Captcha V1
Used if the following scripts are present on the page:
widget.min.js
widget.module.min.js
or if puzzle?sitekey= appears in network requests:

To determine the client version, you need to:
-
Open the found
puzzle?sitekey=...request and go to Headers → Request Headers -
Find the
x-frc-clientheader:

The header contains the Friendly Captcha client version used on the site:
x-frc-client: <version>
Example values: 0.9.14, 0.9.19, etc.
- After determining the version from
x-frc-client, insert it into the CDN link:
https://cdn.jsdelivr.net/npm/friendly-challenge@<VERSION>/widget.module.min.js
For example, if x-frc-client = 0.9.14, use:
https://cdn.jsdelivr.net/npm/[email protected]/widget.module.min.js
This link must be passed into the apiGetLib parameter when creating a task.
Friendly Captcha V2
If site.min.js is loaded on the site, it means Friendly Captcha V2 is used.
Pass the site.min.js URL into the apiGetLib parameter when creating a task:

Automatic detection of Friendly Captcha version
You can automate the process of detecting the Friendly Captcha version in the browser using the following solution:
Show code
(async function detectFriendlyCaptcha() {
const result = {
version: null,
clientVersion: null,
indicators: [],
siteMinJsLinks: [],
detectedCdn: null
};
const scripts = Array.from(document.scripts).map(s => s.src);
for (const src of scripts) {
if (!src) continue;
if (src.includes("widget.min.js") || src.includes("widget.module.min.js")) {
result.version = "V1";
result.detectedCdn = src;
result.indicators.push("Found widget script");
}
const match = src.match(/friendly-challenge@(\d+\.\d+\.\d+)/);
if (match) {
result.clientVersion = match[1];
result.version = "V1";
result.detectedCdn = src;
result.indicators.push("Detected CDN version");
}
}
const puzzleElements = document.querySelectorAll(
'[id*="friendly"], [class*="frc"], iframe[src*="friendly"]'
);
if (puzzleElements.length > 0) {
result.indicators.push("Found captcha DOM elements");
if (!result.version) result.version = "V1";
}
const resources = performance.getEntriesByType("resource");
for (const r of resources) {
if (r.name.includes("puzzle?sitekey")) {
result.version = "V1";
result.indicators.push("Found puzzle?sitekey request");
}
}
for (const src of scripts) {
if (!src) continue;
if (src.includes("site.min.js")) {
result.version = "V2";
result.detectedCdn = src;
result.indicators.push("Found site.min.js");
result.siteMinJsLinks.push(src);
}
}
if (!result.version) {
result.version = "Unknown (not detected)";
}
console.log("FriendlyCaptcha Detection Result:");
console.log(result);
return result;
})();
