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

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

## Requirements

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

**1. Install the package**

Add the SDK to your module with `go get`:

```bash theme={null} theme={"theme":"css-variables"}
go get github.com/zenrows/zenrows-go-sdk/service/api
```

> [!WARNING]
>
> Use the singular path `service/api`. Some copy-pasted snippets show `services/api` (plural), which doesn't match the module's actual directory layout and won't resolve.

The package name is `scraperapi`, not `zenrows`, so import it with an explicit alias:

```go theme={null} theme={"theme":"css-variables"}
import (
    scraperapi "github.com/zenrows/zenrows-go-sdk/service/api"
)
```

**2. Verify the install**

Create a client and print its type to confirm everything resolves:

```go theme={null} theme={"theme":"css-variables"}
package main

import (
    "fmt"

    scraperapi "github.com/zenrows/zenrows-go-sdk/service/api"
)

func main() {
    client := scraperapi.NewClient(
        scraperapi.WithAPIKey("YOUR_ZENROWS_API_KEY"),
    )
    fmt.Printf("%T\n", client) // *scraperapi.Client
}
```

If it prints `*scraperapi.Client` without a compile 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 the `ZENROWS_API_KEY` environment variable (read automatically by `scraperapi.NewClient()`) instead of hardcoding it in scripts you commit to version control.

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


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