hCaptcha
hCaptcha is a quite new type of captcha that is really similar to reCAPTCHA and looks like this:
Solving hCaptcha is pretty simple:
-
Find the value of data-sitekey parameter in the source code of the page.
-
Submit a HTTP GET or POST request to our API URL:
https://ocr.captchaai.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:
-
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. -
Make a 15-20 seconds timeout then submit a HTTP GET request to our API URL:
https://ocr.captchaai.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:
P0_eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJwYXNza2V5IjoiNGQ3MTI5ZmUtOTQxZi00NGQ4LWI5MzYtMzAwZjUyMmM3Yzc2IiwiZXhwIjoxNTY4MTA3MjY4LCJzaGFyZF9pZCI6MzAyMzQ1NDg4fQ.yJuANPBc1uzCw9tW6CoLqiijBgh6zF00KdsnqaJtugg
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.
-
Place the token into h-captcha-response and g-recaptcha-response hidden elements and submit the form.
Please note, hcaptcha also has a callback. If there is no form to submit you MUST explore the website code and find the callback.
List of GET/POST request parameters for https://ocr.captchaai.com/in.php
Parameter | Type | Required | Description |
---|---|---|---|
key | String | Yes | your API key |
method | String | Yes | hcaptcha - defines that you're sending hCaptcha |
sitekey | String | Yes | Value of data-sitekey parameter you found on page |
pageurl | String | Yes | Full URL of the page where you bypass the captcha |
invisible | Number Default: 0 | No | Use 1 for invisible version of hcaptcha. Currently it is a very rare case. |
domain | String Default: hcaptcha.com | No | Domain used to load the captcha: hcaptcha.com or js.hcaptcha.com |
data | String | No | Custom data that is used in some implementations of hCaptcha, mostly with invisible=1 . In most cases you see it as rqdata inside network requests. IMPORTANT: you MUST provide userAgent if you submit captcha with data paramater. The value should match the User-Agent you use when interacting with the target website. |
userAgent | String | No | Your userAgent that will be passed to our OCR server and used to solve the captcha. Required for hCaptcha with data parameter. |
header_acao | Integer Default: 0 | No | 0 - disabled 1 - enabled. If enabled in.php will include Access-Control-Allow-Origin:* header in the response. Used for cross-domain AJAX requests in web applications. Also supported by res.php . |
json | Integer Default: 0 | No | 0 - server will send the response as plain text 1 - tells the server to send the response as JSON |
proxy | String | No | Format: login:password@123.123.123.123:3128 You can find more info about proxies here. |
proxytype | String | No | Type of your proxy: HTTP, HTTPS, SOCKS4, SOCKS5. |
List of GET request parameters for https://ocr.captchaai.com/res.php
GET parameter | Type | Required | Description |
---|---|---|---|
key | String | Yes | your API key |
action | String | Yes | get - get the asnwer for your captcha |
id | Integer | Yes | ID of captcha returned by in.php. |
json | Integer Default: 0 | No | 0 - server will send the response as plain text 1 - tells the server to send the response as JSON |
Request URL example:
https://ocr.captchaai.com/res.php?key=1abc234de56fab7c89012d34e56fa7b8&action=get&id=2122988149
Details
Get details about your account and threads.
Submit a HTTP GET or POST request to our API URL: https://ocr.captchaai.com/res.php with one of the following actions:
getbalance
It returns your plan threads number
Request URL example:
https://ocr.captchaai.com/res.php?key=347bc2896fc1812d3de5ab56a0bf4ea7&action=getbalance
Response example
600
threadsinfo
It returns your plan threads details (the threads & the working_threads) NEW
Request URL example:
https://ocr.captchaai.com/res.php?key=347bc2896fc1812d3de5ab56a0bf4ea7&action=threadsinfo
Response example
{"threads":"600","working_threads":553}