Cloudflare JSD solver API
Cloudflare JavaScript Detections run a script in the page and report back. This solver does that exchange for you and returns cf_clearance, with no browser involved.
- Price
- from €1.00 per 1,000 solves€2.50 before level discounts
- You send
- The page URL and your proxy
- You get
cf_clearance, the cookies and the user agent to use- Not covered
- Turnstile and the managed challenge
- Failed solves
- Free
What JavaScript Detections are
JavaScript Detections (JSD) are part of Cloudflare’s bot management. On HTML page views Cloudflare injects a lightweight script. The script runs quietly in the browser, reports what it found, and a visitor that passes receives a cf_clearance cookie. Site owners then write rules that require that cookie, so a client that never ran the script is blocked or challenged.
Because the script is only injected into HTML pages, the usual pattern is one solve to earn the clearance, followed by your own requests carrying the cookie. Cloudflare describes the feature in its JavaScript Detections documentation.
JSD, Turnstile and the managed challenge
Three Cloudflare products that are easy to confuse. A solver for one does not solve the others.
| Product | What the visitor sees | Status here |
|---|---|---|
| JavaScript Detections | Nothing. A script runs in the background | cloudflare.jsd, live |
| Turnstile | A widget on a form that returns a token | Not live yet |
| Managed challenge | A “Just a moment” page before the content | Not live yet |
If a site serves Turnstile or a managed challenge, a JSD solve returns solve_failed and costs nothing.
One request, one cookie
Send the URL and your proxy. The clearance comes back with the user agent it is tied to.
curl https://api.notabot.sh/v1/solve \
-H "x-api-key: $NOTABOT_KEY" \
-H "content-type: application/json" \
-d '{
"type": "cloudflare.jsd",
"url": "https://www.example.com/",
"proxy": "http://user:pass@host:port"
}'{
"ok": true,
"requestId": "req_7Hc2…",
"result": {
"cf_clearance": "…",
"cookies": { "cf_clearance": "…" },
"userAgent": "Mozilla/5.0 …",
"status": 200
},
"cost": 0.0025,
"costMicro": 2500,
"solveMs": 640
}Full reference: Cloudflare JSD docs. How to send the result: Using the result.
What makes the clearance hold
The same IP
The cookie is tied to the IP that earned it. Send your requests through the proxy you gave the solver, on a sticky session.
The same user agent
Use the returned user agent unchanged. A different string invalidates the clearance.
A Chrome-shaped client
Cloudflare also reads the TLS handshake. Use a client with a Chrome TLS fingerprint for your own requests.
How a site enforces JSD
Knowing what the site owner configured tells you where a solve is needed and how often. These points come from Cloudflare’s own documentation.
| What Cloudflare does | What it means for you |
|---|---|
| Injects the script on HTML page views only, not on AJAX calls. API and mobile app traffic is unaffected | Solve against a page URL, not an API endpoint. The clearance then rides on your API requests |
Serves the script from /cdn-cgi/challenge-platform/ | Seeing that path in the page source is the sign JSD is on |
Stores the outcome in cf_clearance and exposes it to rules as cf.bot_management.js_detection.passed | The cookie is what you carry. Without it the field is false |
| Does nothing with a failed result unless the owner writes a WAF rule on that field | Only the paths covered by that rule block you, so some endpoints may work without a solve |
| Has no JSD data on a new visitor’s first request | Owners are told not to enforce it on the first page, so the block often appears on a later request |
| Gives JSD a 15-minute lifespan and re-injects the script before it expires | Expect to solve again when the site starts challenging, rather than holding one cookie all day |
| Scores bots from other signals too. A passed JSD does not guarantee a good bot score | The IP, headers and TLS handshake still matter after the solve |
Source: Cloudflare, JavaScript Detections.
Using the cookies afterwards
The cookies work with the user agent they came with, from the IP that earned them, on a client that looks like that browser.
- Send every cookie in the result, and keep whatever the site sets afterwards. Some sites rotate them.
- Copy the returned user agent into your
user-agentheader exactly. - Stay on the same proxy. If the exit IP changes, the cookies stop working. Use a sticky session.
- Connect like Chrome. Stock Node, Python and Go clients handshake differently from Chrome, and a site can drop good cookies that arrive that way. Use curl-impersonate, httpcloak, tls-client or a real browser for your own requests.
- Reuse the result until it stops working. The site decides how long cookies last. Solve again when challenges come back, not before every request.
| Limit | Value | Note |
|---|---|---|
| Solve timeout | 30 seconds | Set your own client timeout to 60 seconds so it outlasts ours |
| Typical solve time | 2 to 10 seconds | Mostly round trips through your proxy. Our own work is well under a second |
| Requests per second | 50 per key, 200 per account | Over it you get rate_limited with a retry-after header |
| Proxy format | http://user:pass@host:port | SOCKS is not supported. Residential or mobile IPs clear far more often than datacenter ones |
Worked example in Node: Using the result. All limits: Limits.
When a solve fails
A failed solve is never charged. The response names the reason, and each one has a specific fix.
| Reason | What it means | What to do |
|---|---|---|
CHALLENGE_NOT_FOUND | The page loaded but the protection script was not on it. The URL may not sit behind this solver's protection. | Check the URL is an HTML page behind JSD. Turnstile and the managed challenge are different products. |
NOT_CHALLENGED | The site did not challenge this IP, so there was nothing to solve. Fetch the page directly. | Fetch the page directly. There was nothing to solve. |
GATE_NOT_CLEARED | The answer was valid but the site still held the session back. Nearly always a flagged IP. Retry on a fresh one. | Retry on a fresh residential or mobile IP. |
BLOCKED | The site refused the request before any challenge was shown. Usually the IP. | Change IP. Datacenter and already-flagged IPs cause most of these. |
TRANSPORT_ERROR | The proxy or the site dropped the connection. Retry, ideally on a new IP. | Retry, ideally on a new IP. |
domain_not_allowed | The domain is not approved for your account yet. | Request the site on the Sites page. |
Every code and reason: error reference.
Cloudflare JSD pricing
€2.50 per 1,000 successful solves, and less as your lifetime top-ups grow. No subscription, credits never expire, and a solve that fails is not charged.
| Topped up in total | Level | You pay |
|---|---|---|
| Under €100 | List price | €2.50 |
| From €100 | −20% | €2.00 |
| From €250 | −30% | €1.75 |
| From €500 | −40% | €1.50 |
| From €1,000 | −50% | €1.25 |
| From €2,500 | −55% | €1.125 |
| From €5,000 | −60% | €1.00 |
- Top up from €10 by card. The balance works for every solver.
- A level counts everything you have ever topped up, and it never drops.
- The price is reserved when you call and released if the solve fails.
- Each key can carry its own daily, monthly or total spend limit.
An API call instead of a headless browser
| notabot API | Headless browser | |
|---|---|---|
| What you run | One HTTPS request | A Chrome instance per session, plus the servers under it |
| When the protection updates | We patch the solver. Your code is unchanged | You patch stealth plugins and redeploy |
| What you pay for | Successful solves only | CPU, memory and bandwidth, whether or not the page passes |
| Scaling up | Send more requests | Add more machines |
Cloudflare JSD solver: questions
What is Cloudflare JSD?
JavaScript Detections is a Cloudflare bot-management feature. Cloudflare injects a small script into HTML pages, the script runs in the browser and reports back, and a visitor that passes is given a cf_clearance cookie.
Is JSD the same as Turnstile or the "Just a moment" challenge?
No. Turnstile is a widget that returns a token, and the managed challenge is the interstitial page a visitor has to wait through. They are different Cloudflare products and a JSD solve does not clear them. If the site serves one of those you get solve_failed, which is free.
What do I send and what do I get?
You send the page URL and your proxy. You get cf_clearance, the full set of cookies to send, the user agent the clearance is tied to, and the status of the page after the solve.
Why does the solver need my proxy?
The clearance is tied to the IP that earned it. Solving through your proxy makes the cookie valid for the IP you will send your own requests from. Use a sticky session, because a rotating pool breaks the cookie when the IP changes.
Can I change the user agent afterwards?
No. The clearance is tied to the user agent returned with it. Use that string unchanged, with a client whose TLS fingerprint matches Chrome.
What does it cost?
€2.50 per 1,000 successful solves at list price and €1.00 at the top discount level. Failed solves are not charged.
Can I use it on any site?
Each domain is approved once before it can be solved, usually within a day. Subdomains of an approved domain are covered.
Other solvers
- Akamai solverSolve the Akamai sbsd challenge and the edge fingerprint screen without a browser.
- Akamai SBSD solverSend the sbsd challenge script, get the payload that answers it in about a second.
- Akamai edge solverClear the Akamai “Unusual Traffic Detected” fingerprint screen and get the real page’s cookies.
- Cloudflare solverGet a cf_clearance cookie from Cloudflare JavaScript Detections with one API call.
- Queue-it BotDeflector solverSolve the Queue-it BotDeflector challenge from a flow token and get a ready-to-send redeem request.
- Ticketmaster tmpt solverBuild the reCAPTCHA Enterprise reload body that mints the Ticketmaster tmpt cookie.
Page updated . Reference for every solver: documentation.
Try it on your own target.
Login, copy a key, send one request. If the solve fails, it costs you nothing.