The Search API client is part of the algoliasearch-client-go package. To install it, run:

1
go get github.com/algolia/algoliasearch-client-go

To use the Search client, add this import to your files:

1
import "github.com/algolia/algoliasearch-client-go/v4/algolia/search"

To create an instance of the client:

1
2
3
4
5
client, err := search.NewClient("ALGOLIA_APPLICATION_ID", "ALGOLIA_API_KEY")
if err != nil {
  // The client can fail to initialize if you pass an invalid parameter.
  panic(err)
}

List of methods

Each method makes one request to the Search API. The Search API client also includes helper methods that wrap one or more of these methods. For more information, see Helper methods.

Records

Indices

Synonyms

API keys

Rules

Dictionaries

Clusters

Vaults

Advanced

Did you find this page helpful?
Go API clients v4