> For the complete documentation index, see [llms.txt](https://docs.apexsolutions.lol/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.apexsolutions.lol/api-reference/cloudflare-js-d.md).

# Cloudflare JS-D

Solve the Cloudflare JS-D challenge and get the cf\_clearance cookie.

Solves the Cloudflare JavaScript Detections challenge for a target behind it and returns the `cf_clearance` cookie (and `__cf_bm` when Cloudflare sends it).

### What you get back

The response carries the clearance under `result`: `cf_clearance` plus any extra cookies Cloudflare set during the solve (`__cf_bm`), the submission status code, and the User-Agent the solve was built for.

### Replaying the clearance

Attach the returned cookies to your requests with the **same User-Agent and the same proxy** that obtained them. JS-D has no follow-up requests — there is no session id and no flush endpoint.

## Solve the JS-D challenge

> Fetches the target, reads the inline \`\_\_CF$cv$params\` block, and runs\
> the JS-D challenge through your sticky proxy. Returns the\
> \`cf\_clearance\` cookie to replay on the protected site.<br>

```json
{"openapi":"3.0.3","info":{"title":"Cloudflare JS-D","version":"1.0.0"},"tags":[{"name":"Cloudflare JS-D","description":"Solves the Cloudflare JavaScript Detections challenge for a target\nbehind it and returns the `cf_clearance` cookie (and `__cf_bm` when\nCloudflare sends it).\n\n## What you get back\n\nThe response carries the clearance under `result`: `cf_clearance` plus\nany extra cookies Cloudflare set during the solve (`__cf_bm`), the\nsubmission status code, and the User-Agent the solve was built for.\n\n## Replaying the clearance\n\nAttach the returned cookies to your requests with the **same User-Agent\nand the same proxy** that obtained them. JS-D has no follow-up requests —\nthere is no session id and no flush endpoint.\n"}],"servers":[{"url":"https://jsd.apexsolutions.lol"}],"paths":{"/payload":{"post":{"tags":["Cloudflare JS-D"],"summary":"Solve the JS-D challenge","description":"Fetches the target, reads the inline `__CF$cv$params` block, and runs\nthe JS-D challenge through your sticky proxy. Returns the\n`cf_clearance` cookie to replay on the protected site.\n","parameters":[{"name":"Content-Type","in":"header","required":true,"description":"The Content-Type of the request body.","schema":{"type":"string","enum":["application/json"]}},{"name":"Authorization","in":"header","required":true,"description":"Your API key for authentication.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsdSolveRequest"}}}},"responses":{"200":{"description":"Challenge solved. The clearance cookies are under `result`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsdSolveResponse"}}}},"400":{"description":"Missing or invalid request. See the error envelope for the reason.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Proxy connection failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"schemas":{"JsdSolveRequest":{"type":"object","required":["params","proxy"],"properties":{"params":{"type":"object","required":["url","challenge","user_agent"],"properties":{"url":{"type":"string","description":"Full URL of the target behind Cloudflare JS-D."},"challenge":{"type":"string","enum":["jsd"],"description":"The challenge type to solve. Only `jsd` is supported; `managed` and `turnstile` are rejected with a clear error."},"user_agent":{"type":"string","description":"Your real Google Chrome on Windows User-Agent (Core Requirements)."}}},"proxy":{"type":"string","description":"Sticky proxy whose IP matches your final requests. Required."}}},"JsdSolveResponse":{"type":"object","properties":{"solve_id":{"type":"string","description":"Identifier of the solve."},"status":{"type":"string","description":"Always `succeeded` on a 200."},"provider":{"type":"string","description":"Always `cloudflare_jsd`."},"result":{"type":"object","properties":{"cf_clearance":{"type":"string","description":"The clearance cookie. Replay it with the same User-Agent and proxy."},"cookies":{"type":"array","description":"Cookie name/value pairs Cloudflare set during the solve (`cf_clearance`, `__cf_bm`).","items":{"type":"array","items":{"type":"string"}}},"status_code":{"type":"integer","description":"Status code of the challenge submission (200 on success)."},"user_agent":{"type":"string","description":"The User-Agent the solve was built for — replay the clearance with it."}}}}},"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code."},"message":{"type":"string","description":"Human-readable error message."}}}}}}}}
```
