All SDKs
Go

Go SDK

Go package with context and timeout support. Go 1.18+.

Install

go get github.com/serpii/serpii-go

Quick start

example.go
package main

import (
    "context"
    "os"
    "github.com/serpii/serpii-go"
)

func main() {
    client := serpii.NewClient(os.Getenv("SERPII_API_KEY"))
    ctx := context.Background()

    results, err := client.Search(ctx, serpii.SearchParams{
        Query:     "best coffee shops in austin",
        Location:  "Austin, TX",
        Num:       10,
    })
    if err != nil {
        panic(err)
    }
    // results.OrganicResults, results.Intent
}
← Back to SDKs