hCaptcha API
Integrate CAPTCHA processing and asynchronous task queries.
Page Parameters
Prepare the website_url and corresponding website_key.
Asynchronous Submission
After sending the request, save the task_id for queries.
Result Status
Continue querying while processing, and read the token once ready.
Start with Your First Request
Get a Key, copy the request, and view the corresponding JSON response below.
export ACEDATACLOUD_API_KEY="YOUR_API_KEY"
curl --request POST "https://api.acedata.cloud/captcha/token/hcaptcha" \
--header "Authorization: Bearer $ACEDATACLOUD_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"website_url": "YOUR_WEBSITE_URL",
"website_key": "YOUR_WEBSITE_KEY",
"async": true
}'Below is an excerpt of key fields from the existing API response. The task identifier, usage, and generated content depend on the values returned by your request.
{
"task_id": "61138bb6-19aa-11ec-a9c8-0242ac110002",
"trace_id": "2efa9340-b21b-4e26-9e14-4aac95f343ab"
}Query the original task and get the result
Use the task ID returned upon submission to check progress and retrieve the final result.
curl --request POST "https://api.acedata.cloud/captcha/tasks" \
--header "Authorization: Bearer $ACEDATACLOUD_API_KEY" \
--header "Content-Type: application/json" \
--data '{"task_id": "61138bb6-19aa-11ec-a9c8-0242ac110002"}'The following is an excerpt of key fields from the current API response. The task identifier, usage, and generated content depend on the values returned by your request.
{
"success": true,
"task_id": "61138bb6-19aa-11ec-a9c8-0242ac110002",
"status": "processing"
}The following is an excerpt of key fields from the current API response. The task identifier, usage, and generated content depend on the values returned by your request.
{
"success": true,
"task_id": "61138bb6-19aa-11ec-a9c8-0242ac110002",
"status": "ready",
"started_at": 1784885653.0,
"finished_at": 1784885665.4,
"elapsed": 12.4,
"token": "03AFcWeA5kjJyDQ9S1a9UYimR6nuxnpEnAs5x2Pixao0dXZhMB......"
}Replace the placeholder values with the actual test page URL and corresponding website_key, and configure the verification method according to your application page.
Continue querying while status=processing, and retrieve the token after status=ready. Handle failed responses according to error or code.
API calls and pricing
Refer to the current API and pricing page for request parameters, available models, and costs. If you encounter authentication, balance, or limit errors, check the Key's application, validity period, and usage restrictions. Retain the trace_id when troubleshooting requests.
Integrate the hCaptcha API into your application
Continue to the complete guide for parameters, result fields, and error handling.
