Recaptcha3 Protocol Recognition API Integration Guide

This article introduces how to integrate the Recaptcha3 protocol recognition API. It allows users to automatically decode and complete verification in the background by submitting a Website Key, without having to recognize and click Recaptcha3 CAPTCHA images.

Application Process

To use the Recaptcha3 protocol recognition API, first go to the Ace Data Cloud Console to obtain your API Token for later use.

If you have not logged in or registered, you will be automatically redirected to the login page to register and log in. Once completed, you will be automatically returned to the current page.

The API Key for a general application can be used for services enabled for the account; the Key for a dedicated application is used according to the scope of services for that application. Please check the Key's permissions, validity period, and limits, and confirm that the application balance is sufficient to pay for this request. Available trial credits are subject to what is displayed in the account. If the balance is insufficient, click the "Recharge" button.

📘 Full documentation: Recaptcha3 Protocol Recognition API →

Basic Usage

First, let's look at the basic usage. Compared with Recaptcha2, we need to pass an additional parameter, page_action, which must be obtained from the code. The website URL shown in this example is: https://recaptcha-demo.appspot.com/recaptcha-v3-request-scores.php. One way to obtain it is shown below:

Quick Method:

Open F12, then search for .execute( on the Element page. In the area outlined in red, we can see the action parameter. There is also a string following execute, which is needed later. The details are shown in the figure below.

Next, you also need to enter the URL of the website whose CAPTCHA needs to be processed to obtain the processed result. First, simply pass a website_url field. Finally, you also need to enter the website_key parameter, which can be obtained above and is the string following execute. We can then fill in the corresponding information on the interface, as shown below:

Here, we can see that we have set the Request Headers, including:

  • accept: The desired format of the response result. Here, it is set to application/json, which is JSON format.
  • authorization: The key used to call the API. After applying, you can select it directly from the dropdown.

We have also set the Request Body, including:

  • page_action: Must be obtained from the code of the website with the CAPTCHA.
  • website_url: The URL of the website whose CAPTCHA needs to be processed.
  • website_key: The website key identifier in Recaptcha3.

After making the selections, you can see that the corresponding code has also been generated on the right, as shown below:

Click the "Try" button to test it. As shown above, we obtained the following result:

{
  "token": "03AFcWeA5mfdNlQD0RGX9PTWPs0l65QukjwbYObCue5hygRuA6jJmBtwR98S2bmmZOjbLh7ogEMDd8NzJdq8DoHOD_LHIUWmdEL3HJS0pP2nmTTSoU_ltxORWA4sVsrWiXDgkARA4wAhJCeg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e3K-wAZBzvrI_Vz8Li1uEWe0b5KOQ",
  "elapsed": 31.6
}

The returned result contains multiple fields, described below:

  • token: The verification result after processing this Recaptcha3 verification task.
  • started_at, finished_at: The times when this request began processing and produced a result, as Unix timestamps (seconds, floating-point).
  • elapsed: The total time taken for this processing (seconds).

As you can see, we obtained the verification result for the Recaptcha3 verification task, which we can then use to simulate a POST or GET submission to the target website. It is for one-time use, valid for 120s, and recommended for use within 60s. Below is a brief introduction to one way of submitting the generated token to the target website:

The Python code corresponding to the token verification call:

import requests

url = "https://recaptcha-demo.appspot.c/recaptcha-v3-verify.php?action=examples/v3scores&token='{token}'"

r = requests.get(url)
if r.status_code == 200:
    return r.text

Thus, we can obtain the result:

{
  "success": true,
  "hostname": "recaptcha-demo.appspot.com",
  "challenge_ts": "2024-09-14T08:52:26Z",
  "apk_package_name": null,
  "score": 0.9,
  "action": "examples/v3scores",
  "error-codes": []
}

As you can see, success indicates the processing result of the verification here, so we have successfully passed the Recaptcha3 CAPTCHA verification.

Additionally, if you want to generate the corresponding integration code, you can copy the generated code directly. For example, the CURL code is as follows:

curl -X POST 'https://api.acedata.cloud/captcha/token/recaptcha3' \
-H 'accept: application/json' \
-H 'authorization: Bearer {token}' \
-H 'content-type: application/json' \
-d '{
  "website_url": "https://recaptcha-demo.appspot.com/recaptcha-v3-request-scores.php",
  "website_key": "6LdKlZEpAAAAAAOQjzC2v_d36tWxCl6dWsozdSy9",
  "page_action": "examples/v3scores"
}'

