Skip to content

hCaptcha

Solve standard hCaptcha with the standard_hcaptcha type: fields, finding the site key, code in curl, Python and Node, compatible names and fixes.

hCaptcha Click on all cells where two lines overlap
Challenge
hCaptcha challenge: click on all cells where two lines overlap
Answer
hCaptcha challenge: click on all cells where two lines overlap, answered
3 clicks, passed hCaptcha checkcaptcha

Use the standard_hcaptcha type to get a response token for an hCaptcha widget. You send the page address and the site key. You get back the token the form needs.

Overview

hCaptcha is the “I am human” checkbox that sometimes opens a picture puzzle. When it is passed, it fills a hidden form field with a response token. The website checks that token with hCaptcha before it accepts the form.

type standard_hcaptcha
Needs a site key Yes
Optional extras rqdata, invisible, proxy, user_agent
You get solution.token (starts with P1_)

Which hCaptcha type? All three take the same fields.

  • standard_hcaptcha: most sites. Start here.
  • enterprise_hcaptcha: sites on hCaptcha’s Enterprise plan. Often they send rqdata.
  • hsw_hcaptcha: sites that run hCaptcha’s full browser check (HSW).

Before you start

  1. Create an API key in the dashboard under API keys (it starts with drx_) and add funds.
  2. Find the site key:
    • Open the page and choose View page source. Search for data-sitekey. It looks like data-sitekey="10000000-ffff-ffff-ffff-000000000001".
    • No luck? Open the developer tools, go to Network, reload the page and filter for hcaptcha. The requests to hcaptcha.com carry sitekey=... in their address.
  3. Check for rqdata (most sites don’t use it): in the same Network view, look for an rqdata value in the requests to hcaptcha.com. If it’s there, the page sets it each time, so you need a fresh value for each task.
  4. Check if the widget is invisible: data-size="invisible" in the source, or no checkbox on the page while the check still runs when you press the button.

Request fields

Field Required What to put
type Yes standard_hcaptcha
website_url Yes The full address of the page with the captcha, starting with https://.
website_key Yes The hCaptcha site key.
rqdata No The site’s rqdata, only if it uses one. Up to 8,000 characters.
invisible No true for widgets without a checkbox. Default false.
proxy No user:pass@host:port, or with a scheme like http:// or socks5://.
user_agent No A browser user agent string.

Create the task

curl

curl -s -X POST https://draxon.one/api/captcha/v1/tasks \
  -H "Authorization: Bearer $DRAXON_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: register-9917" \
  -d '{
    "type": "standard_hcaptcha",
    "website_url": "https://example.com/register",
    "website_key": "10000000-ffff-ffff-ffff-000000000001"
  }'

Python

import os
import requests

API = "https://draxon.one/api/captcha/v1"
HEADERS = {"Authorization": f"Bearer {os.environ['DRAXON_KEY']}"}

task = requests.post(f"{API}/tasks", headers=HEADERS, timeout=30, json={
    "type": "standard_hcaptcha",
    "website_url": "https://example.com/register",
    "website_key": "10000000-ffff-ffff-ffff-000000000001",
}).json()

while task["status"] in ("queued", "processing"):
    task = requests.get(f"{API}/tasks/{task['id']}", params={"wait": 30},
                        headers=HEADERS, timeout=60).json()

if task["status"] == "solved":
    token = task["solution"]["token"]
else:
    print("not solved:", task["error"])

Node.js

const API = "https://draxon.one/api/captcha/v1";
const headers = {
  Authorization: `Bearer ${process.env.DRAXON_KEY}`,
  "Content-Type": "application/json",
};

let task = await (await fetch(`${API}/tasks`, {
  method: "POST",
  headers,
  body: JSON.stringify({
    type: "standard_hcaptcha",
    website_url: "https://example.com/register",
    website_key: "10000000-ffff-ffff-ffff-000000000001",
  }),
})).json();

while (task.status === "queued" || task.status === "processing") {
  task = await (await fetch(`${API}/tasks/${task.id}?wait=30`, { headers })).json();
}

const token = task.status === "solved" ? task.solution.token : null;

The create call answers right away with 201 and a task in the queued state.

Get the result

Ask for the task with ?wait=30 (0 to 120 seconds). The request waits until the task is done or the time is up.

curl -s -H "Authorization: Bearer $DRAXON_KEY" \
  "https://draxon.one/api/captcha/v1/tasks/<id>?wait=30"

A solved task (cost fields left out):

{
  "id": "7b8a5b2c-623b-410a-8677-2b7e56230f21",
  "type": "standard_hcaptcha",
  "status": "solved",
  "website_host": "example.com",
  "attempts": 1,
  "created_at": "2026-10-30T10:00:00Z",
  "completed_at": "2026-10-30T10:00:09Z",
  "solution": {
    "token": "P1_eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9..."
  },
  "error": null
}

If the answer also has solution.user_agent, use it as your User-Agent when you submit.

Use the answer

  • Put solution.token in the hidden h-captcha-response field.
  • Put the same token in g-recaptcha-response too. hCaptcha fills both, and many sites read the second one.
  • Submit the form from the same page address you sent as website_url.
  • If the site sends the token another way (a JSON body, a header), open the Network tab, pass the captcha once by hand, and copy how the page sends it.
  • Use the token once and soon. hCaptcha tokens are single-use and expire quickly.

Compatible API names

Change your tool’s address to https://draxon.one/api/captcha/compat and use your DraxonCloud key as the client key.

Service style Name for this type
CapSolver / Anti-Captcha createTask HCaptchaTask, HCaptchaTaskProxyless, HCaptchaTurboTask
2Captcha in.php method=hcaptcha

Adding "isEnterprise": true to an HCaptchaTask (or enterprise=1 on 2Captcha) switches it to hCaptcha Enterprise. rqdata goes in task.rqdata, task.data or task.enterprisePayload.rqdata; on 2Captcha, in data.

curl -s "https://draxon.one/api/captcha/compat/in.php?key=$DRAXON_KEY&method=hcaptcha&sitekey=10000000-ffff-ffff-ffff-000000000001&pageurl=https://example.com/register&json=1"

Then call res.php?action=get&id=<id>&json=1 until it returns the token. More on Compatible APIs.

Errors and fixes

When you create a task:

Error What it means What to do
422 validation_error on website_key The site key is missing. Copy it from data-sitekey.
422 validation_error on website_url Not a full http(s):// address, or too long. Send the full page address.
422 validation_error on rqdata rqdata is longer than 8,000 characters. Send only the rqdata value.
422 target_blocked This website is not served. Pick a site you are allowed to automate.
402 insufficient_balance Not enough money to hold the price. Add funds.
402 spend_cap_reached The key hit its daily limit. Raise the limit or wait for the next day (UTC).

When a task ends without a token:

error.code What it means What to do
solve_failed The captcha could not be passed this time. Check the site key and rqdata, then send a new task.
provider_timeout It took too long. Try again.
expired Not finished within about 3 minutes. Try again.
attempts_exhausted It was tried several times without success. Try again later, or check your fields.

You are not charged for any of these. The site refuses a token we gave you? Check that the site key and page address are right, that you sent rqdata if the site uses it, and that you used the token quickly. If the site is on Enterprise, use enterprise_hcaptcha. More codes on the errors page.

Price and billing

Each solved hCaptcha costs the price on the pricing page, also returned by GET /api/captcha/v1/families with any discount on your account. Creating a task holds that amount. When the task is solved, the hold becomes a charge. When it fails or expires, the hold goes away and you pay nothing.