Skip to content

Go library for accessing the Ahrefs API.

License

Notifications You must be signed in to change notification settings

oporto723/ahrefs-go

Repository files navigation

ahrefs-go

GoDoc Build Status Go Report Card

ahrefs-go is a Go client library for accessing the Ahrefs API.

Usage

client := ahrefs.NewClient(http.DefaultClient, "token")

payload, resp, err := client.Service.ReferringDomainsByType(
    context.TODO(),
    ahrefs.WithTarget("ahrefs.com"),
    ahrefs.WithHaving("domain_rating>10"),
    ahrefs.WithLimit(1))
if err != nil {
    log.Fatal(err)
}s

fmt.Println(resp.StatusCode)
fmt.Println(payload.ReferringDomainsByType)