Basilisk - FaucetPay Captcha
This task will be performed using our proxy servers.
Request parameters
type
<string>requiredCustomTask
class
<string>requiredBasilisk
websiteURL
<string>requiredThe address of the main page where the captcha is solved.
websiteKey
<string>requiredCan be found in the html code in the attribute data-sitekey of the captcha container or in the payload of a POST request to the https://basiliskcaptcha.com/challenge/check-site
in the field site_key
userAgent
<string>optionalUser-Agent browser. Pass only the current UA from the Windows operating system. Now this is: userAgentPlaceholder
Create task method
https://api.capmonster.cloud/createTask
Request
{
"clientKey": "API_KEY",
"task": {
"type": "CustomTask",
"class": "Basilisk",
"websiteURL": "https://domain.io/account/register",
"websiteKey": "b7890hre5cf2544b2759c19fb2600897",
"userAgent": "userAgentPlaceholder"
}
}
Response
{
"errorId":0,
"taskId":407533072
}
Get task result method
Use the method getTaskResult, to get the Basilisk solution.
https://api.capmonster.cloud/getTaskResult
Request
{
"clientKey":"API_KEY",
"taskId": 407533072
}
Response
{
"errorId":0,
"status":"ready",
"solution": {
"data": {
"captcha_response": "5620301f30daf284b829fba66fa9b3d0"
},
"headers": {
"User-Agent": "userAgentPlaceholder"
}
}
}
How to Find All Required Parameters for Task Creation
Manually
- Open your website where the captcha appears in the browser.
- Right-click on the captcha element and select Inspect.
websiteKey
In the Network tab, filter requests using keywords related to captchas, such as site_key. These requests will contain the site_key parameter – a value used to identify the website during the captcha solving process:
Automatically
A convenient way to automate the search for all necessary parameters. Some parameters are regenerated every time the page loads, so you'll need to extract them through a browser — either regular or headless (e.g., using Playwright). Since the values of dynamic parameters are short-lived, the captcha must be solved immediately after retrieving them.
The code snippets provided are basic examples for familiarization with extracting the required parameters. The exact implementation will depend on your captcha page, its structure, and the HTML elements/selectors it uses.
- JavaScript
- Python
- C#
Show code (for browser)
// Look for an element with the data-sitekey attribute
const captchaElement = document.querySelector('[data-sitekey]');
// Extract the sitekey value
if (captchaElement) {
const siteKey = captchaElement.getAttribute('data-sitekey');
console.log('Found site-key:', siteKey);
} else {
console.log('site-key not found');
}
Show code (Node.js)
import { chromium } from 'playwright';
async function extractSiteKey() {
const browser = await chromium.launch({ headless: true });
const page = await browser.newPage();
const url = 'https://example.com';
await page.goto(url);
// Look for an element with the data-sitekey attribute
const captchaElement = await page.$('[data-sitekey]');
// Extract the sitekey value
if (captchaElement) {
const siteKey = await captchaElement.getAttribute('data-sitekey');
console.log('Found site-key:', siteKey);
} else {
console.log('site-key not found');
}
await browser.close();
}
extractSiteKey();
Show code
import asyncio
from playwright.async_api import async_playwright
async def main():
async with async_playwright() as p:
browser = await p.chromium.launch(headless=False)
page = await browser.new_page()
url = 'https://example.com/captcha-page'
await page.goto(url)
# Look for an element with the data-sitekey attribute
captcha_element = await page.query_selector('[data-sitekey]')
# Extract the sitekey value if the element is found
if captcha_element:
site_key = await captcha_element.get_attribute('data-sitekey')
print('Found site-key:', site_key)
else:
print('site-key not found')
await browser.close()
asyncio.run(main())
Show code
using System;
using System.Threading.Tasks;
using Microsoft.Playwright;
class Program
{
static async Task Main(string[] args)
{
string url = "https://example.com/captcha-page";
using var playwright = await Playwright.CreateAsync();
var browser = await playwright.Chromium.LaunchAsync(new BrowserTypeLaunchOptions {
Headless = false });
var page = await browser.NewPageAsync();
await page.GotoAsync(url);
// Look for an element with the data-sitekey attribute
var captchaElement = await page.QuerySelectorAsync("[data-sitekey]");
// Extract the sitekey value if the element is found
if (captchaElement != null)
{
var siteKey = await captchaElement.GetAttributeAsync("data-sitekey");
Console.WriteLine("Found site-key: " + siteKey);
}
else
{
Console.WriteLine("site-key not found");
}
await browser.CloseAsync();
}
}
Use SDK Library
- JavaScript
- Python
- C#
// https://github.com/ZennoLab/capmonstercloud-client-js
import { CapMonsterCloudClientFactory, ClientOptions, BasiliskRequest } from '@zennolab_com/capmonstercloud-client';
document.addEventListener('DOMContentLoaded', async () => {
const cmcClient = CapMonsterCloudClientFactory.Create(new ClientOptions({ clientKey: '<your capmonster.cloud API key>' }));
console.log(await cmcClient.getBalance());
const basiliskRequest = new BasiliskRequest({
websiteURL: 'https://example.com',
websiteKey: 'websiteKey',
});
console.log(await cmcClient.Solve(basiliskRequest));
});
# https://github.com/ZennoLab/capmonstercloud-client-python
import asyncio
from capmonstercloudclient import CapMonsterClient, ClientOptions
from capmonstercloudclient.requests import BasiliskCustomTaskProxylessRequest
client_options = ClientOptions(api_key="your_api_key") # Replace with your CapMonster Cloud API key
cap_monster_client = CapMonsterClient(options=client_options)
basilisk_request = BasiliskCustomTaskProxylessRequest(
websiteUrl="https://example.com", # URL with captcha
websiteKey="b3760bfe5cf4254b2759c19fg2698og" # Replace with the correct website key
)
async def solve_captcha():
return await cap_monster_client.solve_captcha(basilisk_request)
responses = asyncio.run(solve_captcha())
print(responses)
// https://github.com/ZennoLab/capmonstercloud-client-dotnet
using Zennolab.CapMonsterCloud.Requests;
using Zennolab.CapMonsterCloud;
class Program
{
static async Task Main(string[] args)
{
var clientOptions = new ClientOptions
{
ClientKey = "your_api_key" // Replace with your CapMonster Cloud API key
};
var cmCloudClient = CapMonsterCloudClientFactory.Create(clientOptions);
var basiliskRequest = new BasiliskCustomTaskProxylessRequest
{
WebsiteUrl = "https://example.com", // URL with captcha
WebsiteKey = "b3760bfe5cf4254b2759c19fg2698og" // Replace with the correct website key
};
var basiliskResult = await cmCloudClient.SolveAsync(basiliskRequest);
Console.WriteLine("Captcha Solution: " + string.Join(", ", basiliskResult.Solution.Data));
Console.WriteLine("Captcha Solution: " + string.Join(", ", basiliskResult.Solution.Headers));
}
}