Skip to main content

Crate anticaptcha

Crate anticaptcha 

Source
Expand description

Official Anti-Captcha.com API client.

Solves image captchas, Recaptcha v2/v3 (Enterprise and non-Enterprise), hCaptcha, FunCaptcha (Arkose Labs), GeeTest v3/v4, Cloudflare Turnstile, Amazon WAF, Prosopo, Friendly Captcha, Altcha, and runs AntiGate custom scenarios.

To use the service you need to register and top up your balance. For the API details see the documentation.

§Example

use anticaptcha::{Client, RecaptchaV2};

let ac = Client::new("API_KEY_HERE");

// Make sure the API key funds balance is positive
println!("Balance: {}", ac.get_balance().await?);

let solution = ac
    .solve_recaptcha_v2(&RecaptchaV2 {
        website_url: "https://www.website.com/".into(),
        website_key: "6Lcyu8UZAAAAACwSh6Xf58WrNXTu0LLu4F85xf20".into(),
        ..Default::default()
    })
    .await?;

println!("g-response token: {}", solution.g_recaptcha_response());

§Synchronous API

Enable the blocking feature to get blocking::Client, a synchronous mirror of the same methods:

anticaptchaofficial = { version = "1", features = ["blocking"] }

§Feature flags

  • rustls-tls (default) — TLS through rustls, no system OpenSSL needed
  • native-tls — TLS through the platform library
  • blocking — adds the synchronous blocking module

Re-exports§

pub use serde_json;

Modules§

blocking
Synchronous mirror of the async API, behind the blocking feature.

Structs§

Altcha
https://anti-captcha.com/apidoc/task-types/AltchaTaskProxyless
Amazon
https://anti-captcha.com/apidoc/task-types/AmazonTaskProxyless
AntiBotCookie
https://anti-captcha.com/apidoc/task-types/AntiBotCookieTask
AntiGate
https://anti-captcha.com/apidoc/task-types/AntiGateTask
Client
Talks to the Anti-Captcha API.
FriendlyCaptcha
https://anti-captcha.com/apidoc/task-types/FriendlyCaptchaTaskProxyless
FunCaptcha
https://anti-captcha.com/apidoc/task-types/FunCaptchaTaskProxyless
GeeTest
https://anti-captcha.com/apidoc/task-types/GeeTestTaskProxyless
HCaptcha
https://anti-captcha.com/apidoc/task-types/HCaptchaTaskProxyless
ImageSettings
https://anti-captcha.com/apidoc/task-types/ImageToTextTask
ImageToCoordinates
https://anti-captcha.com/apidoc/task-types/ImageToCoordinatesTask
Prosopo
https://anti-captcha.com/apidoc/task-types/ProsopoTaskProxyless
Proxy
Your proxy, for the *_proxy_on methods.
RecaptchaV2
https://anti-captcha.com/apidoc/task-types/RecaptchaV2TaskProxyless
RecaptchaV3
https://anti-captcha.com/apidoc/task-types/RecaptchaV3TaskProxyless
Solution
The solution object of a completed task.
Turnstile
https://anti-captcha.com/apidoc/task-types/TurnstileTaskProxyless

Enums§

Error
Errors returned by this library.
ProxyType
Which protocol your proxy speaks.

Constants§

VERSION
Library version, e.g. "1.0.0".

Type Aliases§

Result
Shorthand for a result carrying our Error.