From 4a70f1b64b127d0c1d834152c05c31dc37f60ce2 Mon Sep 17 00:00:00 2001 From: Ander Date: Thu, 20 Aug 2026 19:09:13 +0200 Subject: [PATCH] Type and document Adaptive Stealth Mode (mode=auto) mode: "auto" already worked via ZenRowsConfig's index signature - this just gives it a typed field for discoverability/autocomplete, plus a README section. ZenRows starts with the cheapest viable request configuration and escalates to js_render/premium_proxy only when the target needs it, billing only for what succeeds. Verified live against the real API. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01DTXXBERPGEnYiYP4Mt3FjF --- README.md | 10 ++++++++++ src/index.ts | 4 ++++ 2 files changed, 14 insertions(+) diff --git a/README.md b/README.md index b2567ce..163f42e 100644 --- a/README.md +++ b/README.md @@ -99,6 +99,16 @@ You can also pass optional parameters and headers; the list above is a reference Sending headers to the target URL will overwrite our defaults. Be careful when doing it and contact us if there is any problem. +### Adaptive Stealth Mode + +Set `mode: "auto"` to let ZenRows pick the request configuration for you — it starts with the cheapest viable setup and escalates to `js_render`/`premium_proxy` only when the target needs it, billing only for the configuration that succeeds. + +```javascript +const response = await client.get(url, { mode: "auto" }); +``` + +Compatible with `proxy_country`, `js_instructions`, and `custom_headers`. + ### POST Requests The SDK also offers POST requests by calling the `client.post` method. It can receive a new parameter `data` that represents the data sent in, for example, a form. diff --git a/src/index.ts b/src/index.ts index 33b1455..7d08c6c 100644 --- a/src/index.ts +++ b/src/index.ts @@ -11,6 +11,10 @@ interface ClientConfig { retries?: number; } export interface ZenRowsConfig { + /** Set to "auto" to enable Adaptive Stealth Mode — ZenRows starts with the cheapest + * viable request configuration and escalates to js_render/premium_proxy only when the + * target needs it, billing only for the configuration that succeeds. */ + mode?: "auto"; autoparse?: boolean; css_extractor?: string; js_render?: boolean;