

๐ Ruby captcha solver: Bypass reCAPTCHA, Cloudflare, Amazon and more
Use the Ruby captcha solver to automatically bypass captchas like reCAPTCHA v2, v3, Invisible, Enterprise, Cloudflare Turnstile, GeeTest, FunCaptcha, and Amazon WAF in any Ruby app.
โ
Supported captcha solvers
To get started quickly, check out the Captcha Solver API documentation.
Helpful links:
๐ ๏ธ Features
- Fast and fully automated captcha solving
- Native support for Go 1.18+
- Uses standard
net/http and JSON APIs โ no external dependencies
- Easy integration with any Go backend, CLI tool, or scraper
- Supports async solving via goroutines and channels
- Pay only for successful solves
- 99.9% uptime
- 24/7 developer support
๐ฆ Use cases
- Accessibility automation
- Web scraping
- Automating form submissions in Go-powered services
- Running solvers in goroutines or background jobs
- QA pipelines and headless test automation
- Security testing and bot protection research
Need help integrating with your PHP application? Open an issue or fork this repo to contribute.
Installation
Add this line to your Gemfile:
gem 'solvecaptcha-ruby', git: 'https://github.com/solvercaptcha/solvecaptcha-ruby.git'
Then run:
bundle install
Or install it manually with:
gem install specific_install
gem specific_install https://github.com/solvercaptcha/solvecaptcha-ruby.git
Installation
Add this line to your application's Gemfile:
gem 'solvecaptcha-ruby'
And then execute:
$ bundle
Or install it yourself as:
$ gem install solvecaptcha-ruby
Configuration
To use the ApiSolveCaptcha gem, you'll need to import the module and create a Client instance. Here's an example:
require_relative '../lib/api_solvecaptcha'
client = ApiSolveCaptcha.new("YOUR_API_KEY")
There are a few options that can be configured using the Client instance:
client.api_key = "YOUR_API_KEY"
Client instance options
| Option |
Default value |
Description |
| default_timeout |
120 |
Timeout in seconds for all captcha types except reCAPTCHA. Defines how long the module tries to get the answer from res.php API endpoint |
| polling_interval |
10 |
Interval in seconds between requests to res.php API endpoint, setting values less than 5 seconds is not recommended |
To get the answer manually use get_result method
Solve captcha
When you submit any image-based captcha use can provide additional options to help solvecaptcha workers to solve it properly.
Captcha options
| Option |
Default Value |
Description |
| numeric |
0 |
Defines if captcha contains numeric or other symbols see more info in the API docs |
| min_len |
0 |
minimal answer lenght |
| max_len |
0 |
maximum answer length |
| phrase |
0 |
defines if the answer contains multiple words or not |
| case_sensitive |
0 |
defines if the answer is case sensitive |
| calc |
0 |
defines captcha requires calculation |
| lang |
- |
defines the captcha language, see the list of supported languages |
| hint_image |
- |
an image with hint shown to workers with the captcha, translated into instructionsimg API parameter |
| hint_text |
- |
hint or task text shown to workers with the captcha |
Below you can find basic examples for every captcha type, check out the code below.
Normal Captcha
API method description.
To bypass a normal captcha (distorted text on image) use the following method. This method also can be used to recognize any text on the image.
result = client.normal({ image: 'path/to/captcha.jpg'})
# OR
result = client.normal({
image: 'https://site-with-captcha.com/path/to/captcha.jpg'
})
Text Captcha
API method description.
This method can be used to bypass a captcha that requires to answer a question provided in clear text.
result = client.text({
textcaptcha:'If tomorrow is Saturday, what day is today?',
lang: "en"
})
reCAPTCHA v2
API method description.
Use this method to solve reCAPTCHA V2 and obtain a token to bypass the protection.
result = client.recaptcha_v2({
googlekey: '6Le-wvkSVVABCPBMRTvw0Q4Muexq1bi0DJwx_mJ-',
pageurl: 'https://mysite.com/page/with/recaptcha_v2',
invisible: 1
})
reCAPTCHA v3
API method description.
This method provides reCAPTCHA V3 solver and returns a token.
result = client.recaptcha_v3({
googlekey: '6Le-wvkSVVABCPBMRTvw0Q4Muexq1bi0DJwx_mJ-',
pageurl: 'https://mysite.com/page/with/recaptcha_v3',
version: 'v3',
score: 0.3,
action: 'verify'
})
reCAPTCHA Enterprise
API method description.
reCAPTCHA Enterprise can be used as reCAPTCHA V2 and reCAPTCHA V3. Below is a usage example for both versions.
# reCAPTCHA V2
result = client.recaptcha_v2({
googlekey: '6Le-wvkSVVABCPBMRTvw0Q4Muexq1bi0DJwx_mJ-',
pageurl: 'https://mysite.com/page/with/recaptcha_v2_enterprise',
enterprise: 1
})
# reCAPTCHA V3
result = client.recaptcha_v3({
googlekey: '6Le-wvkSVVABCPBMRTvw0Q4Muexq1bi0DJwx_mJ-',
pageurl: 'https://mysite.com/page/with/recaptcha_v3_enterprise',
version: 'v3',
score: 0.3,
action: 'verify',
enterprise: 1,
})
FunCaptcha
API method description.
FunCaptcha (Arkoselabs) solving method. Returns a token.
result = client.funcaptcha({
publickey: "69A21A01-CC7B-B9C6-0F9A-E7FA06677FFC",
pageurl: "https://mysite.com/page/with/funcaptcha",
surl: "https://client-api.arkoselabs.com"})
GeeTest
API method description.
Method to solve GeeTest puzzle captcha. Returns a set of tokens as JSON.
result = client.geetest({
gt: 'f1ab2cdefa3456789012345b6c78d90e',
api_server: 'api-na.geetest.com',
challenge: '12345678abc90123d45678ef90123a456b',
pageurl: 'https://www.site.com/page/'
})
GeeTest v4
API method description.
Use this method to solve GeeTest v4. Returns the response in JSON.
result = client.geetest_v4({
captcha_id: 'e392e1d7fd421dc63325744d5a2b9c73',
pageurl: 'https://www.site.com/page/'
})
KeyCaptcha
API method description.
Token-based method to solve KeyCaptcha.
result = client.keycaptcha({
s_s_c_user_id: 10,
s_s_c_session_id: '493e52c37c10c2bcdf4a00cbc9ccd1e8',
s_s_c_web_server_sign: '9006dc725760858e4c0715b835472f22-pz-',
s_s_c_web_server_sign2: '2ca3abe86d90c6142d5571db98af6714',
pageurl: 'https://www.keycaptcha.ru/demo-magnetic/'
})
Capy
Token-based method to bypass Capy puzzle captcha.
result = client.capy({
sitekey: 'PUZZLE_Abc1dEFghIJKLM2no34P56q7rStu8v',
pageurl: 'http://mysite.com/',
api_server: 'https://jp.api.capy.me/'
})
Grid
API method description.