Datadome Solver : Captcha Solver
Tags: datadome, captcha, tutorial, javascript
Published: 2023-07-13 14:58:44

![How to solve DataDome Captcha](https://assets.capsolver.com/prod/images/post/2023-05-18/72bb3512-3716-4ca1-8853-61d84d0fc015.png)


# What is DataDome?

DataDome is a security company that specializes in bot protection for websites, mobile apps, and APIs. It uses artificial intelligence (AI) and machine learning algorithms to analyze traffic patterns and identify bot-like behavior. Its goal is to protect businesses from various types of harmful bot activities such as content scraping, account takeover, fraudulent transactions, skewed analytics, and more.

DataDome is designed to detect and block even sophisticated bots that mimic human behavior. It provides real-time protection, making decisions in milliseconds to block harmful bots without slowing down the user experience for legitimate users. 

The company's solution is easy to implement and can be integrated with a variety of platforms, systems, and web servers. It provides detailed analytics to help businesses understand the nature and extent of bot traffic they are facing.

DataDome CAPTCHA is one of the tools that DataDome uses to differentiate between human users and bots. CAPTCHA, as mentioned before, stands for "Completely Automated Public Turing test to tell Computers and Humans Apart." It's a test designed to be easy for humans to pass but difficult for bots.

When DataDome's system detects suspicious activity that might suggest a bot, it can trigger a CAPTCHA challenge. The user must then successfully complete the CAPTCHA to prove they are human and not a bot.

A DataDome CAPTCHA challenge could look something like this representation:
![](https://assets.capsolver.com/prod/images/post/2023-05-12/8e31f4fb-08b8-453e-a0da-38a68b16e905.png)



In this representation, the user is presented with a CAPTCHA image and a slider button that the user must complete the puzzle. Upon successfully completing the CAPTCHA, the user can proceed to access the website. If they fail or if the CAPTCHA isn't completed, the system may deny access or present another CAPTCHA challenge.

In summary, DataDome is a comprehensive bot protection solution that uses AI and machine learning to identify and block harmful bot activities. Its CAPTCHA challenge is one of the tools it uses to verify whether a user is a human or a bot, helping to maintain the security and integrity of the websites it protects.

In this blog, we will focus on solving Datadome Captcha.

# How to solve DataDome Captcha
Before we start solving DataDome, there are some requeriments and points that we need to be aware that they are needed to know
**Requeriments:**
- Capsolver Key
- Proxy (Recommended [https://metaproxies.net/](https://metaproxies.net/))

**Points to be aware that if you don't follow, solution will be invalid:**
- The query parameters of the captcha url are obtained dynamic. This mean that you can't send a static captcha url over and over.
     <sub>The query parameters are the bold words: https://geo.captcha-delivery.com/captcha/?**initialCid**=yourInitialCid&**cid**=yourCid&**t**=fe&**referer**=https%3A%2F%2Fantoinevastel.com%2Fbots%2Fdatadome&**s**=YourSParam&**e**=youreParam **these are obtained in the first GET where you get the captcha**</sub>
- The query param t, need to have the value t=fe, if have t=bv, this mean the captchaUrl is banned and you can't submit us that.
- Match the TLS of the chrome version, header and header order.
- Match the proxy used for solve the captcha for interact with the page

  For get the captcha solved, first you need to submit all the information needed. Make sure that you understand all the points to make sure capsolver can solve the captcha correctly.


To solve datadome captcha, follow our [documentation](https://docs.capsolver.com/guide/antibots/datadome.html). **Some parameters are required and some are optional**. For this example, we will only use the required parameters. The task types for datadome are:

- ``DatadomeSliderTask``: This task type requires your own proxies.

For this example, we will use **DatadomeSliderTask** as the site uses datadome captcha.
If any parameters are missing, you will likely encounter issues with the token not being accepted by the website. 
The first method that you need to use from the documentation is `createTask`, this method need the parameters of the picture, some are required and some are optional, depends on the site that we want to use.
![](https://assets.capsolver.com/prod/images/post/2023-05-11/3f9e93fd-ecdb-45d8-8c81-aff582c5b6fc.png)

# Step 1: Submitting the information to capsolver
Use the method `createTask` for submit the information:


```JSON
POST https://api.capsolver.com/createTask

{
"clientKey": "Your_API_KEY",
"task": {
"type": "DatadomeSliderTask",
"websiteURL": "https://antoinevastel.com/bots/datadome",
"captchaUrl": "https://geo.captcha-delivery.com/captcha/?initialCid=yourInitialCid&cid=yourCid&t=fe&referer=https%3A%2F%2Fantoinevastel.com%2Fbots%2Fdatadome&s=YourSParam&e=youreParam",
"proxy": "yourproxy",
"userAgent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36"
  }
}
```
# Step 2: Getting the results

To verify the results, you'll need to continuously poll the `getTaskResult` API endpoint until the captcha is resolved. 

Here's an example request:

```json
POST https://api.capsolver.com/getTaskResult
Host: api.capsolver.com
Content-Type: application/json

{
    "clientKey":"YOUR_API_KEY",
    "taskId": "TASKID_OF_CREATETASK" //ID created by the createTask method
}

```
Once the captcha is successfully resolved, you'll receive a response similar to the one depicted in the following image:
![](https://assets.capsolver.com/prod/images/post/2023-05-11/af01f1dd-9a30-46b6-a536-b43129df8d1a.png)

The captcha token received can be verified by submitting the cookie `datadome` with the value of the response to the relevant site. 
> ⚠️ **If the token is rejected, it may indicate that some information is missing or incorrect. Make sure your TLS is correct (TLS matching the user agent used, good headers, headers orders correct and same proxy used for solve the captcha)**

In conclusion, while solving datadome captcha may seem a daunting task, capsolver.com makes the process swift and efficient. By following the steps outlined above, you can easily resolve datadome.

Capsolver Team 💜