hCaptcha API
Integrate CAPTCHA processing and asynchronous task queries.
Page Parameters
Prepare website_url and the corresponding website_key.
Asynchronous Submission
Save the task_id after sending the request for querying.
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 response JSON 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
}'The following is an excerpt of key fields from the existing API response. The task ID, 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 retrieve the result
Use the task ID returned on 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 existing 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 existing 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 verification according to your application's page.
Continue querying while status=processing, and retrieve the token once status=ready. Handle failed responses according to error or code.
API calls and costs
Refer to the current API and pricing page for request parameters, available models, and costs. If you encounter authentication, balance, or quota 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.

