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

# Generate interstitial

> Generate the ordered form body for a fetched DataDome interstitial page.

An interstitial is DataDome's automatic device check (`rt: "i"`, the `i.js`
loader, or a `/interstitial/` device URL). Set `task` to `datadome` and `mode`
to `interstitial`. The response `payload` is already serialized in DataDome's
required form order — submit it unchanged.

```bash theme={null}
curl --request POST \
  --url "https://api.evade.now/solve" \
  --header "authorization: Bearer $EVADE_API_KEY" \
  --header "content-type: application/json" \
  --data-raw '{
    "task": "datadome",
    "mode": "interstitial",
    "session_id": "0123456789abcdef0123456789abcdef",
    "device_link": "https://geo.captcha-delivery.com/interstitial/?initialCid=...&hash=...&cid=...&referer=...",
    "html": "<!DOCTYPE html><html>...exact fetched interstitial HTML...</html>",
    "script": "...exact fetched external challenge bundle source..."
  }'
```

Send `device_link` and `html` from the current fetch. When the HTML references
an external challenge bundle, fetch it through the same target session and send
its exact response body as the singular `script` field. Omit `script` when the
challenge bundle is inline. Evade derives the external script URL from the HTML
and does not fetch the page or bundle for you.

<Warning>
  The legacy `page`, `document_url`, `document_navigation_start_ms`, and
  `scripts` fields are not accepted by this contract.
</Warning>

## 1. Obtain the device URL

If the blocked response is JSON with a `captcha-delivery.com` URL, use it
unchanged. For an HTML block page, build it from the `dd` object and the blocked
response's `datadome` cookie, percent-encoding each query value and preserving
any extra values the current loader emits:

```text theme={null}
https://{dd.host}/interstitial/?initialCid={dd.cid}&hash={dd.hsh}&cid={cookie}&referer={blocked_url}&s={dd.s}&b={dd.b}&dm=cd
```

## 2. Fetch the device page and bundle

Fetch the device URL through the same proxy, User-Agent, and cookie jar. Send the
final fetched URL as `device_link`, the exact response body as `html`, and the
`session_id`. Evade generates navigation timing internally.

If the HTML references an external challenge script, fetch that script through
the same target session and send only its exact response body as `script`. Do
not send a script URL or an array. If the challenge code is inline, omit
`script`.

Reuse the `session_id` returned by the tags solve so the interstitial uses the
same fingerprint and location identity.

## 3. Submit to DataDome

POST the returned `payload` to the device URL **without its query string** (e.g.
`https://geo.captcha-delivery.com/interstitial/`) using
`Content-Type: application/x-www-form-urlencoded; charset=UTF-8`, the returned
`headers`, and the same client. Install the returned cookie into the jar and
retry the protected request.

| Result | Meaning |
| - | - |
| `view: "redirect"` with one `datadome` cookie | Accepted; retry the protected request |
| `view: "captcha"` with a `/captcha/` URL | Keep the session and continue with the slider flow |
| HTTP `400` from Evade | Required interstitial, fingerprint, or source evidence is inconsistent |
| DataDome response without an accepted cookie | Not a success; inspect the full target response |


## OpenAPI

````yaml datadome-openapi.yaml POST /solve
openapi: 3.1.0
info:
  title: Evade DataDome API
  version: 1.0.0
  description: Generate request material for DataDome tags, interstitial, and slider flows.
servers:
  - url: https://api.evade.now
security:
  - bearerAuth: []
