Skip to main content

Requirements

Go 1.23+

Required by the SDK’s go.mod.

API key

Create a free account to get yours, no credit card required.
1

Install the package

Add the SDK to your module with go get:
go get github.com/zenrows/zenrows-go-sdk/service/api
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:
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:
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 Builder after signing up.
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.

Next: Quickstart

Make your first request with the SDK.