# Bypass DataDome — OpenScraper Anti-bot Cookies API

*HTML page: https://openscraper.ai/bypass-datadome-api · Agent index: https://openscraper.ai/llms.txt*

> Bypass DataDome on any website with one API call. The Anti-bot Cookies module solves the DataDome challenge once and returns a valid, replayable session — the `datadome` cookie plus the user agent, `Accept-Language` header and TLS profile it was issued under. You replay it on as many pages as it lasts and pay $0.0085 per session with the Super User subscription ($0.01 without), not a fee per request.

## What it does

The module `antibot_cookies_matrix` earns a real DataDome session through your own sticky proxy and hands it back. It does not fetch your pages: you replay the session yourself, with plain HTTP.

- A valid `datadome` cookie, ready to replay
- The DataDome CAPTCHA solved for you
- One session, many pages
- Billed per session, not per page
- Replay with plain HTTP — no browser

## How the DataDome bypass works

1. **DataDome scores a visitor, then hands out a cookie.** On the first visit its client-side tag collects the browser's signals (canvas, WebGL, fonts, event timings, the TLS handshake) and, if the visitor looks human or passes the `captcha-delivery.com` slider, issues a `datadome` cookie. Later requests pass as long as they carry that cookie and still look like the visitor who earned it.
2. **The cookie is earned once, through your proxy.** You send the target URL and a sticky proxy. The solver opens the page through that exit IP with a genuine proof of browser and clears the challenge when one is served.
3. **You get the whole session back.** A cookie alone is rejected as soon as the request around it stops matching, so the API returns `cookies`, `user_agent`, `accept_language` and `impersonate` (the TLS profile, e.g. `chrome146`, `firefox147`).
4. **You replay the session yourself.** Same proxy, same headers, same TLS profile: an ordinary HTTP request from your own code, not billed by OpenScraper.
5. **You solve again only when the session is rejected.** A 403 or the CAPTCHA page means the session is over; request a new one and carry on.

## Cost compared with an unlocker

| | With subscription | Without subscription |
|---|---|---|
| Anti-bot Cookies | $0.0085 per DataDome session | $0.01 per DataDome session |
| Web Unlocker | $0.81 per 1,000 requests | $0.95 per 1,000 requests |

An unlocker bypasses DataDome again on every request and bills every request. With session cookies the bypass is paid once. Cost of 1,000 pages, at the subscription rates:

| Pages replayed per session | Sessions for 1,000 pages | Anti-bot Cookies | Unlocker |
|---|---|---|---|
| 10 | 100 | $0.85 | $0.81 |
| 50 | 20 | $0.17 | $0.81 |
| 100 | 10 | $0.085 | $0.81 |
| 500 | 2 | $0.017 | $0.81 |

One session costs as much as about 11 unlocker requests: below that many pages per session the unlocker is cheaper, above it session cookies win. How many pages a session lasts depends on the target site and on your request rate, and the proxy traffic of the replays is yours to provide.

## Session cookies or unlocker

Pick Anti-bot Cookies when you fetch many pages from the same DataDome-protected site, the data is in the HTML or in a JSON API, and you already have sticky residential or ISP proxies.

Pick the [DataDome Unlocker](https://openscraper.ai/datadome-unlocker.md) when you fetch a handful of pages, the page needs JavaScript rendering, or you do not want to manage proxies.

## API

```python
# pip install requests curl_cffi
import requests
from curl_cffi import requests as browser

API_KEY = "sk_live_xxx"
# A STICKY proxy: the solve and every replay must leave from the same IP.
PROXY = "http://user:pass@host:port"


def solve(url):
    """Pay once: bypass DataDome and get a replayable session back."""
    response = requests.post(
        "https://api.openscraper.ai/runs",
        headers={"Authorization": f"Bearer {API_KEY}"},
        json={
            "module": "antibot_cookies_matrix",
            "params": {"url": url, "proxy": PROXY, "challenge": "datadome"},
            "sync": True,
        },
        timeout=180,  # a solve can take up to two minutes
    )
    response.raise_for_status()
    return response.json()["result"][0]


def fetch(url, session):
    """Free of charge: replay the session exactly as it was minted."""
    return browser.get(
        url,
        cookies=session["cookies"],
        headers={
            "User-Agent": session["user_agent"],
            "Accept-Language": session["accept_language"],
        },
        impersonate=session["impersonate"],  # same TLS profile as the solve
        proxies={"http": PROXY, "https": PROXY},  # same exit IP as the solve
        timeout=30,
    )


session = solve("https://example.com/")

for page in range(1, 201):
    url = f"https://example.com/listings?page={page}"
    response = fetch(url, session)

    if response.status_code == 403:  # DataDome ended the session: solve again
        session = solve(url)
        response = fetch(url, session)

    print(page, response.status_code, len(response.text))
```

| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| `url` | string | yes | — | The target URL to harvest a session for. |
| `proxy` | string | yes | — | Your sticky proxy URL (`http://user:pass@host:port`). Replay through the same one. |
| `challenge` | string | no | `datadome` | `datadome`, `cloudflare`, `akamai`, `perimeterx`, `aws_waf`, `turnstile`. |

The result carries `cookies`, `user_agent`, `impersonate`, `accept_language`, `proxy_host` and `proxy_session`. The proxy password is never returned or stored. Full reference: <https://openscraper.ai/docs.md>.

## FAQ

**How do you bypass DataDome?** By earning a real DataDome session instead of faking one: the solver loads the page through your proxy with a genuine proof of browser, clears the CAPTCHA if served, and returns the session to replay.

**Why is this cheaper than a web unlocker?** The costly step happens once. You pay $0.0085 for the session with the Super User subscription ($0.01 without), and every page replayed with it is a plain HTTP request that is not billed. From about the twelfth page per session onwards you are ahead.

**Why do I have to bring my own proxy?** A DataDome cookie is bound to the exit IP that earned it. The solve and the replays must share the same sticky IP; a rotating proxy fails every time.

**How long does a session stay valid?** There is no fixed lifetime. Treat a 403 or the CAPTCHA page as the signal to request a new session.

**How long does a solve take?** Usually 30 to 60 seconds, up to two minutes on a hard challenge.

## Responsible and lawful use

OpenScraper is a neutral technical tool: you choose the target sites, the data and what you do with it, and you are responsible for using it lawfully.

- **Publicly accessible data** — Collect data that anyone can see. Never use the service to reach content you are not entitled to access, or to break into a system.
- **Personal data (GDPR)** — If you collect personal data, you are its data controller: set a legal basis, a purpose and a retention period. Sensitive data and data about minors are off limits.
- **Databases and copyright** — Do not extract or reuse a substantial part of a protected database, or copyrighted content, without the rights holder's permission.
- **Respect for target sites** — Check the terms of the sites you collect from and keep a reasonable request rate: never degrade or overload a site.

We refuse or suspend any extraction that appears manifestly unlawful. Full rules: [Terms of Use](https://openscraper.ai/terms).
