Solve a captcha
const url = 'https://api.clearance.rest/captchas/resolve';const options = { method: 'POST', headers: {'X-API-Key': '<X-API-Key>', 'Content-Type': 'application/json'}, body: '{"type":"recaptcha_v2","website_url":"example","website_key":"example","proxy":"example","user_agent":"example","cookies":"example","invisible":true,"enterprise":true,"enterprise_payload":{"additionalProperty":"example"},"data_s":"example","page_action":"example","api_domain":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.clearance.rest/captchas/resolve \ --header 'Content-Type: application/json' \ --header 'X-API-Key: <X-API-Key>' \ --data '{ "type": "recaptcha_v2", "website_url": "example", "website_key": "example", "proxy": "example", "user_agent": "example", "cookies": "example", "invisible": true, "enterprise": true, "enterprise_payload": { "additionalProperty": "example" }, "data_s": "example", "page_action": "example", "api_domain": "example" }'Solves a captcha and waits for the result. The body is type plus the fields of that type (see GET /captchas/types); unknown fields are rejected. Only a solved captcha is charged; the amount is held up front. Add mode: 'browser' (hcaptcha) to solve in a real browser; it fails with 503 provider_unavailable when no browser worker is connected.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”Maximum time to wait in milliseconds (positive integer). Without it the request waits at most 10 minutes. When the time is up the response has status ‘timeout’.
Request Bodyrequired
Section titled “Request Bodyrequired”Request of type recaptcha_v2: Google reCAPTCHA v2 (checkbox, invisible and enterprise).
object
Captcha type.
URL of the page that shows the captcha.
Site key of the captcha widget.
Proxy to solve through: scheme://[user:pass@]host:port (http, https, socks4 or socks5). Without a proxy the captcha is solved from the solver’s own network.
User agent of the browser that will submit the solution.
Cookies of the page as ‘name=value; name2=value2’.
True for invisible reCAPTCHA.
True for the enterprise edition of the captcha.
Extra enterprise parameters of the widget (for example the ‘s’ value). Requires enterprise: true.
object
Value of the data-s attribute of the widget.
Action name passed to the reCAPTCHA execute call.
Domain the reCAPTCHA script is loaded from (google.com or recaptcha.net).
Request of type recaptcha_v3: Google reCAPTCHA v3 (score based, including enterprise).
object
Captcha type.
URL of the page that shows the captcha.
Site key of the captcha widget.
Proxy to solve through: scheme://[user:pass@]host:port (http, https, socks4 or socks5). Without a proxy the captcha is solved from the solver’s own network.
Action name passed to the reCAPTCHA execute call.
True for the enterprise edition of the captcha.
Extra enterprise parameters of the widget (for example the ‘s’ value). Requires enterprise: true.
object
Domain the reCAPTCHA script is loaded from (google.com or recaptcha.net).
Minimum reCAPTCHA v3 score wanted (0.1 to 0.9).
Request of type turnstile: Cloudflare Turnstile widget.
object
Captcha type.
URL of the page that shows the captcha.
Site key of the captcha widget.
Proxy to solve through: scheme://[user:pass@]host:port (http, https, socks4 or socks5). Without a proxy the captcha is solved from the solver’s own network.
User agent of the browser that will submit the solution.
Action value of the widget.
CData value of the widget.
ChlPageData value of the widget.
Request of type hcaptcha: hCaptcha (including enterprise). Use mode ‘browser’ to solve in a real browser.
object
Captcha type.
URL of the page that shows the captcha.
Site key of the captcha widget.
Proxy to solve through: scheme://[user:pass@]host:port (http, https, socks4 or socks5). Without a proxy the captcha is solved from the solver’s own network.
True for the enterprise edition of the captcha.
Rqdata value supplied by the page’s widget configuration.
Set to ‘browser’ to solve in a real browser. The request fails with 503 provider_unavailable when no browser worker is connected.
Request of type geetest_v3: GeeTest v3.
object
Captcha type.
URL of the page that shows the captcha.
GeeTest gt value.
GeeTest challenge value.
Proxy to solve through: scheme://[user:pass@]host:port (http, https, socks4 or socks5). Without a proxy the captcha is solved from the solver’s own network.
User agent of the browser that will submit the solution.
GeeTest API server subdomain.
Request of type geetest_v4: GeeTest v4.
object
Captcha type.
URL of the page that shows the captcha.
GeeTest v4 captcha id.
Proxy to solve through: scheme://[user:pass@]host:port (http, https, socks4 or socks5). Without a proxy the captcha is solved from the solver’s own network.
User agent of the browser that will submit the solution.
GeeTest v4 risk type (slide, gobang, icon, ai).
Request of type aws_waf: AWS WAF captcha.
object
Captcha type.
URL of the page that shows the captcha.
Proxy to solve through: scheme://[user:pass@]host:port (http, https, socks4 or socks5). Without a proxy the captcha is solved from the solver’s own network.
Site key of the captcha widget.
AWS WAF iv value.
AWS WAF context value.
URL of the AWS WAF challenge script.
URL of the AWS WAF captcha script.
AWS WAF problem URL.
AWS WAF api key.
Existing AWS WAF token to renew.
Request of type mtcaptcha: MTCaptcha.
object
Captcha type.
URL of the page that shows the captcha.
Site key of the captcha widget.
Proxy to solve through: scheme://[user:pass@]host:port (http, https, socks4 or socks5). Without a proxy the captcha is solved from the solver’s own network.
Request of type funcaptcha: Arkose Labs FunCaptcha.
object
Captcha type.
URL of the page that shows the captcha.
Site key of the captcha widget.
Proxy to solve through: scheme://[user:pass@]host:port (http, https, socks4 or socks5). Without a proxy the captcha is solved from the solver’s own network.
User agent of the browser that will submit the solution.
Subdomain the FunCaptcha script is loaded from.
Custom data blob of the widget (JSON string).
Request of type datadome: DataDome slider captcha. Requires a proxy and the user agent that was blocked.
object
Captcha type.
URL of the page that shows the captcha.
URL of the captcha the page redirected to.
User agent of the browser that will submit the solution.
Proxy to solve through: scheme://[user:pass@]host:port (http, https, socks4 or socks5). Without a proxy the captcha is solved from the solver’s own network.
HTML of the challenge page, when the solver needs it.
Request of type cloudflare_challenge: Cloudflare challenge page (returns the clearance cookies). Requires a proxy.
object
Captcha type.
URL of the page that shows the captcha.
Proxy to solve through: scheme://[user:pass@]host:port (http, https, socks4 or socks5). Without a proxy the captcha is solved from the solver’s own network.
User agent of the browser that will submit the solution.
HTML of the challenge page, when the solver needs it.
Request of type image_to_text: Text in an image.
object
Captcha type.
Captcha image as base64 (no data-URI prefix).
URL of the page that shows the captcha.
The answer is case sensitive.
0 = no preference, 1 = digits only, 2 = letters only, 3 = digits or letters, 4 = both.
The image contains a math expression to calculate.
The answer contains more than one word.
Minimum answer length.
Maximum answer length.
Instruction text for the solver, for example the text shown above the image.
Language of the text in the image.
Request of type coordinates: Click the requested points on an image.
object
Captcha type.
Captcha image as base64 (no data-URI prefix).
Instruction text for the solver, for example the text shown above the image.
Instruction image as base64 (no data-URI prefix).
Minimum number of clicks.
Maximum number of clicks.
Responses
Section titled “Responses”Default Response
Result of a request of type recaptcha_v2; solution is a TokenSolution.
object
Job id.
Captcha type of the request; solution has the shape of this type.
Solved: a solution is attached. failed: the captcha could not be solved (nothing is charged). timeout: no solution within the time limit (nothing is charged).
Token solution (reCAPTCHA, Turnstile, MTCaptcha, FunCaptcha).
object
Present when status is failed.
object
Failure code (snake_case).
Human-readable reason.
Milliseconds spent on the request.
Amount charged for this request in USD (0 unless the captcha was solved).
Available team balance after the request in USD.
Result of a request of type recaptcha_v3; solution is a TokenSolution.
object
Job id.
Captcha type of the request; solution has the shape of this type.
Solved: a solution is attached. failed: the captcha could not be solved (nothing is charged). timeout: no solution within the time limit (nothing is charged).
Token solution (reCAPTCHA, Turnstile, MTCaptcha, FunCaptcha).
object
Present when status is failed.
object
Failure code (snake_case).
Human-readable reason.
Milliseconds spent on the request.
Amount charged for this request in USD (0 unless the captcha was solved).
Available team balance after the request in USD.
Result of a request of type turnstile; solution is a TokenSolution.
object
Job id.
Captcha type of the request; solution has the shape of this type.
Solved: a solution is attached. failed: the captcha could not be solved (nothing is charged). timeout: no solution within the time limit (nothing is charged).
Token solution (reCAPTCHA, Turnstile, MTCaptcha, FunCaptcha).
object
Present when status is failed.
object
Failure code (snake_case).
Human-readable reason.
Milliseconds spent on the request.
Amount charged for this request in USD (0 unless the captcha was solved).
Available team balance after the request in USD.
Result of a request of type hcaptcha; solution is a HcaptchaSolution.
object
Job id.
Captcha type of the request; solution has the shape of this type.
Solved: a solution is attached. failed: the captcha could not be solved (nothing is charged). timeout: no solution within the time limit (nothing is charged).
HCaptcha solution.
object
Present when status is failed.
object
Failure code (snake_case).
Human-readable reason.
Milliseconds spent on the request.
Amount charged for this request in USD (0 unless the captcha was solved).
Available team balance after the request in USD.
Result of a request of type geetest_v3; solution is a GeetestV3Solution.
object
Job id.
Captcha type of the request; solution has the shape of this type.
Solved: a solution is attached. failed: the captcha could not be solved (nothing is charged). timeout: no solution within the time limit (nothing is charged).
GeeTest v3 solution.
object
Present when status is failed.
object
Failure code (snake_case).
Human-readable reason.
Milliseconds spent on the request.
Amount charged for this request in USD (0 unless the captcha was solved).
Available team balance after the request in USD.
Result of a request of type geetest_v4; solution is a GeetestV4Solution.
object
Job id.
Captcha type of the request; solution has the shape of this type.
Solved: a solution is attached. failed: the captcha could not be solved (nothing is charged). timeout: no solution within the time limit (nothing is charged).
GeeTest v4 solution.
object
Present when status is failed.
object
Failure code (snake_case).
Human-readable reason.
Milliseconds spent on the request.
Amount charged for this request in USD (0 unless the captcha was solved).
Available team balance after the request in USD.
Result of a request of type aws_waf; solution is a CookiesSolution.
object
Job id.
Captcha type of the request; solution has the shape of this type.
Solved: a solution is attached. failed: the captcha could not be solved (nothing is charged). timeout: no solution within the time limit (nothing is charged).
Cookies to set (AWS WAF, DataDome).
object
object
Present when status is failed.
object
Failure code (snake_case).
Human-readable reason.
Milliseconds spent on the request.
Amount charged for this request in USD (0 unless the captcha was solved).
Available team balance after the request in USD.
Result of a request of type mtcaptcha; solution is a TokenSolution.
object
Job id.
Captcha type of the request; solution has the shape of this type.
Solved: a solution is attached. failed: the captcha could not be solved (nothing is charged). timeout: no solution within the time limit (nothing is charged).
Token solution (reCAPTCHA, Turnstile, MTCaptcha, FunCaptcha).
object
Present when status is failed.
object
Failure code (snake_case).
Human-readable reason.
Milliseconds spent on the request.
Amount charged for this request in USD (0 unless the captcha was solved).
Available team balance after the request in USD.
Result of a request of type funcaptcha; solution is a TokenSolution.
object
Job id.
Captcha type of the request; solution has the shape of this type.
Solved: a solution is attached. failed: the captcha could not be solved (nothing is charged). timeout: no solution within the time limit (nothing is charged).
Token solution (reCAPTCHA, Turnstile, MTCaptcha, FunCaptcha).
object
Present when status is failed.
object
Failure code (snake_case).
Human-readable reason.
Milliseconds spent on the request.
Amount charged for this request in USD (0 unless the captcha was solved).
Available team balance after the request in USD.
Result of a request of type datadome; solution is a CookiesSolution.
object
Job id.
Captcha type of the request; solution has the shape of this type.
Solved: a solution is attached. failed: the captcha could not be solved (nothing is charged). timeout: no solution within the time limit (nothing is charged).
Cookies to set (AWS WAF, DataDome).
object
object
Present when status is failed.
object
Failure code (snake_case).
Human-readable reason.
Milliseconds spent on the request.
Amount charged for this request in USD (0 unless the captcha was solved).
Available team balance after the request in USD.
Result of a request of type cloudflare_challenge; solution is a CloudflareChallengeSolution.
object
Job id.
Captcha type of the request; solution has the shape of this type.
Solved: a solution is attached. failed: the captcha could not be solved (nothing is charged). timeout: no solution within the time limit (nothing is charged).
Cloudflare challenge clearance.
object
object
Present when status is failed.
object
Failure code (snake_case).
Human-readable reason.
Milliseconds spent on the request.
Amount charged for this request in USD (0 unless the captcha was solved).
Available team balance after the request in USD.
Result of a request of type image_to_text; solution is a TextSolution.
object
Job id.
Captcha type of the request; solution has the shape of this type.
Solved: a solution is attached. failed: the captcha could not be solved (nothing is charged). timeout: no solution within the time limit (nothing is charged).
Recognized text.
object
Present when status is failed.
object
Failure code (snake_case).
Human-readable reason.
Milliseconds spent on the request.
Amount charged for this request in USD (0 unless the captcha was solved).
Available team balance after the request in USD.
Result of a request of type coordinates; solution is a CoordinatesSolution.
object
Job id.
Captcha type of the request; solution has the shape of this type.
Solved: a solution is attached. failed: the captcha could not be solved (nothing is charged). timeout: no solution within the time limit (nothing is charged).
Click coordinates.
object
object
Present when status is failed.
object
Failure code (snake_case).
Human-readable reason.
Milliseconds spent on the request.
Amount charged for this request in USD (0 unless the captcha was solved).
Available team balance after the request in USD.
Example
{ "success": true, "type": "recaptcha_v2", "mode": "browser", "status": "solved"}Default Response
object
object
Machine-readable error code (snake_case).
Human-readable message.
Extra context for the error.
object
Example
{ "success": false, "error": { "code": "validation_error" }}Default Response
object
object
Machine-readable error code (snake_case).
Human-readable message.
Extra context for the error.
object
Example
{ "success": false, "error": { "code": "missing_api_key" }}Default Response
object
object
Machine-readable error code (snake_case).
Human-readable message.
Extra context for the error.
object
Example
{ "success": false, "error": { "code": "insufficient_balance" }}Default Response
object
object
Machine-readable error code (snake_case).
Human-readable message.
Extra context for the error.
object
Example
{ "success": false, "error": { "code": "team_suspended" }}Default Response
object
object
Machine-readable error code (snake_case).
Human-readable message.
Extra context for the error.
object
Example
{ "success": false, "error": { "code": "internal_error" }}Default Response
object
object
Machine-readable error code (snake_case).
Human-readable message.
Extra context for the error.
object
Example
{ "success": false, "error": { "code": "provider_unavailable" }}