Skip to Content
AnySolver logo
AnySolver
Token

XCaptchaToken

Solve an xCaptcha widget through your own proxy and get the passcode the target form expects. Shows the request schema, an example and provider prices.

XCaptchaToken solves an xCaptcha widget through your proxy from the page URL and the sitekey, and returns the passcode that the form submits and the site verifies server-side. The challenge is a code-assembly puzzle: a distorted string is drawn across a noisy banner, and the visitor picks the two tiles below that, joined in order, spell it.

The xCaptcha widget: assemble the code shown in the banner from two of the eight tiles

Recognize the widget

The markup from xCaptcha's installation guide is distinctive:

<div id="__xCaptchaDiv" data-sitekey="SITE_KEY" style="min-height:75px!important"></div>
<script src="https://static.xcaptcha.com/js/api.js"></script>

The tells are the __xCaptchaDiv container, the static.xcaptcha.com/js/api.js script, and the xcaptcha_response input the widget injects into the form.

An invisible integration hides the div with display:none and starts the challenge from JavaScript with window.__xcaptcha.check(callback). This task solves both.

Use your proxy

task.proxy is required on this task type, and the provider solves from that address. The proxy must keep one IP for the whole solve: see Keep the same IP for the whole solve. Submit the form from the same address.

Find the parameters

  • websiteKey is the sitekey. It is public, so it is always in the page: read the data-sitekey attribute of the #__xCaptchaDiv container. For an invisible widget, search the page source for sitekey: the value is in the same attribute or in the script's init call. As a fallback, watch the Network tab while the widget loads: the key appears in the requests to xcaptcha.com.
  • websiteURL is the full URL of the page that renders the widget, not the endpoint you post the form to.

The sitekey is a 32-character hex string, for example 11aa62606fb968f3674742df60598957. Do not send the private key: it belongs to the site's server and is never needed here.

Submit the passcode

Send solution.token as the form's xcaptcha_response field. That is the default input name. A custom integration can rename it, so confirm the name against a manual submission.

Passcodes are single-use and expire, so solve as part of the request that consumes the token instead of building a pool in advance. A stale or reused passcode shows up as a generic CAPTCHA failure message on the form. If the form rejects the passcode, check that the proxy kept one IP for the whole solve, then that websiteKey and websiteURL come from the page that shows the widget.

Check Provider stats for live success rates and solve times before you pick a provider.

Supported Providers

ProviderPrice per 1,000Routing
CapCracker
$1.00

Request Schema

FieldTypeRequiredDescription
clientKey*
stringYes

Your API key. Create one in a workspace of the AnySolver dashboard.

Example: your-api-key-from-dashboard

task*
objectYes

The task body. Required fields depend on the task type. See Tasks for per-task schemas.

View task properties
settings
objectNo

Per-request settings for routing, Auto Retry, Auto Fallback, proxy reuse, response statistics and detailed analytics. Each field overrides the API key's value. See Routing modes.

View settings reference

Task Object Properties

The task field accepts an object with the following properties:

FieldTypeRequiredDescription
type*
Yes
websiteURL*
URLYes

Full URL of the page where the CAPTCHA is displayed.

Example: https://example.com/page

websiteKey*
stringYes

The sitekey found in the CAPTCHA HTML element on the target page.

Example: 11aa62606fb968f3674742df60598957

proxy*
string | objectYes

Proxy the provider solves through, as a string or an object. See Proxy configuration.

View proxy configuration

Example: http://user:pass@1.2.3.4:8080

{
    "clientKey": "YOUR_API_KEY",
    "task": {
        "type": "XCaptchaToken",
        "websiteURL": "https://example.com/page",
        "websiteKey": "11aa62606fb968f3674742df60598957",
        "proxy": "http://user:pass@1.2.3.4:8080"
    }
}

Optional fields are not guaranteed across providers

Required fields are guaranteed across every provider that supports this task. Optional fields may be honored by some providers and silently ignored by others. AnySolver does not document per-provider parameter support, so before relying on an optional field, check that provider's own docs for the task you are using.

Response Schema

FieldTypeRequiredDescription
status*
Yes

Task status: "processing", "ready", or "failed".

Example: ready

errorId*
Yes

0 on success; 1 or 2 on an error. Branch on errorCode: Error IDs explains the two error groups.

Example: 0

taskId
stringNo

Unique identifier returned when the task was created.

Example: 01KFNDF328KAN2AJ3BNHCQYE88

errorCode
No

Machine-readable error code.

Example: CAPTCHA_UNSOLVABLE

errorDescription
stringNo

Human-readable error message with resolution hints.

Example: The captcha could not be solved.

cost
numberNo

Actual cost charged for this task in USD.

Example: 0.002

taskType
No

The type of CAPTCHA task to solve.

Example: ReCaptchaV2TokenProxyLess

provider
No

Provider that handled this task. While processing, the provider currently solving it.

Example: Multibot

solution
objectNo

Solution Object Properties

The solution field contains an object with the following properties:

FieldTypeRequiredDescription
token*
stringYes

The solved CAPTCHA token to submit with your form.

Example: res_d2d60c5839fd1cbd599ee3f203ad64d9-4a55981473eb7cac80775cc2138fd9b4

raw*
Record<string, unknown>Yes

Raw provider response data for advanced use cases.