Skip to main content
Send a protected URL to Fetch with mode=auto and get the page a real visitor sees, not the challenge screen. Reach for this recipe whenever a plain request returns a block page, a CAPTCHA or a REQS002 error. Uses: Fetch with Adaptive Stealth Mode (mode=auto), js_render and premium_proxy

Ask your AI agent

With the Zenrows MCP server connected to Claude, Cursor or any MCP client, paste this prompt. Your agent picks the right Zenrows tools and settings on its own.

Let Adaptive Stealth Mode pick the configuration

Set mode=auto. Zenrows starts with the cheapest configuration, adds JavaScript rendering and premium proxies only when the page needs them, and bills only the configuration that returns the page.
The cURL command prints the response headers and saves the page to page.html. The CLI uses mode=auto by default and prints the billed credits after every request.

Example output

The CLI’s --json result carries the same numbers:

Read which configuration was billed

Every Fetch response carries the charge in its headers, so you can log it next to each URL: With mode=auto, the billed credits tell you which configuration succeeded: 1 for a basic request, 5 with JavaScript rendering, 10 with premium proxies, 25 with both. A domain that always bills 25 is a good candidate for the fixed configuration below. Requests that don’t succeed aren’t charged.

Fix the configuration with js_render and premium_proxy

When you already know a domain needs the full stack, set js_render=true and premium_proxy=true yourself. Every request then goes straight to that configuration. Send these parameters instead of mode=auto, never together with it.
The same code works on Cloudflare-protected pages: swap the URL for https://www.scrapingcourse.com/cloudflare-challenge and check for You bypassed the Cloudflare challenge.

Customize it

Troubleshooting

  • 400 with code REQS002: the domain needs JavaScript rendering, premium proxies or both. Send mode=auto, or add js_render=true and premium_proxy=true. See REQS002.
  • 400 with code REQS004 mentioning mode: js_render or premium_proxy was sent together with mode=auto. Keep one approach per request.
  • 422 with code RESP001: the page did not come back on that attempt. Retry with backoff and, on a fixed configuration, switch to mode=auto. See Retry failed requests.
  • 499 or a client-side timeout: your HTTP client gave up first. Set its timeout to 180 seconds or more.
  • The page loads but a section is empty: the content arrives after the first render. Add wait_for with a selector of that section.

Scrape JavaScript-rendered pages

Render the page and wait for the exact element you need.

Retry failed requests

Back off, retry and escalate to mode=auto on 422.

Get content as seen from any country

Route the request through a residential IP in any country.

Track usage and control spend

Pick the cheapest configuration that works for each domain.