Task
Create a Task without proxy
curl --location --request POST 'https://api.hardcaptcha.com/tasks/' \
--header 'x-api-key: <your_api_key>' \
--header 'Content-Type: application/json' \
--data '{
"type": "FUNCAPTCHA",
"data": {
"websiteUrl": "https://example.com",
"websiteKey": "2CB16598-CB82-4CF7-B332-5990DB66F3AB"
}
}'
import requests
import json
url = "api.hardcaptcha.com/app/tasks/"
payload = json.dumps({
"type": "FUNCAPTCHA",
"data": {
"websiteUrl": "https://example.com",
"websiteKey": "2CB16598-CB82-4CF7-B332-5990DB66F3AB"
}
})
headers = {
'x-api-key': '<your_api_key>',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
const axios = require('axios');
let data = JSON.stringify({
"type": "FUNCAPTCHA",
"data": {
"websiteUrl": "https://example.com",
"websiteKey": "2CB16598-CB82-4CF7-B332-5990DB66F3AB"
}
});
let config = {
method: 'post',
url: 'api.hardcaptcha.com/app/tasks/',
headers: {
'x-api-key': '<your_api_key>',
'Content-Type': 'application/json'
},
data : data
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
Create a Task with proxy
curl --location --request POST 'api.hardcaptcha.com/tasks/' \
--header 'x-api-key: <your_api_key>' \
--header 'Content-Type: application/json' \
--data '{
"type": "FUNCAPTCHA",
"useProxy": true,
"data": {
"proxy": "host:port:user:password",
"proxyType": "socks5",
"data": "whatever_you_want. ex: blob....",
"websiteUrl": "1",
"websiteKey": "2CB16598-CB82-4CF7-B332-5990DB66F3AB",
}
}'
import requests
import json
url = "api.hardcaptcha.com/app/tasks/"
payload = json.dumps({
"type": "FUNCAPTCHA",
"useProxy": True,
"data": {
"proxy": "host:port:user:password",
"data": "whatever_you_want. ex: blob....",
"websiteUrl": "1",
"websiteKey": "2CB16598-CB82-4CF7-B332-5990DB66F3AB",
"proxyType": "socks5"
}
})
headers = {
'x-api-key': '<your_api_key>',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
const axios = require('axios');
let data = JSON.stringify({
"type": "FUNCAPTCHA",
"useProxy": true,
"data": {
"proxy": "host:port:user:password",
"data": "whatever_you_want. ex: blob....",
"websiteUrl": "1",
"websiteKey": "2CB16598-CB82-4CF7-B332-5990DB66F3AB",
"proxyType": "socks5"
}
});
let config = {
method: 'post',
maxBodyLength: Infinity,
url: 'api.hardcaptcha.com/app/tasks/',
headers: {
'x-api-key': '<your_api_key>',
'Content-Type': 'application/json'
},
data : data
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
Get task result
Last updated