Our solution automates solving of sliding captchas and interstitial device checks, providing seamless access to Datadome-protected websites with minimal latency.
#
Bypassing Datadome Protection: Step-by-Step
- Initialize Challenge: Load the Datadome challenge page.
- Payload Generation: Utilize our API to generate a valid challenge payload.
- Cookie Retrieval: Post the generated payload to receive the authenticated
datadome
cookie, granting access to the protected resource.
#
Application resources
Endpoint: https://datadome-cookie-api.p.rapidapi.com
This endpoint enables the client to interact with Datadome payload generation.
#
Authentication Headers
Content-Type: application/json
X-RapidApi-Key: <api key>
- get your API key from Rapidapi.com
#
1. Building the Challenge URL
Some websites redirect to the challenge page automatically. For others providing a dd dictionary in the response, manual construction of the URL is required. Our /build endpoint simplifies this process by constructing the challenge URL for you.
POST
https://datadome-cookie-api.p.rapidapi.com/build
#
Request:
const response = await fetch('https://datadome-cookie-api.p.rapidapi.com/build', {
method: 'POST',
headers: {
"Content-Type": "application/json",
"X-RapidApi-Key": "YOUR KEY"
},
body: JSON.stringify({
"html": "<html><head><title>footlocker.pt</title><style>#cmsg{animation: A 1.5s;}@keyframes A{0%{opacity:0;}99%{opacity:0;}100%{opacity:1;}}</style></head><body style=\"margin:0\"><p id=\"cmsg\">Please enable JS and disable any ad blocker</p><script data-cfasync=\"false\">var dd={'rt':'i','cid':'AHrlqAAAAAMAR0tx30uBJAoAqMeRKQ==','hsh':'A55FBF4311ED6F1BF9911EB71931D5','b':1239798,'s':17434,'host':'geo.captcha-delivery.com','ifs':'https://ct.captcha-delivery.com/i.js','cookie':'4c2wtp1lFtctMODoUQjpHuBsyReJe8LSAR1i0Vg_7uXEVJODdWRYUO3FDuCVQ4IrZSAcdv26hSs6xt1ndnbyYZP8hsO~XF69Iluo6ODtfD~Fzonr3F~tvOJg9EbYWb_3'}</script><script data-cfasync='false' src='https://assets.adobedtm.com/b714f0d8126e/b1fc23a898e9/launch-ec6a8b19468e.min.js'></script><script data-cfasync=\"false\" src=\"https://ct.captcha-delivery.com/ext.A55FBF4311ED6F1BF9911EB71931D5.js\"></script></body></html>",
"datadome": "4c2wtp1lFtctMODoUQjpHuBsyReJe8LSAR1i0Vg_7uXEVJODdWRYUO3FDuCVQ4IrZSAcdv26hSs6xt1ndnbyYZP8hsO~XF69Iluo6ODtfD~Fzonr3F~tvOJg9EbYWb_3",
"referrer": "https://www.footlocker.pt/en/product/~/314216975004.html"
}),
});
const data = await response.json();
curl -L \
-X POST \
-H 'Content-Type: application/json' \
-H 'X-RapidApi-Key: YOUR KEY' \
'https://datadome-cookie-api.p.rapidapi.com/build' \
-d '{"html":"<html><head><title>footlocker.pt</title><style>#cmsg{animation: A 1.5s;}@keyframes A{0%{opacity:0;}99%{opacity:0;}100%{opacity:1;}}</style></head><body style="margin:0"><p id="cmsg">Please enable JS and disable any ad blocker</p><script data-cfasync="false">var dd={'rt':'i','cid':'AHrlqAAAAAMAR0tx30uBJAoAqMeRKQ==','hsh':'A55FBF4311ED6F1BF9911EB71931D5','b':1239798,'s':17434,'host':'geo.captcha-delivery.com','ifs':'https://ct.captcha-delivery.com/i.js','cookie':'4c2wtp1lFtctMODoUQjpHuBsyReJe8LSAR1i0Vg_7uXEVJODdWRYUO3FDuCVQ4IrZSAcdv26hSs6xt1ndnbyYZP8hsO~XF69Iluo6ODtfD~Fzonr3F~tvOJg9EbYWb_3'}</script><script data-cfasync='false' src='https://assets.adobedtm.com/b714f0d8126e/b1fc23a898e9/launch-ec6a8b19468e.min.js'></script><script data-cfasync=\"false\" src=\"https://ct.captcha-delivery.com/ext.A55FBF4311ED6F1BF9911EB71931D5.js\"></script></body></html>","datadome":"4c2wtp1lFtctMODoUQjpHuBsyReJe8LSAR1i0Vg_7uXEVJODdWRYUO3FDuCVQ4IrZSAcdv26hSs6xt1ndnbyYZP8hsO~XF69Iluo6ODtfD~Fzonr3F~tvOJg9EbYWb_3","referrer":"https://www.footlocker.pt/en/product/~/314216975004.html"}'
import requests
response = requests.post(
"https://datadome-cookie-api.p.rapidapi.com/build",
headers={
"Content-Type":"application/json",
"X-RapidApi-Key": "YOUR KEY"
},
json={
"html":"""<html><head><title>footlocker.pt</title><style>#cmsg{animation: A 1.5s;}@keyframes A{0%{opacity:0;}99%{opacity:0;}100%{opacity:1;}}</style></head><body style="margin:0"><p id="cmsg">Please enable JS and disable any ad blocker</p><script data-cfasync="false">var dd={'rt':'i','cid':'AHrlqAAAAAMAR0tx30uBJAoAqMeRKQ==','hsh':'A55FBF4311ED6F1BF9911EB71931D5','b':1239798,'s':17434,'host':'geo.captcha-delivery.com','ifs':'https://ct.captcha-delivery.com/i.js','cookie':'4c2wtp1lFtctMODoUQjpHuBsyReJe8LSAR1i0Vg_7uXEVJODdWRYUO3FDuCVQ4IrZSAcdv26hSs6xt1ndnbyYZP8hsO~XF69Iluo6ODtfD~Fzonr3F~tvOJg9EbYWb_3'}</script><script data-cfasync='false' src='https://assets.adobedtm.com/b714f0d8126e/b1fc23a898e9/launch-ec6a8b19468e.min.js'></script><script data-cfasync=\"false\" src=\"https://ct.captcha-delivery.com/ext.A55FBF4311ED6F1BF9911EB71931D5.js\"></script></body></html>""",
"datadome":"VYIKn29U1bbDJriauSK2IElXfDL2AZQvQG_UFam7DGpctXpBi6i_t8B~U6bP6Q945NHlzXVfmaLWqvHW_mCgQBwCG7~1_NonrM2M8aeKH8RNlSiscP946D~IucnyO25i",
"referrer":"https://www.footlocker.pt/en/product/~/314216975004.html"
}
)
data = response.json()
#
Response:
{
"url":"https://geo.captcha-delivery.com/interstitial?initialCid=AHrlqAAAAAMAKsMGRfpNXXsAqMeRKQ%3D%3D&hash=A55FBF4311ED6F1BF9911EB71931D5&cid=1vLpaGpW6ZrwZ37HNvFYPWP42rwspHsnyoWBT01dq4VzmGvjNR9hMbWLaje1aRl5L...&referer=https%3A%2F%2Fwww.footlocker.pt%2Fen%2Fproduct%2F~%2F314206535404.html&s=17434&b=1239798&dm=cd",
"challenge_type":"interstitial"
}
#
2. Solving the Challenge
Following challenge page load, submit the page's response to our /solve
endpoint, which generates the necessary payload for posting and successfully obtaining the Datadome cookie.
Our API returns the requisite payload, which can be directly used in the subsequent request to generate and obtain the Datadome cookie.
POST
https://datadome-cookie-api.p.rapidapi.com/solve
#
Request:
const response = await fetch('https://datadome-cookie-api.p.rapidapi.com/solve', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-RapidAPI-Key': 'YOUR KEY',
// optional, but higly recommended
"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36"
},
body: JSON.stringify({
"html": "<!DOCTYPE html><html lang=\"en\"><head> <meta charset=\"UTF-8\" /> <meta http-equiq=\"X-UA-Compatible\" content=\"IE=edge\" /> <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" /> <meta name=\"robots\" content=\"noindex\"> <title>Device check </title></head><body > <script> var ddm = { seed: \'1c621b94-5e03-8ce7-58af-e7c253ce5788\' , cid: \'4c2wtp1lFtctMODoUQjpHuBsyReJe8LSAR1i0Vg_7uXEVJODdWRYUO3FDuCVQ4IrZSAcdv26hSs6xt1ndnbyYZP8hsO~XF69Iluo6ODtfD~Fzonr3F~tvOJg9EbYWb_3\' , hash: \'A55FBF4311ED6F1BF9911EB71931D5\' , env: \'2da217dffad11f0d83ea286c771c9d1d4bbb7268eb04d254908ce20cf984340b2dc8fc5403eefba216109eaf0163ab0618e505ce0a1236034697bd71b81242ff\' , b: 1239798, s: 17434, durationMs: 0, displayEnabled: false, dm: \'cd\' , i18n: { l_device_check_restart_verification_hidden : \'Restart verification of your device\' }, xddb: \'1\'};/* DataDome is a cybersecurity solution to detect bot activity @license https://datadome.co v1.13.3 38c3fee */;(function(){function e(e,t){return-9*(t&e)-11*(t&~e)+11*t+1*~(t&e)-1*~(t|e)}function t(e,t){return-5*(e&t)+12*(e&~t)+7*~(e&~t)+4*~(e|t)-6*~(e|~t)-11*~t}function n(e,t){return t=o[e],atob(t)}function a(n,a){return typeof(a=u[n])===i(115)+i(ut(375,259))+i(q(385,499))+i(105)+i(110)+i(dt(103,52))?function(n,a,r,c,o,u,s){var f,v,h;s=i(gt(52,81))+i(81)+i(dt(84,26))+i(82)+i(104)+i(69)+i(43)+i(72)+i(105)+i(Ce(572,450))+i(48)+i(t(0,78))+i(109)+i(101)+i(54)+i(68)+i(115)+(i(110)+i(117)+i(S(53,65))+i(70)+i(67)+i(80)+i(U(45,11))+i(8..."
}),
});
const data = await response.json();
curl -L \
-X POST \
-H 'Content-Type: application/json' \
-H 'X-RapidApi-Key: YOUR KEY' \
'https://datadome-cookie-api.p.rapidapi.com/solve' \
-H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36' \
-d '{"html":"<!DOCTYPE html><html lang=\"en\"><head> <meta charset=\"UTF-8\" /> <meta http-equiq=\"X-UA-Compatible\" content=\"IE=edge\" /> <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" /> <meta name=\"robots\" content=\"noindex\"> <title>Device check </title></head><body > <script> var ddm = { seed: '1c621b94-5e03-8ce7-58af-e7c253ce5788' , cid: '4c2wtp1lFtctMODoUQjpHuBsyReJe8LSAR1i0Vg_7uXEVJODdWRYUO3FDuCVQ4IrZSAcdv26hSs6xt1ndnbyYZP8hsO~XF69Iluo6ODtfD~Fzonr3F~tvOJg9EbYWb_3' , hash: 'A55FBF4311ED6F1BF9911EB71931D5' , env: '2da217dffad11f0d83ea286c771c9d1d4bbb7268eb04d254908ce20cf984340b2dc8fc5403eefba216109eaf0163ab0618e505ce0a1236034697bd71b81242ff' , b: 1239798, s: 17434, durationMs: 0, displayEnabled: false, dm: 'cd' , i18n: { l_device_check_restart_verification_hidden : 'Restart verification of your device' }, xddb: '1'};/* DataDome is a cybersecurity solution to detect bot activity @license https://datadome.co v1.13.3 38c3fee */;(function(){function e(e,t){return-9*(t&e)-11*(t&~e)+11*t+1*~(t&e)-1*~(t|e)}function t(e,t){return-5*(e&t)+12*(e&~t)+7*~(e&~t)+4*~(e|t)-6*~(e|~t)-11*~t}function n(e,t){return t=o[e],atob(t)}function a(n,a){return typeof(a=u[n])===i(115)+i(ut(375,259))+i(q(385,499))+i(105)+i(110)+i(dt(103,52))?function(n,a,r,c,o,u,s){var f,v,h;s=i(gt(52,81))+i(81)+i(dt(84,26))+i(82)+i(104)+i(69)+i(43)+i(72)+i(105)+i(Ce(572,450))+i(48)+i(t(0,78))+i(109)+i(101)+i(54)+i(68)+i(115)+(i(110)+i(117)+i(S(53,65))+i(70)+i(67)+i(80)+i(U(45,11))+i(8..."'
import requests
response = requests.post(
"https://datadome-cookie-api.p.rapidapi.com/solve",
headers={
"Content-Type":"application/json",
"X-RapidAPI-Key": "YOUR KEY",
# optional, but higly recommended
"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36"
},
json={
"html":"<!DOCTYPE html><html lang=\"en\"><head> <meta charset=\"UTF-8\" /> <meta http-equiq=\"X-UA-Compatible\" content=\"IE=edge\" /> <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" /> <meta name=\"robots\" content=\"noindex\"> <title>Device check </title></head><body > <script> var ddm = { seed: \'1c621b94-5e03-8ce7-58af-e7c253ce5788\' , cid: \'4c2wtp1lFtctMODoUQjpHuBsyReJe8LSAR1i0Vg_7uXEVJODdWRYUO3FDuCVQ4IrZSAcdv26hSs6xt1ndnbyYZP8hsO~XF69Iluo6ODtfD~Fzonr3F~tvOJg9EbYWb_3\' , hash: \'A55FBF4311ED6F1BF9911EB71931D5\' , env: \'2da217dffad11f0d83ea286c771c9d1d4bbb7268eb04d254908ce20cf984340b2dc8fc5403eefba216109eaf0163ab0618e505ce0a1236034697bd71b81242ff\' , b: 1239798, s: 17434, durationMs: 0, displayEnabled: false, dm: \'cd\' , i18n: { l_device_check_restart_verification_hidden : \'Restart verification of your device\' }, xddb: \'1\'};/* DataDome is a cybersecurity solution to detect bot activity @license https://datadome.co v1.13.3 38c3fee */;(function(){function e(e,t){return-9*(t&e)-11*(t&~e)+11*t+1*~(t&e)-1*~(t|e)}function t(e,t){return-5*(e&t)+12*(e&~t)+7*~(e&~t)+4*~(e|t)-6*~(e|~t)-11*~t}function n(e,t){return t=o[e],atob(t)}function a(n,a){return typeof(a=u[n])===i(115)+i(ut(375,259))+i(q(385,499))+i(105)+i(110)+i(dt(103,52))?function(n,a,r,c,o,u,s){var f,v,h;s=i(gt(52,81))+i(81)+i(dt(84,26))+i(82)+i(104)+i(69)+i(43)+i(72)+i(105)+i(Ce(572,450))+i(48)+i(t(0,78))+i(109)+i(101)+i(54)+i(68)+i(115)+(i(110)+i(117)+i(S(53,65))+i(70)+i(67)+i(80)+i(U(45,11))+i(8..."
}
)
data = response.json()
#
Response:
{
"payload": "NlveLWoNl4u5c08IrHs4i7Ir3zrPoGDNteQsP3JWm9ajz9HPZFN-vHXXgIXO2EuI1EiDA2jSqwVeKERYlXSkIt6EvUDk4mC3kd7_t7GOpdX_7QvJnXoszt839COBj1LeCmCgEHYBlscY2OtnVlBZeD8j3XJ4cBoYcWim8oPcGQvFENPXEaBEsnJO1M4P6w1XOIjV6y2Zgrr2jM8KBWGRZLxKhC5ycZ46BqFLHkBuBJQkf2KttXnnBTVeUfo....",
"cid": "4c2wtp1lFtctMODoUQjpHuBsyReJe8LSAR1i0Vg_7uXEVJODdWRYUO3FDuCV...",
"hash": "A55FBF4311ED6F1BF9911EB71931D5",
"referer": "https://www.footlocker.pt/en/product/~/314216975004.html",
"url": "https://www.footlocker.pt/en/product/~/314216975004.html",
"s": 17434,
"env": "2da217dffad11f0d83ea286c771c9d1d4bbb7268eb04d254908ce20c....",
"seed": "1c621b94-5e03-8ce7-58af-e7c253ce5788",
"b": 1239798,
"dm": "cd"
}
#
3. Ensuring Successful operation
Our API generates the necessary payload for the Datadome cookie. Your responsibility includes:
- Handling the subsequent POST request to the website
- Managing all further interactions with the website to complete the cookie retrieval process.
To ensure seamless navigation and payload posting:
- Utilize HTTP/2 as the protocol
- Provide a valid set of request headers that accurately mimic those of a legitimate browser, facilitating successful interaction with the website.