Download the api client based example codes:
New Geetest API support
What`s "new Geetest"?
They`re challenges that typically require the user to align and click on certain images.
For your convenience, we implemented support for Geetest API. If your software works with it, and supports minimal configuration, you should be able to decode Geetest using Death By Captcha in no time.
- Geetest API: Provided a site url and Geetest site key, the API returns a token that you will use to submit the form in the page with the Geetest challenge.
Pricing
For the time being, price is $$2.99/1K Geetest challenges correctly solved. You will not be billed for Geetest reported as incorrectly solved. Note that this pricing applies to new Geetest challenges only, so only customers using this specific API will be charged said rate.
Geetest API FAQ:
- What`s the Geetest API URL?
-
To use the Geetest API you will have to send a HTTP POST Request to http://api.dbcapi.me/api/captcha
- What are the POST parameters for the Geetest v3 API?
-
- username: Your DBC account username
- password: Your DBC account password
- type=8: Type 8 specifies this is a Geetest API
- geetest_params=json(payload): the data to access the geetest challenge json payload structure:
-
proxy: your proxy url and credentials (if any).Examples:
- http://127.0.0.1:3128
- http://user:password@127.0.0.1:3128
-
proxytype: your proxy connection protocol. For supported proxy types refer to Which proxy types are supported?. Example:
- HTTP
-
gt: Value of gt parameter you found on target website.
Example:
- 022397c99c9f646f6477822485f30404
-
challenge: Value of challenge parameter you found on target website.
Example:
- 38c0168576e204c23a4863a16202cac9
- pageurl: the url of the page with the Geetest challenges. This url has to include the path in which the Geetest is loaded. Example: if the Geetest you want to solve is in http://test.com/path1, pageurl has to be http://test.com/path1 and not http://test.com.
The proxy parameter is optional, but we strongly recommend to use one to prevent token rejection by the provided page due to inconsistencies between the IP that solved the captcha (ours if no proxy is provided) and the IP that submitted the Geetest for verification (yours).
Note: if proxy is provided, proxytype is a required parameter.
Full example of geetest_params:
{ "proxy": "http://user:password@127.0.0.1:1234", "proxytype": "HTTP", "gt": "022397c99c9f646f6477822485f30404", "challenge": "4c95da9e91b49a980a3b79cd7506f12b", "pageurl": "https://testsite.com/xxx-test" }
- What are the POST parameters for the Geetest v4 API?
-
- username: Your DBC account username
- password: Your DBC account password
- type=9: Type 9 specifies this is a Geetest API
- geetest_params=json(payload): the data to access the geetest challenge json payload structure:
-
proxy: your proxy url and credentials (if any).Examples:
- http://127.0.0.1:3128
- http://user:password@127.0.0.1:3128
-
proxytype: your proxy connection protocol. For supported proxy types refer to Which proxy types are supported?. Example:
- HTTP
-
captcha_id: Value of captcha_id parameter you found on target website.
Example:
- fcd636b4514bf7ac4143922550b3008b
- pageurl: the url of the page with the Geetest challenges. This url has to include the path in which the Geetest is loaded. Example: if the Geetest you want to solve is in http://test.com/path1, pageurl has to be http://test.com/path1 and not http://test.com.
Full example of geetest_params:
{ "proxy": "http://user:password@127.0.0.1:1234", "proxytype": "HTTP", "captcha_id": "fcd636b4514bf7ac4143922550b3008b", "pageurl": "https://testsite.com/xxx-test" }
- What`s the response from the Geetest v3 API?
-
-
The Geetest API response has the following structure. It`s valid for one use and has a 2 minute lifespan. It will be a string like the following:
{ "challenge": "4c95da9e91b49a980a3b79cd7506f12b", "validate": "6496091eb0fb5a83fef98829d034128b", "seccode": "6496091eb0fb5a83fef98829d034128b|jordan" }
- What`s the response from the Geetest v4 API?
-
-
The Geetest API response has the following structure. It`s valid for one use and has a 2 minute lifespan. It will be a string like the following:
{ "captcha_id": "fcd636b4514bf7ac4143922550b3008b", "lot_number": "42c9b8b653c04049b3315cc1df8bf474", "pass_token": "c77f93d1cd1e634a67d1c67bdccf8b5501bfba9858cbc102138fa60b2c532f51", "gen_time": "1666447340", "captcha_output": "[base64_encoded_output]" }
- Which proxy types are supported?
-
-
Currently, only HTTP proxies are supported. Support for other types will be added in the future.
Using Geetest API with api clients:
1) PYTHON
import deathbycaptcha
import json
# Put your DBC account username and password here.
username = "username"
password = "password"
# you can use authtoken instead of user/password combination
# activate and get the authtoken from DBC users panel
authtoken = "authtoken"
# Put the proxy and geetest data
Captcha_dict = {
'proxy': 'http://user:password@127.0.0.1:1234',
'proxytype': 'HTTP',
'captcha_id': 'fcd636b4514bf7ac4143922550b3008b',
'pageurl': 'https://testsite.com/xxx-test'}
# Create a json string
json_Captcha = json.dumps(Captcha_dict)
# to use socket client
# client = deathbycaptcha.SocketClient(username, password, authtoken)
# to use http client
client = deathbycaptcha.HttpClient(username, password, authtoken)
try:
balance = client.get_balance()
print(balance)
# Put your CAPTCHA type and Json payload here:
captcha = client.decode(type=9, geetest_params=json_Captcha)
if captcha:
# The CAPTCHA was solved; captcha["captcha"] item holds its
# numeric ID, and captcha["text"] item its list of "coordinates".
print ("CAPTCHA %s solved: %s" % (captcha["captcha"], captcha["text"]))
# # To access the response by item
# print ("captcha_id:", captcha["text"]["captcha_id"])
# print ("lot_number:", captcha["text"]["lot_number"])
# print ("pass_token:", captcha["text"]["pass_token"])
# print ("gen_time:", captcha["text"]["gen_time"])
# print ("captcha_output:", captcha["text"]["captcha_output"])
if '': # check if the CAPTCHA was incorrectly solved
client.report(captcha["captcha"])
except deathbycaptcha.AccessDeniedException:
# Access to DBC API denied, check your credentials and/or balance
print ("error: Access to DBC API denied," +
"check your credentials and/or balance")