API referenceTask typesreCAPTCHA v2

reCAPTCHA v2

The checkbox, the image grid, and the invisible variant that fires on submit. All three are the same task; we work out which one the page is running.

Task types

Type stringProxyUse it for
ReCaptchaV2TaskProxyLessNoneThe ordinary case. Start here.
ReCaptchaV2TaskYoursSites that score the asking address alongside the token.

Task object

FieldTypeRequiredWhat it is
typeStringYesOne of the two above.
websiteURLStringYesThe full address of the page carrying the captcha.
websiteKeyStringYesThe site key. See below for where it hides.
proxyStringOn ReCaptchaV2TaskThe type without the ProxyLess suffix requires one, in either shape. See using proxies.
isInvisibleBoolNoTrue for the invisible variant with no checkbox. Default false.
pageActionStringNoThe sa value on the /anchor request.
recaptchaDataSValueStringNoThe s value on the /anchor request.
isSessionBoolNoReturns the recaptcha-ca-t cookie value alongside the token.
apiDomainStringNogoogle.com or recaptcha.net. Only set it if the page does.

Example

POST/createTask

{
  "clientKey": "YOUR_API_KEY",
  "task": {
    "type": "ReCaptchaV2TaskProxyLess",
    "websiteURL": "https://example.com/login",
    "websiteKey": "6LcR_okUAAAAAPYr...",
    "isInvisible": false,
    "pageAction": "submit"
  }
}

Then poll /getTaskResult until:

JSON

{
  "errorId": 0,
  "taskId": "61138bb6-19fb-11ec-a9c8-0242ac110006",
  "status": "ready",
  "solution": {
    "gRecaptchaResponse": "3AHJ...",
    "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 ...",
    "expireTime": 1671615324290
  }
}
Solution fieldWhat to do with it
gRecaptchaResponsePut it in the g-recaptcha-response form field and submit.
userAgentSend the form with this user agent. A mismatch is the usual cause of a token the site rejects.
expireTimeUnix milliseconds. Submit before it passes.
import jevcha

jevcha.api_key = "YOUR_API_KEY"

solution = jevcha.solve({
    "type": "ReCaptchaV2TaskProxyLess",
    "websiteURL": "https://example.com/login",
    "websiteKey": "6LcR_okUAAAAAPYr...",
})
token = solution["gRecaptchaResponse"]
import { JevCha } from "jevcha";

const client = new JevCha({ apiKey: "YOUR_API_KEY" });

const solution = await client.solve({
  type: "ReCaptchaV2TaskProxyLess",
  websiteURL: "https://example.com/login",
  websiteKey: "6LcR_okUAAAAAPYr...",
});
const token = solution.gRecaptchaResponse;

Finding the site key

  1. Open the page and search the source for data-sitekey.
  2. If it is not there, the widget is in an iframe. Look for recaptcha/api2/anchor in the network panel and read the k parameter.
  3. The key starts 6L and is 40 characters. If yours is not, it is something else.

Last updated 21 September 2026