> ## Documentation Index
> Fetch the complete documentation index at: https://docs.scrapely.io/llms.txt
> Use this file to discover all available pages before exploring further.

# DataDome

> Solve DataDome CAPTCHA challenges and retrieve the required cookies.

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST https://api.scrapely.io/v2/tasks/create \
    -H "Content-Type: application/json" \
    -H "X-API-Key: YOUR_API_KEY" \
    -d '{
      "captcha": {
        "websiteURL": "https://example.com",
        "CaptchaURL": "https://geo.captcha-delivery.com/captcha/?initialCid=...",
        "type": "DataDome"
      },
      "options": {
        "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36..."
      }
    }'
  ```

  ```python Python (Sync) theme={null}
  from scrapely import Scrapely

  client = Scrapely(api_key="YOUR_API_KEY")

  task = client.datadome.solve(
      website_url="https://example.com",
      captcha_url="https://geo.captcha-delivery.com/captcha/?initialCid=..."
  )

  # DataDome returns the solution (cookie value)
  print(task.result.solution)
  ```

  ```python Python (Async) theme={null}
  import asyncio
  from scrapely import AsyncScrapely

  async def main():
      client = AsyncScrapely(api_key="YOUR_API_KEY")

      task = await client.datadome.solve(
          website_url="https://example.com",
          captcha_url="https://geo.captcha-delivery.com/captcha/?initialCid=..."
      )

      print(task.result.solution)

  asyncio.run(main())
  ```
</CodeGroup>

## Request fields

### captcha

| Field        | Type   | Required | Description                                                                                      |
| ------------ | ------ | -------- | ------------------------------------------------------------------------------------------------ |
| `websiteURL` | string | Yes      | URL of the page with the CAPTCHA. Must start with `http://` or `https://`.                       |
| `CaptchaURL` | string | Yes      | The DataDome CAPTCHA URL (usually starting with `https://geo.captcha-delivery.com/captcha/...`). |
| `type`       | string | Yes      | Must be `"DataDome"`.                                                                            |

### options

| Field        | Type   | Default | Description                                            |
| ------------ | ------ | ------- | ------------------------------------------------------ |
| `user_agent` | string | `null`  | The User-Agent string to use when solving the CAPTCHA. |

### proxy (optional)

| Field      | Type    | Required | Description                           |
| ---------- | ------- | -------- | ------------------------------------- |
| `scheme`   | string  | Yes      | Proxy scheme (e.g. `http`, `socks5`). |
| `host`     | string  | Yes      | Proxy host.                           |
| `port`     | integer | Yes      | Proxy port.                           |
| `username` | string  | No       | Proxy username.                       |
| `password` | string  | No       | Required if `username` is provided.   |

## Response

```json theme={null}
{
  "success": true,
  "task_id": "96bbb830-dd6d-4dba-b609-1b3a2d94f9d9",
  "status": "completed",
  "created_at": "2026-04-10T16:46:47.436549+00:00",
  "result": {
    "solution": "datadome=zjSkplk0J5_lQH06mx8ap7xFEQ4hGytKglhc_mHwXbeQQzy37TrLx_rohLIq53wPeKgxG~RgdoXK7aIMvos30YaZB2nGbgNQ1VPFI_8QsMRAFWULq5CApKzqglK7u7XS"
  },
  "completed_at": "2026-04-10T16:46:57.684112+00:00"
}
```

<Info>
  The `solution` returned contains the `datadome` cookie required to bypass the challenge. Pass this cookie in your subsequent requests.
</Info>
