> ## 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`.

# Installing the Node.js SDK

> Install the Zenrows Node.js SDK and get your API key ready to make requests.

## Requirements

> [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.

**1. Install the package**

Install the SDK with your package manager of choice:

> [tab] npm
>
> ```bash theme={null} theme={"theme":"css-variables"}
> npm install zenrows
> ```

> [tab] yarn
>
> ```bash theme={null} theme={"theme":"css-variables"}
> yarn add zenrows
> ```

> [tab] pnpm
>
> ```bash theme={null} theme={"theme":"css-variables"}
> pnpm install zenrows
> ```

> [tab] bun
>
> ```bash theme={null} theme={"theme":"css-variables"}
> bun install zenrows
> ```

The SDK has two dependencies, `fastq` (concurrency queue) and `fetch-retry` (retry logic on top of `fetch`), installed automatically.

**2. Verify the install**

Run this in a Node.js script or REPL to confirm the package is available:

```javascript theme={null} theme={"theme":"css-variables"}
const { ZenRows } = require("zenrows");

console.log(ZenRows);
```

Or with ES modules / TypeScript:

```typescript theme={null} theme={"theme":"css-variables"}
import { ZenRows } from "zenrows";

console.log(ZenRows);
```

If it prints the `ZenRows` class without raising an error, you're ready to go.

**3. Get your API key**

Your API key authenticates every request you send through the SDK. Grab it from the Zenrows Request Playground after signing up.

[Open the Playground](https://app.zenrows.com/fetch)

> [!WARNING]
>
> Keep your API key private. Load it from an environment variable (like `process.env.ZENROWS_API_KEY`) instead of hardcoding it in scripts you commit to version control.

> [card] [Next: Quickstart](https://docs.zenrows.com/fetch/sdk/nodejs/quickstart.md)
>
> Make your first request with the SDK.


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