hCaptcha is a quite new type of captcha that is really similar to ReCaptcha and looks like this:


Solving hCaptcha is pretty simple:
  1. Find the value of data-sitekey parameter in the source code of the page.

  2. Submit a HTTP GET or POST request to our API URL: https://2captcha.com/in.php with method set to hcaptcha and provide the value found on previous step as value for sitekey and full page URL as value for pageurl.
    You can find the full list of parameters in the table below.
    Request URL example:

  3. If everything is fine server will return the ID of your captcha as plain text, like: OK|2122988149 or as JSON {"status":1,"request":"2122988149"} if json parameter was used.
    Otherwise server will return an error code.

  4. Make a 15-20 seconds timeout then submit a HTTP GET request to our API URL: https://2captcha.com/res.php to get the result.
    The full list of parameters is in the table below.
    If captcha is already solved server will respond in plain text or JSON and return the answer token that looks like:
    If captcha is not solved yet server will return CAPCHA_NOT_READY result. Repeat your request in 5 seconds.
    If something went wrong server will return an error code.

  5. Place the token into h-captcha-response and g-recaptcha-response hidden elements and submit the form.
    let submitToken = (token) => {
    document.querySelector('[name=g-recaptcha-response]').innerText = token
    document.querySelector('[name=h-captcha-response]').innerText = token