ahrefs-go is a Go client library for accessing the Ahrefs API.
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)