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

# Zenrows SDK Overview

> Official Zenrows SDKs for Python, Node.js, and Go. Pick your language and start scraping in minutes.

The Zenrows SDKs are lightweight, official clients for [Fetch](https://docs.zenrows.com/fetch/setup.md). Each one wraps the same `https://api.zenrows.com/v1` endpoint, adding authentication, retries, and concurrency control so you write less boilerplate and spend more time on what you're actually building.

> [!NOTE]
>
> All three SDKs are open source and MIT licensed. You can inspect the source, report bugs, or contribute on [GitHub](https://github.com/ZenRows).

## Pick your language

> [card] [Python](https://docs.zenrows.com/fetch/sdk/python/introduction.md)
>
> Built on `requests`. Returns `requests.Response`. Supports `async`/`await` via `asyncio`. GET, POST, and PUT.

> [card] [Node.js](https://docs.zenrows.com/fetch/sdk/nodejs/introduction.md)
>
> Built on native `fetch`. Returns a standard `Response`. Every method is already a `Promise`. GET and POST.

> [card] [Go](https://docs.zenrows.com/fetch/sdk/go/introduction.md)
>
> Built on `net/http` via `go-resty`. Typed `RequestParameters` struct. Takes `context.Context`. GET, POST, and PUT.

## What every SDK gives you

All three SDKs share the same core behavior. You set your API key once in the client constructor, and every call handles the rest.

> [accordion] Authentication
>
> Your API key is passed once to the client constructor. Every subsequent request is authenticated automatically; you never repeat it per call.
>
> > [tab] Python
> >
> > ```python theme={null} theme={"theme":"css-variables"}
> > from zenrows import ZenRowsClient
> >
> > client = ZenRowsClient("YOUR_ZENROWS_API_KEY")
> > ```
>
> > [tab] Node.js
> >
> > ```javascript theme={null} theme={"theme":"css-variables"}
> > const { ZenRows } = require("zenrows");
> >
> > const client = new ZenRows("YOUR_ZENROWS_API_KEY");
> > ```
>
> > [tab] Go
> >
> > ```go theme={null} theme={"theme":"css-variables"}
> > import scraperapi "github.com/zenrows/zenrows-go-sdk/service/api"
> >
> > client := scraperapi.NewClient(
> >     scraperapi.WithAPIKey("YOUR_ZENROWS_API_KEY"),
> > )
> > ```

> [accordion] Automatic retries
>
> Retries are off by default (`0`): every SDK sends each request once. Set a retry count in the constructor to turn them on. Only successful responses are billed; failed retries are free.
>
> With retries turned on, all three SDKs follow the same rules:
>
> 1. They retry a GET after a `429`, `502`, `503` or `504`, a `422` other than Extract's `no_data_extracted`, or a failure to connect (the request never reached the API). Python and Go also retry a `500`; Node.js returns it at once.
>
> 2. They never retry a POST or PUT, any other network error such as a read timeout, any other status, or a status from the target site ([`original_status`](https://docs.zenrows.com/fetch/features/other#original-http-code), [`allowed_status_codes`](https://docs.zenrows.com/fetch/features/other#return-content-on-error)).
>
> 3. Before each retry they wait the API's `Retry-After` in whole seconds, from 0.25 to 30 seconds. Otherwise they wait a random time from 0.25 seconds up to 1, 2, 4... seconds, capped at the maximum wait (default 30 seconds).
>
> 4. A retry starts only if its wait ends within 90 seconds of the first try. A running try is not cut short.
>
> > [tab] Python
> >
> > ```python theme={null} theme={"theme":"css-variables"}
> > client = ZenRowsClient("YOUR_ZENROWS_API_KEY", retries=2)
> > ```
> >
> > See [Python retries](https://docs.zenrows.com/fetch/sdk/python/error-handling-and-retries.md) for every option.
>
> > [tab] Node.js
> >
> > ```javascript theme={null} theme={"theme":"css-variables"}
> > const client = new ZenRows("YOUR_ZENROWS_API_KEY", { retries: 2 });
> > ```
> >
> > See [Node.js retries](https://docs.zenrows.com/fetch/sdk/nodejs/error-handling-and-retries.md) for every option.
>
> > [tab] Go
> >
> > ```go theme={null} theme={"theme":"css-variables"}
> > client := scraperapi.NewClient(
> >     scraperapi.WithAPIKey("YOUR_ZENROWS_API_KEY"),
> >     scraperapi.WithMaxRetryCount(2),
> > )
> > ```
> >
> > See [Go retries](https://docs.zenrows.com/fetch/sdk/go/error-handling-and-retries.md) for every option.

> [accordion] Concurrency control
>
> All three SDKs cap parallel requests via an internal queue or semaphore. The default concurrency limit is `5`. Set it to match your Zenrows plan.
>
> > [tab] Python
> >
> > ```python theme={null} theme={"theme":"css-variables"}
> > client = ZenRowsClient("YOUR_ZENROWS_API_KEY", concurrency=5)
> > ```
>
> > [tab] Node.js
> >
> > ```javascript theme={null} theme={"theme":"css-variables"}
> > const client = new ZenRows("YOUR_ZENROWS_API_KEY", { concurrency: 5 });
> > ```
>
> > [tab] Go
> >
> > ```go theme={null} theme={"theme":"css-variables"}
> > client := scraperapi.NewClient(
> >     scraperapi.WithAPIKey("YOUR_ZENROWS_API_KEY"),
> >     scraperapi.WithMaxConcurrentRequests(5),
> > )
> > ```
>
> > [!NOTE]
> >
> > Each client instance enforces its own concurrency limit. Two scripts using the same API key don't share limits, so running both at once can trigger `429 Too Many Requests` errors. See the [Concurrency](https://docs.zenrows.com/fetch/features/concurrency.md) guide for plan-level limits.

> [accordion] Request parameters
>
> Every Fetch parameter (`js_render`, `premium_proxy`, `css_extractor`, and so on) is available through each SDK. Only the syntax differs.
>
> > [tab] Python
> >
> > ```python theme={null} theme={"theme":"css-variables"}
> > response = client.get(url, params={
> >     "js_render": True,
> >     "premium_proxy": True,
> >     "proxy_country": "us",
> > })
> > ```
>
> > [tab] Node.js
> >
> > ```javascript theme={null} theme={"theme":"css-variables"}
> > const response = await client.get(url, {
> >   js_render: true,
> >   premium_proxy: true,
> >   proxy_country: "us",
> > });
> > ```
>
> > [tab] Go
> >
> > ```go theme={null} theme={"theme":"css-variables"}
> > response, err := client.Get(ctx, url, &scraperapi.RequestParameters{
> >     JSRender:          true,
> >     UsePremiumProxies: true,
> >     ProxyCountry:      "us",
> > })
> > ```
>
> For the full parameter list, see the [Fetch setup guide](https://docs.zenrows.com/fetch/setup.md).

> [accordion] Response headers
>
> Every response includes Zenrows monitoring headers. The two most useful for tracking usage are:
>
> | Header | Contains |
> | - | - |
> | `X-Request-Cost` | Dollar cost of the request (e.g. `0.001`) |
> | `X-Request-Credits` | Number of credits consumed |
> | `X-Key-Credits-Remaining` | Lowest remaining credits across the API key's [credit caps](https://docs.zenrows.com/first-steps/api-key-credit-caps.md). Sent only for keys with at least one cap |
> | `X-Request-Id` | Unique request ID. Include this when contacting support |
> | `Concurrency-Remaining` | Concurrency slots remaining on your plan |
> | `Zr-Final-Url` | Final URL after any redirects |
>
> Headers from the target website are prefixed with `Zr-` to avoid collisions with Zenrows' own headers.

## SDK comparison

> [!NOTE]
>
> All SDKs target the same Fetch endpoint. The differences below are language-level constraints, not API-level ones.

| Feature | Python | Node.js | Go |
| - | - | - | - |
| Install | `pip install zenrows` | `npm install zenrows` | `go get github.com/zenrows/zenrows-go-sdk/service/api` |
| Min version | Python 3.6+ | Node.js 20+ | Go 1.23+ |
| Response type | `requests.Response` | Fetch `Response` | `*scraperapi.Response` |
| GET | Yes | Yes | Yes |
| POST | Yes | Yes | Yes |
| PUT | Yes | No (use raw `fetch`) | Yes |
| Async / parallel | `get_async` + `asyncio` | Every method is a `Promise` | Goroutines + semaphore |
| Default concurrency | 5 | 5 | 5 |
| Default retries | 0 (off) | 0 (off) | 0 (off) |
| Retried status codes | `422`, `429`, `500`, `502`, `503`, `504` | `422`, `429`, `502`, `503`, `504` | `422`, `429`, `500`, `502`, `503`, `504` |
| Typed parameters | No (dict / object) | No (dict / object) | Yes (`RequestParameters` struct) |
| GitHub | [zenrows-python-sdk](https://github.com/ZenRows/zenrows-python-sdk) | [zenrows-node-sdk](https://github.com/ZenRows/zenrows-node-sdk) | [zenrows-go-sdk](https://github.com/ZenRows/zenrows-go-sdk) |

## Pricing

Cost is determined by the parameters you send per request, not by which SDK you use. Retried attempts that fail are not billed.

| Configuration | Credits per request |
| - | - |
| Basic request | 1 |
| `js_render=True` / `js_render: true` / `JSRender: true` | 5 |
| `premium_proxy=True` / `premium_proxy: true` / `UsePremiumProxies: true` | 10 |
| JS render + Premium Proxy | 25 |

See [Zenrows Pricing](https://docs.zenrows.com/first-steps/pricing.md) for plan-specific rates and concurrency limits.

## Get started

**1. Pick your SDK**

Choose the SDK that matches your language. All three share the same API key and request parameters.

**2. Install it**

Follow the installation guide for your language: [Python](https://docs.zenrows.com/fetch/sdk/python/installation.md), [Node.js](https://docs.zenrows.com/fetch/sdk/nodejs/installation.md), or [Go](https://docs.zenrows.com/fetch/sdk/go/installation.md).

**3. Make your first request**

Each SDK has a quickstart that gets you to a working response in under 10 lines of code: [Python](https://docs.zenrows.com/fetch/sdk/python/quickstart.md), [Node.js](https://docs.zenrows.com/fetch/sdk/nodejs/quickstart.md), [Go](https://docs.zenrows.com/fetch/sdk/go/quickstart.md).

**4. Scale up**

Once the basics work, add retries and concurrency to match your production requirements. Each SDK's [Error Handling](https://docs.zenrows.com/fetch/sdk/python/error-handling-and-retries.md) and [Concurrency](https://docs.zenrows.com/fetch/sdk/python/async-concurrency.md) pages walk through the options.

> [card] [Need help?](mailto:success@zenrows.com)
>
> Check the [API Error Codes](https://docs.zenrows.com/api-error-codes.md) reference for error details, or contact support with your `X-Request-Id` header value for faster triage.


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