Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,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.
Expand Down
4 changes: 4 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,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;
Expand Down
Loading