The Python integration code is as follows:

import requests

url = "https://api.acedata.cloud/captcha/token/recaptcha3"

headers = {
    "accept": "application/json",
    "authorization": "Bearer {token}",
    "content-type": "application/json"
}

payload = {
    "website_url": "https://recaptcha-demo.appspot.com/recaptcha-v3-request-scores.php",
    "website_key": "6LdKlZEpAAAAAAOQjzC2v_d36tWxCl6dWsozdSy9",
    "page_action": "examples/v3scores"
}

response = requests.post(url, json=payload, headers=headers)
print(response.text)

Asynchronous Mode (async)

By default, the API is synchronous and blocking: a request waits until token processing is complete before returning. If you are using multi-solver rotation and want to “receive a task_id immediately after submitting a task, schedule other solvers first, and return later to retrieve the result,” you can pass async: true in the request body.

After you pass async: true, the endpoint immediately returns a task_id without blocking:

curl -X POST 'https://api.acedata.cloud/captcha/token/recaptcha3' \
-H 'accept: application/json' \
-H 'authorization: Bearer {token}' \
-H 'content-type: application/json' \
-d '{
  "website_url": "https://recaptcha-demo.appspot.com/recaptcha-v3-request-scores.php",
  "website_key": "6LdKlZEpAAAAAAOQjzC2v_d36tWxCl6dWsozdSy9",
  "page_action": "examples/v3scores",
  "async": true
}'
{
  "task_id": "61138bb6-19aa-11ec-a9c8-0242ac110002",
  "trace_id": "2efa9340-b21b-4e26-9e14-4aac95f343ab"
}

To check the progress, you can use the task_id to query POST /captcha/tasks (once every 3–5 seconds is recommended). This endpoint does not trigger or advance task processing; the server will continue processing even if you do not query it, lose your connection, or exit the client:

curl -X POST 'https://api.acedata.cloud/captcha/tasks' \
-H 'accept: application/json' \
-H 'authorization: Bearer {token}' \
-H 'content-type: application/json' \
-d '{
  "task_id": "61138bb6-19aa-11ec-a9c8-0242ac110002"
}'

While processing, status: processing is returned:

{ "success": true, "task_id": "61138bb6-19aa-11ec-a9c8-0242ac110002", "status": "processing" }

Once processing is complete, status: ready and the token are returned:

{
  "success": true,
  "task_id": "61138bb6-19aa-11ec-a9c8-0242ac110002",
  "status": "ready",
  "token": "03AFcWeA5mfdNlQD0RGX9PTWPs0l65QukjwbYObCue5hygRuA6......"
}

Billing note: In asynchronous mode, creating a task and reading the “processing” status are free; a single charge is applied when the client first reads a successful result (consistent with existing behavior and synchronous mode pricing). The server advances the task independently, but it does not charge in advance simply because the task finishes in the background. A task that does not succeed within 120 seconds terminates with HTTP 504 timeout and is not charged. /captcha/tasks is not responsible for advancing tasks.

Error Handling

When calling the API, if an error occurs, the API will return the corresponding error code and message. For example:

  • 400 token_mismatched: Bad request, possibly due to missing or invalid parameters.
  • 400 api_not_implemented: Bad request, possibly due to missing or invalid parameters.
  • 401 invalid_token: Unauthorized, invalid or missing authorization token.
  • 429 too_many_requests: Too many requests, you have exceeded the rate limit.
  • 500 api_error: Internal server error, something went wrong on the server.

Error Response Example

{
  "success": false,
  "error": {
    "code": "api_error",
    "message": "fetch failed"
  },
  "trace_id": "2cf86e86-22a4-46e1-ac2f-032c0f2a4e89"
}

Conclusion

Through this document, you have learned how to use the Recaptcha3 protocol recognition API to enable users to complete verification without having to recognize and click Recaptcha3 CAPTCHA images, simply by submitting the Website Key for automatic decoding in the background. We hope this document helps you better integrate and use the API. If you have any questions, please feel free to contact our technical support team.