paths:
  /solve:
    post:
      summary: Generate DataDome payload
      description: >-
        Generate tags, interstitial, or slider request material selected by
        mode.
      operationId: solveDataDome
      requestBody:
        required: true
        content:
          application/json:
            schema:
              oneOf:
                - $ref: '#/components/schemas/TagsSolveRequest'
                - $ref: '#/components/schemas/InterstitialSolveRequest'
                - $ref: '#/components/schemas/CaptchaSolveRequest'
              discriminator:
                propertyName: mode
                mapping:
                  tags: '#/components/schemas/TagsSolveRequest'
                  interstitial: '#/components/schemas/InterstitialSolveRequest'
                  captcha: '#/components/schemas/CaptchaSolveRequest'
            examples:
              tags:
                summary: Start a session and generate tags telemetry
                value:
                  task: datadome
                  mode: tags
                  user_agent: >-
                    Mozilla/5.0 (...the exact User-Agent your target client
                    sends...)
                  accept_language: en-US,en;q=0.9
                  cid: ''
                  ddk: A55FBF4311ED6F1BF9911EB71931D5
                  referer: https://www.example.com/
                  tags_type: ch
                  script: ...exact tags.js source the page loaded...
                  ip: 203.0.113.10
              interstitial:
                summary: Generate an interstitial device check
                value:
                  task: datadome
                  mode: interstitial
                  session_id: 0123456789abcdef0123456789abcdef
                  device_link: >-
                    https://geo.captcha-delivery.com/interstitial/?initialCid=...&hash=...&cid=...&referer=...
                  html: >-
                    <!DOCTYPE html><html>...exact fetched interstitial
                    HTML...</html>
                  script: ...exact external challenge bundle source...
              captcha:
                summary: Generate a slider captcha check
                value:
                  task: datadome
                  mode: captcha
                  session_id: 0123456789abcdef0123456789abcdef
                  page: <!DOCTYPE html><html>...fetched captcha HTML...</html>
                  document_url: >-
                    https://geo.captcha-delivery.com/captcha/?initialCid=...&hash=...&cid=...&referer=...
                  parent_url: https://www.example.com/protected
      responses:
        '200':
          description: Requested DataDome material generated.
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/TagsSolveResponse'
                  - $ref: '#/components/schemas/InterstitialSolveResponse'
                  - $ref: '#/components/schemas/CaptchaSolveResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  schemas:
    TagsSolveRequest:
      type: object
      required:
        - task
        - mode
        - ddk
        - referer
        - tags_type
        - script
      anyOf:
        - required:
            - session_id
        - required:
            - user_agent
            - accept_language
            - ip
      additionalProperties: false
      properties:
        task:
          type: string
          const: datadome
          description: Solver router discriminator. Must be `datadome`.
        mode:
          type: string
          const: tags
        session_id:
          type: string
          description: Opaque ID returned by an earlier solve. Omit on the first solve.
        user_agent:
          type: string
          description: Exact target User-Agent. Required when session_id is omitted.
        accept_language:
          type: string
          description: >-
            Exact target Accept-Language header. Required when session_id is
            omitted; navigator.languages is derived server-side.
        cid:
          type: string
          description: Current datadome cookie value, or an empty string on a fresh visit.
        ddk:
          type: string
          description: Site key observed in the site's genuine /js/ request.
        referer:
          type: string
          format: uri
        tags_type:
          type: string
          enum:
            - ch
            - le
        script:
          type: string
          description: >-
            Exact tags.js source the page loaded, fetched through the same
            connection. Its build defines the beacon's field order and the ddv
            version, so send the bytes unchanged.
        ip:
          type: string
          description: >-
            Public IP that will submit the beacon. On the first solve, Evade
            resolves its timezone and country through MaxMind.
        hsv:
          description: Current window._hsv value when the page defines it.
        correlation_id:
          type:
            - string
            - 'null'
          description: Page correlation callback result; omit when unpublished.
        local_storage_session:
          type: boolean
          default: false
    InterstitialSolveRequest:
      type: object
      required:
        - task
        - mode
        - device_link
        - html
      anyOf:
        - required:
            - session_id
        - required:
            - user_agent
            - accept_language
            - ip
      additionalProperties: false
      properties:
        task:
          type: string
          const: datadome
          description: Solver router discriminator. Must be `datadome`.
        mode:
          type: string
          const: interstitial
        session_id:
          type: string
          description: Opaque ID returned by the tags solve for this target session.
        user_agent:
          type: string
          description: Exact target User-Agent. Required when session_id is omitted.
        accept_language:
          type: string
          description: >-
            Exact target Accept-Language header. Required when session_id is
            omitted; navigator.languages is derived server-side.
        ip:
          type: string
          description: >-
            Public IP for the target session. Required when session_id is
            omitted; Evade resolves timezone and country through MaxMind.
        device_link:
          type: string
          format: uri
          description: >-
            Final DataDome interstitial URL fetched by the target session,
            including its query string.
        html:
          type: string
          description: Exact response body fetched from device_link.
        script:
          type: string
          description: >-
            Exact external challenge bundle source referenced by the HTML.
            Required when the page uses an external bundle and must be omitted
            when the bundle is inline. Evade derives its URL from the HTML and
            makes no target fetches.
    CaptchaSolveRequest:
      type: object
      required:
        - task
        - mode
        - session_id
        - page
        - document_url
        - parent_url
      additionalProperties: false
      properties:
        task:
          type: string
          const: datadome
          description: Solver router discriminator. Must be `datadome`.
        mode:
          type: string
          const: captcha
        session_id:
          type: string
          description: Opaque ID returned by the tags solve for this target session.
        user_agent:
          type: string
          description: Exact target User-Agent. Required when session_id is omitted.
        accept_language:
          type: string
          description: >-
            Exact target Accept-Language header. Required when session_id is
            omitted; navigator.languages is derived server-side.
        ip:
          type: string
          description: >-
            Public IP for the target session. Required when session_id is
            omitted; Evade resolves timezone and country through MaxMind.
        page:
          type: string
          description: Exact fetched captcha HTML.
        script:
          type: string
          description: >-
            Optional exact external Browserify script referenced by the captcha
            page. Fetch it through the same target session when the HTML does
            not contain the bundle inline.
        document_url:
          type: string
          format: uri
        parent_url:
          type: string
          format: uri
          description: Protected page that owns the captcha.
    TagsSolveResponse:
      type: object
      required:
        - session_id
        - payload
      properties:
        session_id:
          type: string
          description: >-
            Carry this opaque ID into every later solve for the same target
            session.
        expires_in_seconds:
          type: integer
          description: Present when this solve created the session.
        client_hints:
          $ref: '#/components/schemas/SessionClientHints'
          description: Transport projection present when this solve created the session.
        device_memory:
          type: integer
          description: Present when this solve created the session.
        payload:
          type: string
          description: >-
            Complete ordered application/x-www-form-urlencoded request body.
            Submit it unchanged.
    InterstitialSolveResponse:
      type: object
      required:
        - payload
        - headers
      properties:
        payload:
          type: string
          description: >-
            Complete ordered application/x-www-form-urlencoded request body.
            Submit it unchanged.
        headers:
          type: object
          description: >-
            Fingerprint-bound client-hint headers to use when submitting the
            payload. Safari profiles return an empty object.
          additionalProperties:
            type: string
    CaptchaSolveResponse:
      type: object
      required:
        - payload
        - headers
      properties:
        payload:
          type: string
          format: uri
          description: Complete DataDome captcha check URL to submit unchanged.
        headers:
          type: object
          description: >-
            Fingerprint-bound client-hint headers to use when submitting the
            payload. Safari profiles return an empty object.
          additionalProperties:
            type: string
    SessionClientHints:
      type: object
      required:
        - architecture
        - bitness
        - mobile
        - model
        - platform
        - platformVersion
        - uaFullVersion
        - wow64
      properties:
        architecture:
          type: string
        bitness:
          type: string
        mobile:
          type: boolean
        model:
          type: string
        platform:
          type: string
        platformVersion:
          type: string
        uaFullVersion:
          type: string
        wow64:
          type: boolean
    ErrorResponse:
      type: object
      required:
        - success
        - error
      properties:
        success:
          type: boolean
          const: false
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              example: invalid_request
            message:
              type: string
  responses:
    BadRequest:
      description: The request or current-session evidence is invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unauthorized:
      description: A valid bearer API key is required.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Evade API key

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.