> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zenrows.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> The Zenrows HTTP API serves Fetch and Extract (extract=auto) at https://api.zenrows.com/v1/, Crawl at https://api.zenrows.com/v1/crawls, and Batch at https://async.api.zenrows.com/v1. Fetch, Extract, Crawl and Batch are described in OpenAPI 3.1 at https://www.zenrows.com/openapi.json and listed in the RFC 9727 API catalog at https://www.zenrows.com/.well-known/api-catalog. Every endpoint also has its own page under /api-reference with its schema. Use the spec for exact parameter names and types. Crawl's endpoints, parameters and errors are also at https://docs.zenrows.com/crawl/endpoints.md. To call Zenrows from an agent, connect the MCP server at https://mcp.zenrows.com/mcp. To search these docs from an agent, connect the docs MCP server at https://docs.zenrows.com/mcp. Agent skills for Zenrows are published at https://github.com/ZenRows/cli and install with `npx skills add ZenRows/cli`.

# Introduction to the Node.js SDK

> Official Zenrows Node.js SDK for Fetch. Handles authentication, retries, and concurrency so you can scrape with less boilerplate.

The [Zenrows Node.js SDK](https://www.npmjs.com/package/zenrows) (npm package `zenrows`) is a lightweight client for [Fetch](https://docs.zenrows.com/fetch/setup.md). It wraps the native [`fetch`](https://nodejs.org/api/globals.html#fetch) API, adding automatic retries and a built-in concurrency queue on top.

> [!NOTE]
>
> Every call returns a standard `Response` object, the same one the native `fetch` API returns. Since every method is already a `Promise`, there's no separate set of "async" methods to learn, unlike some other language SDKs.

## What the SDK handles for you

* **Authentication** - your API key is set once in the client constructor, not repeated on every call.
* **Retries** - optionally retry failed requests (`429`, `502`, `503`, `504`, `422`, and connections that failed before the request was sent) with randomized backoff, without writing retry logic yourself. Off by default; turn them on with the `retries` option.
* **Concurrency** - every request from a client instance is automatically queued and limited to match your Zenrows plan's concurrency limit.
* **Native fetch** - no extra HTTP client dependency; the SDK builds directly on Node's built-in `fetch`.

## What you'll need

> [card] Node.js 20+
>
> Required by the SDK's `engines` field in `package.json`.

> [card] [API key](https://app.zenrows.com/register?p=free)
>
> Create a free account to get yours, no credit card required.

> [!NOTE]
>
> The SDK only covers Fetch's GET and POST modes; it doesn't expose a `put()` method. For the full list of request parameters (`premium_proxy`, `css_extractor`, `extract`, and so on), see the [Fetch setup guide](https://docs.zenrows.com/fetch/setup.md). Most parameters work the same way through the SDK's `config` argument, with one exception: `js_render` only works on GET requests, not POST. See [POST Requests](https://docs.zenrows.com/fetch/sdk/nodejs/post-put-requests.md).

> [!TIP]
>
> Looking for a different language? Zenrows also maintains a [Python SDK](https://pypi.org/project/zenrows/).

## Explore the Node.js SDK

> [card] [Installation](https://docs.zenrows.com/fetch/sdk/nodejs/installation.md)
>
> Install the package and get your API key.

> [card] [Quickstart](https://docs.zenrows.com/fetch/sdk/nodejs/quickstart.md)
>
> Make your first request in a few lines of code.

> [card] [POST Requests](https://docs.zenrows.com/fetch/sdk/nodejs/post-put-requests.md)
>
> Submit forms or data payloads.

> [card] [Concurrency](https://docs.zenrows.com/fetch/sdk/nodejs/async-concurrency.md)
>
> Scrape many URLs in parallel.

> [card] [Error Handling and Retries](https://docs.zenrows.com/fetch/sdk/nodejs/error-handling-and-retries.md)
>
> Configure automatic retries and handle failures.

> [card] [The Response Object](https://docs.zenrows.com/fetch/sdk/nodejs/response-object.md)
>
> What you get back from every request.

> [card] [Custom Headers](https://docs.zenrows.com/fetch/sdk/nodejs/custom-headers.md)
>
> Forward specific headers to the target site.

> [card] [FAQ](https://docs.zenrows.com/fetch/sdk/nodejs/faq.md)
>
> Answers to common questions.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.