Automation tool integrations
Every tool works the same way: read the site key from the page, get the answer from the API, and put it into the page. Start by pasting examples for popular tools.
Selenium
Open the page with Selenium, read the site key, get a token from the API, then put it into the g-recaptcha-response field.
- 1Read data-sitekey from the page
- 2Create a task with createTask
- 3Put the token in the hidden field and submit the form
from selenium import webdriver
from selenium.webdriver.common.by import By
import requests, time
API, KEY = "https://gatesolver.com", "YOUR_API_KEY"
driver = webdriver.Chrome()
driver.get("https://www.google.com/recaptcha/api2/demo")
site_key = driver.find_element(By.CSS_SELECTOR, "[data-sitekey]").get_attribute("data-sitekey")
task = requests.post(f"{API}/createTask", json={"clientKey": KEY, "task": {
"type": "ReCaptchaV2TaskProxyLess", "websiteURL": driver.current_url, "websiteKey": site_key}}).json()
while True:
time.sleep(3)
r = requests.post(f"{API}/getTaskResult", json={"clientKey": KEY, "taskId": task["taskId"]}).json()
if r.get("status") == "ready":
break
driver.execute_script("document.getElementById('g-recaptcha-response').innerHTML = arguments[0]", r["solution"]["gRecaptchaResponse"])
driver.find_element(By.ID, "recaptcha-demo-submit").click()Playwright
Read the Turnstile site key in Playwright and put the token you receive into the cf-turnstile-response field.
- 1Read the site key
- 2Get a token via the API
- 3Insert the token and submit
import { chromium } from "playwright";
const API = "https://gatesolver.com", KEY = "YOUR_API_KEY";
const post = (p, b) => fetch(API + p, { method: "POST", headers: { "content-type": "application/json" }, body: JSON.stringify(b) }).then((r) => r.json());
const browser = await chromium.launch();
const page = await browser.newPage();
await page.goto("https://example.com/login");
const siteKey = await page.getAttribute(".cf-turnstile", "data-sitekey");
const { taskId } = await post("/createTask", { clientKey: KEY, task: { type: "AntiTurnstileTaskProxyLess", websiteURL: page.url(), websiteKey: siteKey } });
let r;
do { await page.waitForTimeout(3000); r = await post("/getTaskResult", { clientKey: KEY, taskId }); } while (r.status === "processing");
await page.evaluate((tk) => { document.querySelector("[name=cf-turnstile-response]").value = tk; }, r.solution.token);
await page.click("button[type=submit]");Puppeteer
Get a reCAPTCHA v3 token with Puppeteer and add it to the request the site sends. Match the pageAction value to the site.
- 1Find the site key and action value
- 2Get a v3 token via the API
- 3Add the token to the request
import puppeteer from "puppeteer";
const API = "https://gatesolver.com", KEY = "YOUR_API_KEY";
const post = (p, b) => fetch(API + p, { method: "POST", headers: { "content-type": "application/json" }, body: JSON.stringify(b) }).then((r) => r.json());
const browser = await puppeteer.launch();
const page = await browser.newPage();
await page.goto("https://example.com/signup");
const { taskId } = await post("/createTask", { clientKey: KEY, task: {
type: "ReCaptchaV3TaskProxyLess", websiteURL: page.url(), websiteKey: "6Lc...", pageAction: "signup" } });
let r;
do { await new Promise((s) => setTimeout(s, 3000)); r = await post("/getTaskResult", { clientKey: KEY, taskId }); } while (r.status === "processing");
await page.evaluate((tk) => { document.querySelector("#g-recaptcha-response").value = tk; }, r.solution.gRecaptchaResponse);n8n
Create a task and get the result with two HTTP Request nodes in n8n. Pause 3 seconds with a Wait node.
- 1HTTP Request: createTask
- 2Wait: 3 seconds
- 3HTTP Request: getTaskResult
Method: POST
URL: https://gatesolver.com/createTask
Body (JSON):
{
"clientKey": "YOUR_API_KEY",
"task": { "type": "ReCaptchaV2TaskProxyLess", "websiteURL": "{{ $json.url }}", "websiteKey": "{{ $json.sitekey }}" }
}
Method: POST
URL: https://gatesolver.com/getTaskResult
Body (JSON): { "clientKey": "YOUR_API_KEY", "taskId": "{{ $json.taskId }}" }in.php libraries
Libraries built for the in.php format also solve with GateSolver once you change the server address.
- 1Set the server value in your library
- 2Add your API key
- 3Call it as usual
import time, requests
B = "https://gatesolver.com"
r = requests.get(f"{B}/in.php", params={"key": "YOUR_API_KEY", "method": "userrecaptcha",
"googlekey": "6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-", "pageurl": "https://www.google.com/recaptcha/api2/demo", "json": 1}).json()
while True:
time.sleep(3)
res = requests.get(f"{B}/res.php", params={"key": "YOUR_API_KEY", "action": "get", "id": r["request"], "json": 1}).json()
if res["request"] != "CAPCHA_NOT_READY":
break
print(res["request"])