HuntXHDToken
Generate the Hunt X-HD fingerprint for your proxy IP before you call a Hunt-protected site. Shows the request schema, an example and provider prices.
HuntXHDToken generates the Hunt X-HD fingerprint for your proxy IP, which you send to the site in later requests. Hunt is an anti-bot system that protects some sites with a fingerprint header and a follow-up CAPTCHA, and this task is the first step of that flow.
If the site then returns a CAPTCHA error with meta.token, continue with HuntCaptchaToken.
Send the proxy
task.proxy is required on this task type, and the X-HD value is generated for the IP of that proxy. When you change the proxy, create a new HuntXHDToken task. The proxy must keep one IP for the whole solve: see Keep the same IP for the whole solve.
Create a new task when you start a Hunt-protected session, when you need an X-HD value before you call a protected endpoint, and when you change proxy.
Find apiGetLib
apiGetLib is the full URL of Hunt's api.js file.
- Open DevTools on the page where Hunt is loaded.
- In the Network tab, reload the page and search for
hd-apiorapi.js. - Copy the full request URL of the Hunt script. It has this shape:
https://example.com/hd-api/external/apps/app-id/api.jsYou can also search the Elements tab for hd-api or api.js and read the src of the script tag.
Optional parameters
userAgent: the User-Agent to use for the fingerprint.
Do not send a data value to this task. Fingerprint generation needs only websiteURL, apiGetLib, your proxy and, optionally, the User-Agent.
Use the fingerprint
solution.token is the X-HD fingerprint. Send it to the target site, in the request header the site uses for it, together with the same proxy you used for the task.
Related tasks
Check Provider stats for live success rates and solve times before you pick a provider.
Supported Providers
| Provider | Price per 1,000 | Routing |
|---|---|---|
2Captcha | $2.99 | |
CapMonster | $1.00 | |
SCTG | $0.24 | |
VoidCaptcha | $1.50 |
Request Schema
| Field | Type | Required | Description |
|---|---|---|---|
clientKey* | string | Yes | Your API key. Create one in a workspace of the AnySolver dashboard. Example: |
task* | object | Yes | The task body. Required fields depend on the task type. See Tasks for per-task schemas. View task properties |
settings | object | No | 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:
| Field | Type | Required | Description |
|---|---|---|---|
type* | Yes | ||
websiteURL* | URL | Yes | Full URL of the page where the CAPTCHA is displayed. Example: |
apiGetLib* | URL | Yes | Full URL of the Hunt Example: |
proxy* | string | object | Yes | Proxy the provider solves through, as a string or an object. See Proxy configuration. View proxy configurationExample: |
userAgent | string | No | Browser User-Agent string. Must match the browser used on the target page. Not all providers properly support this parameter. Verify the compatibility with the provider you are using. Example: |
{
"clientKey": "YOUR_API_KEY",
"task": {
"type": "HuntXHDToken",
"websiteURL": "https://example.com/",
"apiGetLib": "https://example.com/hd-api/external/apps/app-id/api.js",
"proxy": "http://user:pass@1.2.3.4:8080"
}
}Optional fields are not guaranteed across providers
Response Schema
| Field | Type | Required | Description |
|---|---|---|---|
status* | Yes | Task status: "processing", "ready", or "failed". Example: | |
errorId* | Yes |
Example: | |
taskId | string | No | Unique identifier returned when the task was created. Example: |
errorCode | No | Machine-readable error code. Example: | |
errorDescription | string | No | Human-readable error message with resolution hints. Example: |
cost | number | No | Actual cost charged for this task in USD. Example: |
taskType | No | The type of CAPTCHA task to solve. Example: | |
provider | No | Provider that handled this task. While processing, the provider currently solving it. Example: | |
solution | object | No |
Solution Object Properties
The solution field contains an object with the following properties:
| Field | Type | Required | Description |
|---|---|---|---|
token* | string | Yes |
Example: |
raw | Record<string, unknown> | No | Raw provider response data for advanced use cases. |
{
"status": "ready",
"errorId": 0,
"solution": {
"token": "6IyDCCpDd.../z/kLNSpjewI="
}
}