Cookie usage notification

This site uses cookies. Cookies remember you, so we can provide you with personalized services. Read our privacy policy.

Logo of «GitHub»
  • We support API for «PHP» language
  • We support API for «Python» language
  • We support API for «Go» language
  • We support API for «Ruby» language
  • We support API for «C#» language
  • We support API for «Java» language
  • We support API for «JavaScript» language


hCaptcha widget

Token-based method to bypass hCaptcha. The method is quite similar to reCAPTCHA V2. The token can be used on the target website inside h-captcha-response form field or passed to a callback function. It's recommended to use the userAgent value together with the token.

Task types

  • HCaptchaTaskProxyless - we use our own pool of proxies
  • HCaptchaTask - we use your proxies

HCaptchaTaskProxyless task type specification

Property Type Required Description
type String Yes Task type:
websiteURL String Yes The full URL of target web page where the captcha is loaded. We do not open the page, not a problem if it is available only for authenticated users
websiteKey String Yes hCaptcha sitekey. Can be found inside data-sitekey property of the hCaptcha div element or inside sitekey parameter of the requests to hCaptcha API
isInvisible Boolean No Pass true for Invisible version of hCaptcha - a case when you don't see the checkbox, but the challenge appears. Mostly used with a callback function
enterprisePayload Object No An object containing additional parameters like: rqdata, sentry, apiEndpoint, endpoint, reportapi, assethost, imghost
Usage example: "enterprisePayload":{"rqdata":"test_string"}

HCaptchaTask task type specification

HCaptchaTask extends HCaptchaTaskProxyless adding a set of proxy-related parameters listed below

Property Type Required Description
proxyType String Yes Proxy type:
proxyAddress String Yes Proxy IP address or hostname
proxyPort Integer Yes Proxy port
proxyLogin String No Login for basic authentication on the proxy
proxyPassword String No Password for basic authentication on the proxy

Request examples

Method: createTask
API endpoint:

HCaptchaTaskProxyless request example

    "task": {

HCaptchaTask request example

    "task": {
        "isInvisible": false,
        "enterprisePayload" : {
            "rqdata" :"rqDataValue"

Response example

Method: getTaskResult
API endpoint:

    "errorId": 0,
    "status": "ready",
    "solution": {
        "token": "P1_eyJ0eXAiOiJKV...1LDq89KyJ5A",
        "respKey": "E0_eyJ0eXAiOiJK...y2w5_YbP8PGuJBBo",
        "userAgent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.5614.0 Safari/537.36",
        "gRecaptchaResponse": "P1_eyJ0eXAiOiJKV...1LDq89KyJ5A"
    "cost": "0.00299",
    "ip": "",
    "createTime": 1692863536,
    "endTime": 1692863556,
    "solveCount": 1

Code examples


require(__DIR__ . '/../src/autoloader.php');

$solver = new \TwoCaptcha\TwoCaptcha('YOUR_API_KEY');

try {
    $result = $solver->hcaptcha([
        'sitekey' => 'f7de0da3-3303-44e8-ab48-fa32ff8ccc7b',
        'url'     => '',
} catch (\Exception $e) {

die('Captcha solved: ' . $result->code);

import sys
import os


from twocaptcha import TwoCaptcha

api_key = os.getenv('APIKEY_2CAPTCHA', 'YOUR_API_KEY')

solver = TwoCaptcha(api_key)

    result = solver.hcaptcha(

except Exception as e:

    sys.exit('solved: ' + str(result))

using System;
using System.Linq;
using TwoCaptcha.Captcha;

namespace TwoCaptcha.Examples
    public class HCaptchaExample
        public void Main()
            TwoCaptcha solver = new TwoCaptcha("YOUR_API_KEY");
            HCaptcha captcha = new HCaptcha();
                Console.WriteLine("Captcha solved: " + captcha.Code);
            catch (AggregateException e)
                Console.WriteLine("Error occurred: " + e.InnerExceptions.First().Message);

package examples;

import com.twocaptcha.TwoCaptcha;
import com.twocaptcha.captcha.HCaptcha;

public class HCaptchaExample {
    public static void main(String[] args) {
        TwoCaptcha solver = new TwoCaptcha("YOUR_API_KEY");
        HCaptcha captcha = new HCaptcha();
        try {
            System.out.println("Captcha solved: " + captcha.getCode());
        } catch (Exception e) {
            System.out.println("Error occurred: " + e.getMessage());


package main

import (

func main() {
    client := api2captcha.NewClient("API_KEY")
    captcha := api2captcha.HCaptcha{
        SiteKey: "f7de0da3-3303-44e8-ab48-fa32ff8ccc7b",
        Url: "",   
    code, err := client.Solve(captcha.ToRequest())
    if err != nil {
    fmt.Println("code "+code)
require 'api_2captcha'

client ="YOUR_API_KEY")

result = client.hcaptcha({
sitekey: 'f7de0da3-3303-44e8-ab48-fa32ff8ccc7b',
pageurl: ''