> ## 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 Go SDK

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

The [Zenrows Go SDK](https://github.com/ZenRows/zenrows-go-sdk) (package `scraperapi`) is a lightweight client for [Fetch](https://docs.zenrows.com/fetch/setup.md). It wraps the same `https://api.zenrows.com/v1` endpoint you'd otherwise call with `net/http`, adding automatic retries, concurrency limiting, and a typed request builder on top.

> [!NOTE]
>
> Every request parameter is a typed field on a `RequestParameters` struct instead of a loose map or dictionary, so the compiler catches a typo'd parameter name before your code ever makes a network call. Every method also takes a `context.Context`, so cancellation and timeouts work the same way they do with any other Go HTTP call.

## 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`, `500`, `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 `WithMaxRetryCount`.
* **Concurrency** - cap how many requests run in parallel with an internal semaphore, to match your Zenrows plan's concurrency limit.
* **Typed parameters** - every Fetch parameter (`js_render`, `premium_proxy`, `css_extractor`, and more) is a typed field on `RequestParameters`, not a hand-built query string.

## What you'll need

> [card] Go 1.23+
>
> Required by the SDK's `go.mod`.

> [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, POST, and PUT modes; it doesn't expose PATCH or DELETE. 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 `RequestParameters` regardless of method, with one exception: `JSRender` only works on GET requests, not POST or PUT. See [POST and PUT Requests](https://docs.zenrows.com/fetch/sdk/go/post-put-requests.md).

> [!TIP]
>
> Looking for a different language? Zenrows also maintains a [Python SDK](https://pypi.org/project/zenrows/) and a [Node.js SDK](https://www.npmjs.com/package/zenrows).

## Explore the Go SDK

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

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

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

> [card] [Concurrency](https://docs.zenrows.com/fetch/sdk/go/async-concurrency.md)
>
> Scrape many URLs at once with goroutines.

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

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

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

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


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