#
hCaptcha
The Recognition API
shows you where you should click to pass the CAPTCHA. You need a browser to use this API. To solve CAPTCHAs without a browser, refer to Token API
#
Submit the challenge to NopeCHA
POST https://api.nopecha.com/
{
'key': 'MY_NOPECHA_KEY',
'type': 'hcaptcha',
'task': 'Please click each image containing a cupcake',
'image_urls': [
'https://nopecha.com/image/demo/hcaptcha/0.png',
'https://nopecha.com/image/demo/hcaptcha/1.png',
'https://nopecha.com/image/demo/hcaptcha/2.png',
'https://nopecha.com/image/demo/hcaptcha/3.png',
'https://nopecha.com/image/demo/hcaptcha/4.png',
'https://nopecha.com/image/demo/hcaptcha/5.png',
'https://nopecha.com/image/demo/hcaptcha/6.png',
'https://nopecha.com/image/demo/hcaptcha/7.png',
'https://nopecha.com/image/demo/hcaptcha/8.png'
]
}
Retrieve solution with the data value
{
'data': 'IiIHk9IjU1LjAyMiIgd'
}
#
Get the solution from NopeCHA
GET https://api.nopecha.com/
{
'key': 'MY_NOPECHA_KEY',
'id': 'IiIHk9IjU1LjAyMiIgd'
}
AI has solved the challenge
AI has not yet solved the challenge
{
'data': [
false, false, true, // Click on the 3rd image
false, true, false, // Click on the 5th image
true, false, false // Click on the 7th image
]
}
{
'error': 14,
'message': 'Incomplete job'
}
#
Example code using client libraries
# Install the client using the following command:
# pip install --upgrade nopecha
import nopecha
nopecha.api_key = 'YOUR_API_KEY'
# Call the Recognition API
clicks = nopecha.Recognition.solve(
type='hcaptcha',
task='Please click each image containing a cat-shaped cookie.',
image_urls=[f"https://nopecha.com/image/demo/hcaptcha/{i}.png" for i in range(9)],
)
# Print the grids to click
print(clicks)
// Install the client using the following command:
// npm i nopecha
const { Configuration, NopeCHAApi } = require('nopecha');
const configuration = new Configuration({
apiKey: 'YOUR_API_KEY',
});
const nopecha = new NopeCHAApi(configuration);
(async () => {
// Call the Recognition API
const clicks = await nopecha.solveRecognition({
type: 'hcaptcha',
task: 'Please click each image containing a cat-shaped cookie.',
image_urls: Array.from({length: 9}, (_, i) => `https://nopecha.com/image/demo/hcaptcha/${i}.png`),
});
// Print the grids to click
console.log(clicks);
})();