The official WhoisFreaks Go SDK: a complete client for WHOIS, DNS, SSL, domain availability, subdomain, IP geolocation, IP reputation, ASN, typosquatting, and domain reputation lookups, plus bulk database downloads. Query real-time and historical domain data, reverse WHOIS, and threat intelligence from Go with a single API key. Generated from the WhoisFreaks OpenAPI specification and published to Go modules.
Keywords: go whois api, go whois sdk, whoisfreaks go, go domain lookup, go dns api, whois api, whois lookup, domain api, dns api, dns lookup, reverse whois, historical whois, domain availability api, ssl certificate api, ip geolocation api, ip reputation api, asn lookup, subdomain finder, typosquatting api, domain reputation, threat intelligence api, domain data api, whois sdk, domain monitoring, brand protection api
github.com/WhoisFreaks/whoisfreaks-gogo get github.com/WhoisFreaks/whoisfreaks-go
Prefer to build the SDK yourself instead of installing from Go modules? Clone the Go SDK repository and build it locally:
git clone https://github.com/WhoisFreaks/whoisfreaks-go
cd whoisfreaks-go
go build ./... # or import the module path directly
A complete walkthrough from an empty directory to a running program:
You need Go 1.18 or later. Create a module and add the SDK:
mkdir whoisfreaks-test && cd whoisfreaks-test
go mod init whoisfreaks-test
go get github.com/WhoisFreaks/whoisfreaks-go@v0.24.0
Create main.go:
package main
import (
"context"
"fmt"
"log"
"os"
whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go"
)
func main() {
// Set the API key once on the context; every call made with ctx sends it.
ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys,
map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}})
client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration())
record, _, err := client.WHOISAPI.WhoisLive(ctx).DomainName("whoisfreaks.com").Execute()
if err != nil {
log.Fatal(err)
}
fmt.Println(record.GetDomainName(), "expires", record.GetExpiryDate())
}
Set your API key, tidy the module and run it:
export WHOISFREAKS_API_KEY="your_api_key"
go mod tidy
go run .
To run one of the runnable examples, save it as main.go in this module and run go run . again.
See Authentication for how to obtain a key. Minimal setup:
// Runnable example: Live WHOIS Lookup (GET /v2.0/whois/live)
// Run it from the Getting Started module: save it as main.go, then `go run .`
// Parameters for whoisLive (GET /v2.0/whois/live):
// - domainName (string, required)
// - format (string (one of: json, xml), optional)
package main
import (
"context"
"encoding/json"
"fmt"
"log"
"os"
whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go"
)
func main() {
// Set the API key once on the context; every call made with ctx sends it.
ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys,
map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}})
client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration())
result, _, err := client.WHOISAPI.WhoisLive(ctx).DomainName("whoisfreaks.com").Execute()
if err != nil {
log.Fatal(err)
}
out, _ := json.MarshalIndent(result, "", " ")
fmt.Println(string(out))
}
All 94 endpoints are shown below, grouped by category. Each includes its method, path, parameters, and a runnable example. See the full endpoint reference for response shapes and field details.
GET /v2.0/whois/live
// Runnable example: Live WHOIS Lookup (GET /v2.0/whois/live)
// Run it from the Getting Started module: save it as main.go, then `go run .`
// Parameters for whoisLive (GET /v2.0/whois/live):
// - domainName (string, required)
// - format (string (one of: json, xml), optional)
package main
import (
"context"
"encoding/json"
"fmt"
"log"
"os"
whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go"
)
func main() {
// Set the API key once on the context; every call made with ctx sends it.
ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys,
map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}})
client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration())
result, _, err := client.WHOISAPI.WhoisLive(ctx).DomainName("whoisfreaks.com").Execute()
if err != nil {
log.Fatal(err)
}
out, _ := json.MarshalIndent(result, "", " ")
fmt.Println(string(out))
}
POST /v2.0/bulkwhois/live
// Runnable example: Bulk WHOIS Lookup (POST /v2.0/bulkwhois/live)
// Run it from the Getting Started module: save it as main.go, then `go run .`
// Parameters for bulkWhois (POST /v2.0/bulkwhois/live):
// - format (string (one of: json, xml), optional)
// - body: BulkWhoisRequest (required): request body object
package main
import (
"context"
"encoding/json"
"fmt"
"log"
"os"
whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go"
)
func main() {
// Set the API key once on the context; every call made with ctx sends it.
ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys,
map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}})
client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration())
body := whoisfreaks.NewBulkWhoisRequest([]string{"whoisfreaks.com", "jfreaks.com"})
result, _, err := client.WHOISAPI.BulkWhois(ctx).BulkWhoisRequest(*body).Execute()
if err != nil {
log.Fatal(err)
}
out, _ := json.MarshalIndent(result, "", " ")
fmt.Println(string(out))
}
GET /v2.0/whois/history
// Runnable example: Historical WHOIS records for a domain (GET /v2.0/whois/history)
// Run it from the Getting Started module: save it as main.go, then `go run .`
// Parameters for whoisHistory (GET /v2.0/whois/history):
// - domainName (string, required): Domain to fetch historical WHOIS records for
// - format (string (one of: json, xml), optional)
package main
import (
"context"
"encoding/json"
"fmt"
"log"
"os"
whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go"
)
func main() {
// Set the API key once on the context; every call made with ctx sends it.
ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys,
map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}})
client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration())
result, _, err := client.WHOISAPI.WhoisHistory(ctx).DomainName("whoisfreaks.com").Execute()
if err != nil {
log.Fatal(err)
}
out, _ := json.MarshalIndent(result, "", " ")
fmt.Println(string(out))
}
GET /v2.0/whois/reverse
// Runnable example: Reverse WHOIS lookup by keyword (GET /v2.0/whois/reverse)
// Run it from the Getting Started module: save it as main.go, then `go run .`
// Parameters for whoisReverse (GET /v2.0/whois/reverse):
// - keyword (string, required): Keyword to search across WHOIS records
// - page (integer, optional): Page number
// - format (string (one of: json, xml), optional)
package main
import (
"context"
"encoding/json"
"fmt"
"log"
"os"
whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go"
)
func main() {
// Set the API key once on the context; every call made with ctx sends it.
ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys,
map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}})
client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration())
result, _, err := client.WHOISAPI.WhoisReverse(ctx).Keyword("whoisfreaks").Page(1).Execute()
if err != nil {
log.Fatal(err)
}
out, _ := json.MarshalIndent(result, "", " ")
fmt.Println(string(out))
}
GET /v2.0/dns/live
// Runnable example: Live DNS Lookup (GET /v2.0/dns/live)
// Run it from the Getting Started module: save it as main.go, then `go run .`
// Parameters for dnsLive (GET /v2.0/dns/live):
// - domainName (string, optional)
// - ipAddress (string, optional): Use for PTR lookups
// - type (string, required): all or comma-separated: A,MX,NS,TXT,SOA,SPF,AAAA,CNAME
// - format (string (one of: json, xml), optional)
package main
import (
"context"
"encoding/json"
"fmt"
"log"
"os"
whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go"
)
func main() {
// Set the API key once on the context; every call made with ctx sends it.
ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys,
map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}})
client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration())
result, _, err := client.DNSAPI.DnsLive(ctx).
DomainName("whoisfreaks.com").Type_("A,MX,TXT").Execute()
if err != nil {
log.Fatal(err)
}
out, _ := json.MarshalIndent(result, "", " ")
fmt.Println(string(out))
}
GET /v2.0/dns/historical
// Runnable example: Historical DNS Lookup (GET /v2.0/dns/historical)
// Run it from the Getting Started module: save it as main.go, then `go run .`
// Parameters for dnsHistorical (GET /v2.0/dns/historical):
// - domainName (string, required)
// - type (string, required)
// - page (integer, optional)
// - format (string (one of: json, xml), optional)
package main
import (
"context"
"encoding/json"
"fmt"
"log"
"os"
whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go"
)
func main() {
// Set the API key once on the context; every call made with ctx sends it.
ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys,
map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}})
client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration())
result, _, err := client.DNSAPI.DnsHistorical(ctx).
DomainName("whoisfreaks.com").Type_("A,MX,TXT").Page(1).Execute()
if err != nil {
log.Fatal(err)
}
out, _ := json.MarshalIndent(result, "", " ")
fmt.Println(string(out))
}
GET /v2.1/dns/reverse
// Runnable example: Reverse DNS Lookup (GET /v2.1/dns/reverse)
// Run it from the Getting Started module: save it as main.go, then `go run .`
// Parameters for dnsReverse (GET /v2.1/dns/reverse):
// - value (string, required): IP, CIDR, or record value
// - type (string (one of: a, mx, cname, ns, aaaa, txt, soa), required)
// - exact (boolean, optional)
// - page (integer, optional)
// - format (string (one of: json, xml), optional)
package main
import (
"context"
"encoding/json"
"fmt"
"log"
"os"
whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go"
)
func main() {
// Set the API key once on the context; every call made with ctx sends it.
ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys,
map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}})
client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration())
result, _, err := client.DNSAPI.DnsReverse(ctx).Value("8.8.8.8").Type_("a").Page(1).Execute()
if err != nil {
log.Fatal(err)
}
out, _ := json.MarshalIndent(result, "", " ")
fmt.Println(string(out))
}
GET /v2.2/dns/historical
// Runnable example: Historical DNS Lookup (v2.2) (GET /v2.2/dns/historical)
// Run it from the Getting Started module: save it as main.go, then `go run .`
// Parameters for dnsHistoricalV22 (GET /v2.2/dns/historical):
// - domainName (string, required)
// - type (string, required)
// - page (integer, optional)
// - sort (string (one of: asc, desc), optional): Sort direction. Omit to leave the results unsorted.
// - sortBy (string (one of: firstSeen, lastSeen), optional): Field to sort on. Only applies when sort is given.
// - format (string (one of: json, xml), optional)
package main
import (
"context"
"encoding/json"
"fmt"
"log"
"os"
whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go"
)
func main() {
// Set the API key once on the context; every call made with ctx sends it.
ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys,
map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}})
client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration())
result, _, err := client.DNSAPI.DnsHistoricalV22(ctx).
DomainName("whoisfreaks.com").Type_("A,MX,TXT").Page(1).Execute()
if err != nil {
log.Fatal(err)
}
out, _ := json.MarshalIndent(result, "", " ")
fmt.Println(string(out))
}
GET /v2.3/dns/historical
// Runnable example: Historical DNS Lookup (v2.3) (GET /v2.3/dns/historical)
// Run it from the Getting Started module: save it as main.go, then `go run .`
// Parameters for dnsHistoricalV23 (GET /v2.3/dns/historical):
// - domainName (string, required)
// - type (string, required)
// - page (integer, optional)
// - sort (string (one of: asc, desc), optional): Sort direction. Omit to leave the results unsorted.
// - sortBy (string (one of: firstSeen, lastSeen), optional): Field to sort on. Only applies when sort is given.
// - format (string (one of: json, xml), optional)
package main
import (
"context"
"encoding/json"
"fmt"
"log"
"os"
whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go"
)
func main() {
// Set the API key once on the context; every call made with ctx sends it.
ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys,
map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}})
client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration())
result, _, err := client.DNSAPI.DnsHistoricalV23(ctx).
DomainName("whoisfreaks.com").Type_("A,MX,TXT").Page(1).Execute()
if err != nil {
log.Fatal(err)
}
out, _ := json.MarshalIndent(result, "", " ")
fmt.Println(string(out))
}
GET /v2.2/dns/reverse
// Runnable example: Reverse DNS Lookup (v2.2) (GET /v2.2/dns/reverse)
// Run it from the Getting Started module: save it as main.go, then `go run .`
// Parameters for dnsReverseV22 (GET /v2.2/dns/reverse):
// - value (string, required): IP, CIDR, or record value
// - type (string (one of: a, mx, cname, ns, aaaa, txt, soa), required)
// - exact (boolean, optional): When false the value is matched as a substring, which is far slower than an exact match...
// - page (integer, optional)
// - sort (string (one of: asc, desc), optional): Sort direction. Omit to leave the results unsorted.
// - sortBy (string (one of: firstSeen, lastSeen), optional): Field to sort on. Only applies when sort is given.
// - format (string (one of: json, xml), optional)
package main
import (
"context"
"encoding/json"
"fmt"
"log"
"os"
whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go"
)
func main() {
// Set the API key once on the context; every call made with ctx sends it.
ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys,
map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}})
client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration())
result, _, err := client.DNSAPI.DnsReverseV22(ctx).Value("8.8.8.8").Type_("a").Page(1).Execute()
if err != nil {
log.Fatal(err)
}
out, _ := json.MarshalIndent(result, "", " ")
fmt.Println(string(out))
}
GET /v2.3/dns/reverse
// Runnable example: Reverse DNS Lookup (v2.3) (GET /v2.3/dns/reverse)
// Run it from the Getting Started module: save it as main.go, then `go run .`
// Parameters for dnsReverseV23 (GET /v2.3/dns/reverse):
// - value (string, required): IP, CIDR, or record value
// - type (string (one of: a, mx, cname, ns, aaaa, txt, soa), required)
// - exact (boolean, optional): When false the value is matched as a substring, which is far slower than an exact match...
// - page (integer, optional)
// - sort (string (one of: asc, desc), optional): Sort direction. Omit to leave the results unsorted.
// - sortBy (string (one of: firstSeen, lastSeen), optional): Field to sort on. Only applies when sort is given.
// - format (string (one of: json, xml), optional)
package main
import (
"context"
"encoding/json"
"fmt"
"log"
"os"
whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go"
)
func main() {
// Set the API key once on the context; every call made with ctx sends it.
ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys,
map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}})
client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration())
result, _, err := client.DNSAPI.DnsReverseV23(ctx).Value("8.8.8.8").Type_("a").Page(1).Execute()
if err != nil {
log.Fatal(err)
}
out, _ := json.MarshalIndent(result, "", " ")
fmt.Println(string(out))
}
POST /v2.0/dns/bulk/live
// Runnable example: Bulk DNS Lookup (POST /v2.0/dns/bulk/live)
// Run it from the Getting Started module: save it as main.go, then `go run .`
// Parameters for dnsBulk (POST /v2.0/dns/bulk/live):
// - type (string, required)
// - format (string (one of: json, xml), optional)
// - body: DnsBulkRequest (required): request body object
package main
import (
"context"
"encoding/json"
"fmt"
"log"
"os"
whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go"
)
func main() {
// Set the API key once on the context; every call made with ctx sends it.
ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys,
map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}})
client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration())
body := whoisfreaks.NewDnsBulkRequest()
body.SetDomainNames([]string{"whoisfreaks.com", "example.com"})
result, _, err := client.DNSAPI.DnsBulk(ctx).Type_("A,MX,TXT").DnsBulkRequest(*body).Execute()
if err != nil {
log.Fatal(err)
}
out, _ := json.MarshalIndent(result, "", " ")
fmt.Println(string(out))
}
GET /v2.0/domain/availability
// Runnable example: Domain Availability Check with Suggestions (GET /v2.0/domain/availability)
// Run it from the Getting Started module: save it as main.go, then `go run .`
// Parameters for domainAvailabilityV2 (GET /v2.0/domain/availability):
// - domain (string, required): The domain name to check
// - sug (boolean, optional): Whether to return TLD suggestions alongside the queried domain.
// - count (integer, optional): Number of TLD suggestions to return when sug=true. Maximum is 100.
// - format (string (one of: json, xml), optional)
package main
import (
"context"
"encoding/json"
"fmt"
"log"
"os"
whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go"
)
func main() {
// Set the API key once on the context; every call made with ctx sends it.
ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys,
map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}})
client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration())
result, _, err := client.DomainAvailabilityAPI.DomainAvailabilityV2(ctx).
Domain("google.com").Sug(true).Count(5).Execute()
if err != nil {
log.Fatal(err)
}
out, _ := json.MarshalIndent(result, "", " ")
fmt.Println(string(out))
}
POST /v2.0/domain/availability
// Runnable example: Bulk Domain Availability Check (POST /v2.0/domain/availability)
// Run it from the Getting Started module: save it as main.go, then `go run .`
// Parameters for bulkDomainAvailabilityV2 (POST /v2.0/domain/availability):
// - domain (string, optional): Required for TLD-mode bulk check (base domain).
// - format (string (one of: json, xml), optional)
// - body: BulkDomainAvailabilityRequest (required): request body object
package main
import (
"context"
"encoding/json"
"fmt"
"log"
"os"
whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go"
)
func main() {
// Set the API key once on the context; every call made with ctx sends it.
ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys,
map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}})
client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration())
body := whoisfreaks.NewBulkDomainAvailabilityRequest()
body.SetDomainNames([]string{"whoisfreaks.com", "example.com"})
result, _, err := client.DomainAvailabilityAPI.BulkDomainAvailabilityV2(ctx).
BulkDomainAvailabilityRequest(*body).Execute()
if err != nil {
log.Fatal(err)
}
out, _ := json.MarshalIndent(result, "", " ")
fmt.Println(string(out))
}
GET /v3.0/domain/typos
// Runnable example: Typosquatting Lookup (GET /v3.0/domain/typos)
// Run it from the Getting Started module: save it as main.go, then `go run .`
// Parameters for typosquatting (GET /v3.0/domain/typos):
// - keyword (string, optional)
// - pattern (string, optional)
// - pageToken (string, optional)
package main
import (
"context"
"encoding/json"
"fmt"
"log"
"os"
whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go"
)
func main() {
// Set the API key once on the context; every call made with ctx sends it.
ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys,
map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}})
client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration())
result, _, err := client.TyposquattingAPI.Typosquatting(ctx).Keyword("whoisfreaks").Execute()
if err != nil {
log.Fatal(err)
}
out, _ := json.MarshalIndent(result, "", " ")
fmt.Println(string(out))
}
GET /v1.0/ssl/live
// Runnable example: SSL Certificate Lookup (GET /v1.0/ssl/live)
// Run it from the Getting Started module: save it as main.go, then `go run .`
// Parameters for sslLookup (GET /v1.0/ssl/live):
// - domainName (string, required)
// - chain (boolean, optional)
// - sslRaw (boolean, optional)
// - format (string (one of: json, xml), optional)
package main
import (
"context"
"encoding/json"
"fmt"
"log"
"os"
whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go"
)
func main() {
// Set the API key once on the context; every call made with ctx sends it.
ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys,
map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}})
client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration())
result, _, err := client.SSLAPI.SslLookup(ctx).DomainName("whoisfreaks.com").Execute()
if err != nil {
log.Fatal(err)
}
out, _ := json.MarshalIndent(result, "", " ")
fmt.Println(string(out))
}
GET /v1.0/geolocation
// Runnable example: IP Geolocation Lookup (GET /v1.0/geolocation)
// Run it from the Getting Started module: save it as main.go, then `go run .`
// Parameters for geolocation (GET /v1.0/geolocation):
// - ip (string, required)
package main
import (
"context"
"encoding/json"
"fmt"
"log"
"os"
whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go"
)
func main() {
// Set the API key once on the context; every call made with ctx sends it.
ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys,
map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}})
client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration())
result, _, err := client.GeolocationAPI.Geolocation(ctx).Ip("8.8.8.8").Execute()
if err != nil {
log.Fatal(err)
}
out, _ := json.MarshalIndent(result, "", " ")
fmt.Println(string(out))
}
POST /v1.0/geolocation
// Runnable example: Bulk IP Geolocation (POST /v1.0/geolocation)
// Run it from the Getting Started module: save it as main.go, then `go run .`
// Parameters for bulkGeolocation (POST /v1.0/geolocation):
// - body: BulkGeolocationRequest (required): request body object
package main
import (
"context"
"encoding/json"
"fmt"
"log"
"os"
whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go"
)
func main() {
// Set the API key once on the context; every call made with ctx sends it.
ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys,
map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}})
client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration())
body := whoisfreaks.NewBulkGeolocationRequest([]string{"8.8.8.8", "1.1.1.1"})
result, _, err := client.GeolocationAPI.BulkGeolocation(ctx).
BulkGeolocationRequest(*body).Execute()
if err != nil {
log.Fatal(err)
}
out, _ := json.MarshalIndent(result, "", " ")
fmt.Println(string(out))
}
GET /v1.0/subdomains
// Runnable example: Subdomains Lookup (GET /v1.0/subdomains)
// Run it from the Getting Started module: save it as main.go, then `go run .`
// Parameters for subdomains (GET /v1.0/subdomains):
// - domain (string, required)
// - after (string, optional)
// - before (string, optional)
// - status (string (one of: active, inactive), optional)
// - page (integer, optional)
// - format (string (one of: json, xml), optional)
package main
import (
"context"
"encoding/json"
"fmt"
"log"
"os"
whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go"
)
func main() {
// Set the API key once on the context; every call made with ctx sends it.
ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys,
map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}})
client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration())
result, _, err := client.SubdomainsAPI.Subdomains(ctx).Domain("whoisfreaks.com").Page(1).Execute()
if err != nil {
log.Fatal(err)
}
out, _ := json.MarshalIndent(result, "", " ")
fmt.Println(string(out))
}
GET /v1.0/security
// Runnable example: IP Reputation Lookup (GET /v1.0/security)
// Run it from the Getting Started module: save it as main.go, then `go run .`
// Parameters for ipReputation (GET /v1.0/security):
// - ip (string, required)
package main
import (
"context"
"encoding/json"
"fmt"
"log"
"os"
whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go"
)
func main() {
// Set the API key once on the context; every call made with ctx sends it.
ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys,
map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}})
client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration())
result, _, err := client.IPReputationAPI.IpReputation(ctx).Ip("8.8.8.8").Execute()
if err != nil {
log.Fatal(err)
}
out, _ := json.MarshalIndent(result, "", " ")
fmt.Println(string(out))
}
POST /v1.0/security
// Runnable example: Bulk IP Reputation (POST /v1.0/security)
// Run it from the Getting Started module: save it as main.go, then `go run .`
// Parameters for bulkIpReputation (POST /v1.0/security):
// - body: BulkGeolocationRequest (required): request body object
package main
import (
"context"
"encoding/json"
"fmt"
"log"
"os"
whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go"
)
func main() {
// Set the API key once on the context; every call made with ctx sends it.
ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys,
map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}})
client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration())
body := whoisfreaks.NewBulkGeolocationRequest([]string{"8.8.8.8", "1.1.1.1"})
result, _, err := client.IPReputationAPI.BulkIpReputation(ctx).
BulkGeolocationRequest(*body).Execute()
if err != nil {
log.Fatal(err)
}
out, _ := json.MarshalIndent(result, "", " ")
fmt.Println(string(out))
}
GET /v2.0/security
// Runnable example: IP Reputation Lookup (v2.0) (GET /v2.0/security)
// Run it from the Getting Started module: save it as main.go, then `go run .`
// Parameters for ipReputationV2 (GET /v2.0/security):
// - ip (string, required)
package main
import (
"context"
"encoding/json"
"fmt"
"log"
"os"
whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go"
)
func main() {
// Set the API key once on the context; every call made with ctx sends it.
ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys,
map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}})
client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration())
result, _, err := client.IPReputationAPI.IpReputationV2(ctx).Ip("8.8.8.8").Execute()
if err != nil {
log.Fatal(err)
}
out, _ := json.MarshalIndent(result, "", " ")
fmt.Println(string(out))
}
POST /v2.0/security
// Runnable example: Bulk IP Reputation (v2.0) (POST /v2.0/security)
// Run it from the Getting Started module: save it as main.go, then `go run .`
// Parameters for bulkIpReputationV2 (POST /v2.0/security):
// - body: BulkGeolocationRequest (required): request body object
package main
import (
"context"
"encoding/json"
"fmt"
"log"
"os"
whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go"
)
func main() {
// Set the API key once on the context; every call made with ctx sends it.
ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys,
map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}})
client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration())
body := whoisfreaks.NewBulkGeolocationRequest([]string{"1.1.1.1", "2.2.2.2", "8.8.8.8"})
result, _, err := client.IPReputationAPI.BulkIpReputationV2(ctx).
BulkGeolocationRequest(*body).Execute()
if err != nil {
log.Fatal(err)
}
out, _ := json.MarshalIndent(result, "", " ")
fmt.Println(string(out))
}
GET /v1/domain/security
// Runnable example: Domain Reputation Lookup (GET /v1/domain/security)
// Run it from the Getting Started module: save it as main.go, then `go run .`
// Parameters for domainReputation (GET /v1/domain/security):
// - domainName (string, required): The domain name to assess
// - format (string (one of: json, xml), optional)
package main
import (
"context"
"encoding/json"
"fmt"
"log"
"os"
whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go"
)
func main() {
// Set the API key once on the context; every call made with ctx sends it.
ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys,
map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}})
client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration())
result, _, err := client.DomainReputationAPI.DomainReputation(ctx).
DomainName("amazon.com").Execute()
if err != nil {
log.Fatal(err)
}
out, _ := json.MarshalIndent(result, "", " ")
fmt.Println(string(out))
}
GET /v2.0/asn-whois
// Runnable example: ASN WHOIS Lookup (GET /v2.0/asn-whois)
// Run it from the Getting Started module: save it as main.go, then `go run .`
// Parameters for asnWhois (GET /v2.0/asn-whois):
// - asn (string, required)
// - format (string (one of: json, xml), optional)
package main
import (
"context"
"encoding/json"
"fmt"
"log"
"os"
whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go"
)
func main() {
// Set the API key once on the context; every call made with ctx sends it.
ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys,
map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}})
client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration())
result, _, err := client.ASNWHOISAPI.AsnWhois(ctx).Asn("as15169").Execute()
if err != nil {
log.Fatal(err)
}
out, _ := json.MarshalIndent(result, "", " ")
fmt.Println(string(out))
}
GET /v1.0/ip-whois
// Runnable example: IP WHOIS Lookup (GET /v1.0/ip-whois)
// Run it from the Getting Started module: save it as main.go, then `go run .`
// Parameters for ipWhois (GET /v1.0/ip-whois):
// - ip (string, required)
// - format (string (one of: json, xml), optional)
package main
import (
"context"
"encoding/json"
"fmt"
"log"
"os"
whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go"
)
func main() {
// Set the API key once on the context; every call made with ctx sends it.
ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys,
map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}})
client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration())
result, _, err := client.IPWHOISAPI.IpWhois(ctx).Ip("8.8.8.8").Execute()
if err != nil {
log.Fatal(err)
}
out, _ := json.MarshalIndent(result, "", " ")
fmt.Println(string(out))
}
GET /v1.0/api-key/rotate
// Runnable example: Rotate API Key (GET /v1.0/api-key/rotate)
// Run it from the Getting Started module: save it as main.go, then `go run .`
// Parameters for rotateApiKey (GET /v1.0/api-key/rotate):
// (no parameters; the API key is set on the client)
package main
import (
"context"
"fmt"
"log"
"os"
whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go"
)
func main() {
// Set the API key once on the context; every call made with ctx sends it.
ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys,
map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}})
client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration())
newKey, _, err := client.AccountAPI.RotateApiKey(ctx).Execute()
if err != nil {
log.Fatal(err)
}
// The old key stops working: store the new one, e.g. in WHOISFREAKS_API_KEY.
fmt.Println("New API key:", newKey)
}
GET /v1.0/whoisapi/usage
// Runnable example: Account Usage (GET /v1.0/whoisapi/usage)
// Run it from the Getting Started module: save it as main.go, then `go run .`
// Parameters for accountUsage (GET /v1.0/whoisapi/usage):
// (no parameters; the API key is set on the client)
package main
import (
"context"
"encoding/json"
"fmt"
"log"
"os"
whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go"
)
func main() {
// Set the API key once on the context; every call made with ctx sends it.
ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys,
map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}})
client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration())
result, _, err := client.AccountAPI.AccountUsage(ctx).Execute()
if err != nil {
log.Fatal(err)
}
out, _ := json.MarshalIndent(result, "", " ")
fmt.Println(string(out))
}
GET /v3.4/status
// Runnable example: Database File Status (Public) (GET /v3.4/status)
// Run it from the Getting Started module: save it as main.go, then `go run .`
// Parameters for databaseFileStatus (GET /v3.4/status):
// (no parameters; no API key required)
package main
import (
"context"
"encoding/json"
"fmt"
"log"
whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go"
)
func main() {
// Public endpoint: no API key needed.
ctx := context.Background()
client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration())
result, _, err := client.AccountAPI.DatabaseFileStatus(ctx).Execute()
if err != nil {
log.Fatal(err)
}
out, _ := json.MarshalIndent(result, "", " ")
fmt.Println(string(out))
}
GET /v3.1/download/domainer/gtld
// Runnable example: Newly Registered gTLD (CSV) (GET /v3.1/download/domainer/gtld)
// Run it from the Getting Started module: save it as main.go, then `go run .`
// Parameters for dbNewlyGtld (GET /v3.1/download/domainer/gtld):
// - whois (boolean, required)
// - date (string, optional): yyyy-MM-dd; omit for latest
// - tlds (string, optional)
package main
import (
"context"
"fmt"
"io"
"log"
"os"
"path/filepath"
whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go"
)
func main() {
// Set the API key once on the context; every call made with ctx sends it.
ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys,
map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}})
client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration())
file, _, err := client.DatabasesNewlyRegisteredAPI.DbNewlyGtld(ctx).
Whois(true).Date("2026-10-01").Execute()
if err != nil {
log.Fatal(err)
}
// The SDK saves the response to a temporary file: copy it to its destination.
defer os.Remove(file.Name())
defer file.Close()
out, err := os.Create("DbNewlyGtld.csv")
if err != nil {
log.Fatal(err)
}
defer out.Close()
n, err := io.Copy(out, file)
if err != nil {
log.Fatal(err)
}
path, _ := filepath.Abs(out.Name())
fmt.Printf("Saved %d bytes to %s\n", n, path)
}
GET /v3.1/download/domainer/cctld
// Runnable example: Newly Registered ccTLD (CSV) (GET /v3.1/download/domainer/cctld)
// Run it from the Getting Started module: save it as main.go, then `go run .`
// Parameters for dbNewlyCctld (GET /v3.1/download/domainer/cctld):
// - whois (boolean, required)
// - date (string, optional): yyyy-MM-dd; omit for latest
// - tlds (string, optional)
package main
import (
"context"
"fmt"
"io"
"log"
"os"
"path/filepath"
whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go"
)
func main() {
// Set the API key once on the context; every call made with ctx sends it.
ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys,
map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}})
client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration())
file, _, err := client.DatabasesNewlyRegisteredAPI.DbNewlyCctld(ctx).
Whois(true).Date("2026-10-01").Execute()
if err != nil {
log.Fatal(err)
}
// The SDK saves the response to a temporary file: copy it to its destination.
defer os.Remove(file.Name())
defer file.Close()
out, err := os.Create("DbNewlyCctld.csv")
if err != nil {
log.Fatal(err)
}
defer out.Close()
n, err := io.Copy(out, file)
if err != nil {
log.Fatal(err)
}
path, _ := filepath.Abs(out.Name())
fmt.Printf("Saved %d bytes to %s\n", n, path)
}
GET /v3.1/download/domainer/gtld/cleaned
// Runnable example: Newly Registered gTLD Cleaned WHOIS (CSV) (GET /v3.1/download/domainer/gtld/cleaned)
// Run it from the Getting Started module: save it as main.go, then `go run .`
// Parameters for dbNewlyGtldCleaned (GET /v3.1/download/domainer/gtld/cleaned):
// - date (string, optional): yyyy-MM-dd; omit for latest
package main
import (
"context"
"fmt"
"io"
"log"
"os"
"path/filepath"
whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go"
)
func main() {
// Set the API key once on the context; every call made with ctx sends it.
ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys,
map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}})
client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration())
file, _, err := client.DatabasesNewlyRegisteredAPI.DbNewlyGtldCleaned(ctx).
Date("2026-10-01").Execute()
if err != nil {
log.Fatal(err)
}
// The SDK saves the response to a temporary file: copy it to its destination.
defer os.Remove(file.Name())
defer file.Close()
out, err := os.Create("DbNewlyGtldCleaned.csv")
if err != nil {
log.Fatal(err)
}
defer out.Close()
n, err := io.Copy(out, file)
if err != nil {
log.Fatal(err)
}
path, _ := filepath.Abs(out.Name())
fmt.Printf("Saved %d bytes to %s\n", n, path)
}
GET /v3.1/download/domainer/cctld/cleaned
// Runnable example: Newly Registered ccTLD Cleaned WHOIS (CSV) (GET /v3.1/download/domainer/cctld/cleaned)
// Run it from the Getting Started module: save it as main.go, then `go run .`
// Parameters for dbNewlyCctldCleaned (GET /v3.1/download/domainer/cctld/cleaned):
// - date (string, optional): yyyy-MM-dd; omit for latest
package main
import (
"context"
"fmt"
"io"
"log"
"os"
"path/filepath"
whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go"
)
func main() {
// Set the API key once on the context; every call made with ctx sends it.
ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys,
map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}})
client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration())
file, _, err := client.DatabasesNewlyRegisteredAPI.DbNewlyCctldCleaned(ctx).
Date("2026-10-01").Execute()
if err != nil {
log.Fatal(err)
}
// The SDK saves the response to a temporary file: copy it to its destination.
defer os.Remove(file.Name())
defer file.Close()
out, err := os.Create("DbNewlyCctldCleaned.csv")
if err != nil {
log.Fatal(err)
}
defer out.Close()
n, err := io.Copy(out, file)
if err != nil {
log.Fatal(err)
}
path, _ := filepath.Abs(out.Name())
fmt.Printf("Saved %d bytes to %s\n", n, path)
}
GET /v3.1/domains/newly/gtld
// Runnable example: Newly Registered gTLD (JSON) (GET /v3.1/domains/newly/gtld)
// Run it from the Getting Started module: save it as main.go, then `go run .`
// Parameters for dbNewlyGtldJson (GET /v3.1/domains/newly/gtld):
// - date (string, optional): yyyy-MM-dd; omit for latest
// - tlds (string, optional)
package main
import (
"context"
"encoding/json"
"fmt"
"log"
"os"
whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go"
)
func main() {
// Set the API key once on the context; every call made with ctx sends it.
ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys,
map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}})
client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration())
result, _, err := client.DatabasesNewlyRegisteredAPI.DbNewlyGtldJson(ctx).
Date("2026-10-01").Execute()
if err != nil {
log.Fatal(err)
}
out, _ := json.MarshalIndent(result, "", " ")
fmt.Println(string(out))
}
GET /v3.1/domains/newly/cctld
// Runnable example: Newly Registered ccTLD (JSON) (GET /v3.1/domains/newly/cctld)
// Run it from the Getting Started module: save it as main.go, then `go run .`
// Parameters for dbNewlyCctldJson (GET /v3.1/domains/newly/cctld):
// - date (string, optional): yyyy-MM-dd; omit for latest
// - tlds (string, optional)
package main
import (
"context"
"encoding/json"
"fmt"
"log"
"os"
whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go"
)
func main() {
// Set the API key once on the context; every call made with ctx sends it.
ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys,
map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}})
client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration())
result, _, err := client.DatabasesNewlyRegisteredAPI.DbNewlyCctldJson(ctx).
Date("2026-10-01").Execute()
if err != nil {
log.Fatal(err)
}
out, _ := json.MarshalIndent(result, "", " ")
fmt.Println(string(out))
}
GET /v3.1/download/domainer/newly/dns
// Runnable example: Newly Registered With DNS (GET /v3.1/download/domainer/newly/dns)
// Run it from the Getting Started module: save it as main.go, then `go run .`
// Parameters for dbNewlyDns (GET /v3.1/download/domainer/newly/dns):
// - date (string, optional): yyyy-MM-dd; omit for latest
package main
import (
"context"
"fmt"
"io"
"log"
"os"
"path/filepath"
whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go"
)
func main() {
// Set the API key once on the context; every call made with ctx sends it.
ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys,
map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}})
client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration())
file, _, err := client.DatabasesNewlyRegisteredAPI.DbNewlyDns(ctx).Date("2026-10-01").Execute()
if err != nil {
log.Fatal(err)
}
// The SDK saves the response to a temporary file: copy it to its destination.
defer os.Remove(file.Name())
defer file.Close()
out, err := os.Create("DbNewlyDns.json")
if err != nil {
log.Fatal(err)
}
defer out.Close()
n, err := io.Copy(out, file)
if err != nil {
log.Fatal(err)
}
path, _ := filepath.Abs(out.Name())
fmt.Printf("Saved %d bytes to %s\n", n, path)
}
GET /v3.1/download/domainer/expired
// Runnable example: Expiring Domains (GET /v3.1/download/domainer/expired)
// Run it from the Getting Started module: save it as main.go, then `go run .`
// Parameters for dbExpired (GET /v3.1/download/domainer/expired):
// - whois (boolean, required)
// - date (string, optional): yyyy-MM-dd; omit for latest
package main
import (
"context"
"fmt"
"io"
"log"
"os"
"path/filepath"
whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go"
)
func main() {
// Set the API key once on the context; every call made with ctx sends it.
ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys,
map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}})
client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration())
file, _, err := client.DatabasesExpiringDroppedAPI.DbExpired(ctx).
Whois(true).Date("2026-10-01").Execute()
if err != nil {
log.Fatal(err)
}
// The SDK saves the response to a temporary file: copy it to its destination.
defer os.Remove(file.Name())
defer file.Close()
out, err := os.Create("DbExpired.csv")
if err != nil {
log.Fatal(err)
}
defer out.Close()
n, err := io.Copy(out, file)
if err != nil {
log.Fatal(err)
}
path, _ := filepath.Abs(out.Name())
fmt.Printf("Saved %d bytes to %s\n", n, path)
}
GET /v3.1/download/domainer/expired/cleaned
// Runnable example: Expiring Cleaned WHOIS (GET /v3.1/download/domainer/expired/cleaned)
// Run it from the Getting Started module: save it as main.go, then `go run .`
// Parameters for dbExpiredCleaned (GET /v3.1/download/domainer/expired/cleaned):
// - date (string, optional): yyyy-MM-dd; omit for latest
package main
import (
"context"
"fmt"
"io"
"log"
"os"
"path/filepath"
whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go"
)
func main() {
// Set the API key once on the context; every call made with ctx sends it.
ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys,
map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}})
client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration())
file, _, err := client.DatabasesExpiringDroppedAPI.DbExpiredCleaned(ctx).
Date("2026-10-01").Execute()
if err != nil {
log.Fatal(err)
}
// The SDK saves the response to a temporary file: copy it to its destination.
defer os.Remove(file.Name())
defer file.Close()
out, err := os.Create("DbExpiredCleaned.csv")
if err != nil {
log.Fatal(err)
}
defer out.Close()
n, err := io.Copy(out, file)
if err != nil {
log.Fatal(err)
}
path, _ := filepath.Abs(out.Name())
fmt.Printf("Saved %d bytes to %s\n", n, path)
}
GET /v3.1/download/domainer/dropped
// Runnable example: Dropped Domains (GET /v3.1/download/domainer/dropped)
// Run it from the Getting Started module: save it as main.go, then `go run .`
// Parameters for dbDropped (GET /v3.1/download/domainer/dropped):
// - whois (boolean, required)
// - date (string, optional): yyyy-MM-dd; omit for latest
package main
import (
"context"
"fmt"
"io"
"log"
"os"
"path/filepath"
whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go"
)
func main() {
// Set the API key once on the context; every call made with ctx sends it.
ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys,
map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}})
client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration())
file, _, err := client.DatabasesExpiringDroppedAPI.DbDropped(ctx).
Whois(true).Date("2026-10-01").Execute()
if err != nil {
log.Fatal(err)
}
// The SDK saves the response to a temporary file: copy it to its destination.
defer os.Remove(file.Name())
defer file.Close()
out, err := os.Create("DbDropped.csv")
if err != nil {
log.Fatal(err)
}
defer out.Close()
n, err := io.Copy(out, file)
if err != nil {
log.Fatal(err)
}
path, _ := filepath.Abs(out.Name())
fmt.Printf("Saved %d bytes to %s\n", n, path)
}
GET /v3.1/domains/dropped
// Runnable example: Dropped Domains (JSON) (GET /v3.1/domains/dropped)
// Run it from the Getting Started module: save it as main.go, then `go run .`
// Parameters for dbDroppedJson (GET /v3.1/domains/dropped):
// - date (string, optional): yyyy-MM-dd; omit for latest
// - tlds (string, optional)
package main
import (
"context"
"encoding/json"
"fmt"
"log"
"os"
whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go"
)
func main() {
// Set the API key once on the context; every call made with ctx sends it.
ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys,
map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}})
client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration())
result, _, err := client.DatabasesExpiringDroppedAPI.DbDroppedJson(ctx).
Date("2026-10-01").Execute()
if err != nil {
log.Fatal(err)
}
out, _ := json.MarshalIndent(result, "", " ")
fmt.Println(string(out))
}
GET /v3.3/download/domainer/dropped/backlinks
// Runnable example: Dropped With Backlinks (GET /v3.3/download/domainer/dropped/backlinks)
// Run it from the Getting Started module: save it as main.go, then `go run .`
// Parameters for dbDroppedBacklinks (GET /v3.3/download/domainer/dropped/backlinks):
// - whois (boolean, optional)
// - date (string, optional): yyyy-MM-dd; omit for latest
package main
import (
"context"
"fmt"
"io"
"log"
"os"
"path/filepath"
whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go"
)
func main() {
// Set the API key once on the context; every call made with ctx sends it.
ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys,
map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}})
client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration())
file, _, err := client.DatabasesExpiringDroppedAPI.DbDroppedBacklinks(ctx).
Date("2026-10-01").Execute()
if err != nil {
log.Fatal(err)
}
// The SDK saves the response to a temporary file: copy it to its destination.
defer os.Remove(file.Name())
defer file.Close()
out, err := os.Create("DbDroppedBacklinks.csv")
if err != nil {
log.Fatal(err)
}
defer out.Close()
n, err := io.Copy(out, file)
if err != nil {
log.Fatal(err)
}
path, _ := filepath.Abs(out.Name())
fmt.Printf("Saved %d bytes to %s\n", n, path)
}
GET /v3.3/download/dbupdate/daily/domains/whois
// Runnable example: WHOIS Database Daily (GET /v3.3/download/dbupdate/daily/domains/whois)
// Run it from the Getting Started module: save it as main.go, then `go run .`
// Parameters for dbWhoisDaily (GET /v3.3/download/dbupdate/daily/domains/whois):
// - date (string, optional): yyyy-MM-dd; omit for latest
package main
import (
"context"
"fmt"
"io"
"log"
"os"
"path/filepath"
whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go"
)
func main() {
// Set the API key once on the context; every call made with ctx sends it.
ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys,
map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}})
client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration())
file, _, err := client.DatabasesWHOISAPI.DbWhoisDaily(ctx).Date("2026-10-01").Execute()
if err != nil {
log.Fatal(err)
}
// The SDK saves the response to a temporary file: copy it to its destination.
defer os.Remove(file.Name())
defer file.Close()
out, err := os.Create("DbWhoisDaily.csv")
if err != nil {
log.Fatal(err)
}
defer out.Close()
n, err := io.Copy(out, file)
if err != nil {
log.Fatal(err)
}
path, _ := filepath.Abs(out.Name())
fmt.Printf("Saved %d bytes to %s\n", n, path)
}
GET /v3.3/download/dbupdate/weekly/domains/whois
// Runnable example: WHOIS Database Weekly (GET /v3.3/download/dbupdate/weekly/domains/whois)
// Run it from the Getting Started module: save it as main.go, then `go run .`
// Parameters for dbWhoisWeekly (GET /v3.3/download/dbupdate/weekly/domains/whois):
// - date (string, optional): yyyy-MM-dd; omit for latest
package main
import (
"context"
"fmt"
"io"
"log"
"os"
"path/filepath"
whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go"
)
func main() {
// Set the API key once on the context; every call made with ctx sends it.
ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys,
map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}})
client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration())
file, _, err := client.DatabasesWHOISAPI.DbWhoisWeekly(ctx).Date("2026-10-01").Execute()
if err != nil {
log.Fatal(err)
}
// The SDK saves the response to a temporary file: copy it to its destination.
defer os.Remove(file.Name())
defer file.Close()
out, err := os.Create("DbWhoisWeekly.csv")
if err != nil {
log.Fatal(err)
}
defer out.Close()
n, err := io.Copy(out, file)
if err != nil {
log.Fatal(err)
}
path, _ := filepath.Abs(out.Name())
fmt.Printf("Saved %d bytes to %s\n", n, path)
}
GET /v3.3/download/dbupdate/monthly/domains/whois
// Runnable example: WHOIS Database Monthly (GET /v3.3/download/dbupdate/monthly/domains/whois)
// Run it from the Getting Started module: save it as main.go, then `go run .`
// Parameters for dbWhoisMonthly (GET /v3.3/download/dbupdate/monthly/domains/whois):
// - date (string, optional): yyyy-MM-dd; omit for latest
package main
import (
"context"
"fmt"
"io"
"log"
"os"
"path/filepath"
whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go"
)
func main() {
// Set the API key once on the context; every call made with ctx sends it.
ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys,
map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}})
client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration())
file, _, err := client.DatabasesWHOISAPI.DbWhoisMonthly(ctx).Date("2026-10-01").Execute()
if err != nil {
log.Fatal(err)
}
// The SDK saves the response to a temporary file: copy it to its destination.
defer os.Remove(file.Name())
defer file.Close()
out, err := os.Create("DbWhoisMonthly.csv")
if err != nil {
log.Fatal(err)
}
defer out.Close()
n, err := io.Copy(out, file)
if err != nil {
log.Fatal(err)
}
path, _ := filepath.Abs(out.Name())
fmt.Printf("Saved %d bytes to %s\n", n, path)
}
GET /v3.2/download/dbupdate/daily/dns
// Runnable example: DNS Database Daily (GET /v3.2/download/dbupdate/daily/dns)
// Run it from the Getting Started module: save it as main.go, then `go run .`
// Parameters for dbDnsDaily (GET /v3.2/download/dbupdate/daily/dns):
// - date (string, optional): yyyy-MM-dd; omit for latest
package main
import (
"context"
"fmt"
"io"
"log"
"os"
"path/filepath"
whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go"
)
func main() {
// Set the API key once on the context; every call made with ctx sends it.
ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys,
map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}})
client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration())
file, _, err := client.DatabasesDNSAPI.DbDnsDaily(ctx).Date("2026-10-01").Execute()
if err != nil {
log.Fatal(err)
}
// The SDK saves the response to a temporary file: copy it to its destination.
defer os.Remove(file.Name())
defer file.Close()
out, err := os.Create("DbDnsDaily.csv")
if err != nil {
log.Fatal(err)
}
defer out.Close()
n, err := io.Copy(out, file)
if err != nil {
log.Fatal(err)
}
path, _ := filepath.Abs(out.Name())
fmt.Printf("Saved %d bytes to %s\n", n, path)
}
GET /v3.2/download/dbupdate/weekly/dns
// Runnable example: DNS Database Weekly (GET /v3.2/download/dbupdate/weekly/dns)
// Run it from the Getting Started module: save it as main.go, then `go run .`
// Parameters for dbDnsWeekly (GET /v3.2/download/dbupdate/weekly/dns):
// - date (string, optional): yyyy-MM-dd; omit for latest
package main
import (
"context"
"fmt"
"io"
"log"
"os"
"path/filepath"
whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go"
)
func main() {
// Set the API key once on the context; every call made with ctx sends it.
ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys,
map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}})
client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration())
file, _, err := client.DatabasesDNSAPI.DbDnsWeekly(ctx).Date("2026-10-01").Execute()
if err != nil {
log.Fatal(err)
}
// The SDK saves the response to a temporary file: copy it to its destination.
defer os.Remove(file.Name())
defer file.Close()
out, err := os.Create("DbDnsWeekly.csv")
if err != nil {
log.Fatal(err)
}
defer out.Close()
n, err := io.Copy(out, file)
if err != nil {
log.Fatal(err)
}
path, _ := filepath.Abs(out.Name())
fmt.Printf("Saved %d bytes to %s\n", n, path)
}
GET /v3.2/download/dbupdate/monthly/dns
// Runnable example: DNS Database Monthly (GET /v3.2/download/dbupdate/monthly/dns)
// Run it from the Getting Started module: save it as main.go, then `go run .`
// Parameters for dbDnsMonthly (GET /v3.2/download/dbupdate/monthly/dns):
// - date (string, optional): yyyy-MM-dd; omit for latest
package main
import (
"context"
"fmt"
"io"
"log"
"os"
"path/filepath"
whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go"
)
func main() {
// Set the API key once on the context; every call made with ctx sends it.
ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys,
map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}})
client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration())
file, _, err := client.DatabasesDNSAPI.DbDnsMonthly(ctx).Date("2026-10-01").Execute()
if err != nil {
log.Fatal(err)
}
// The SDK saves the response to a temporary file: copy it to its destination.
defer os.Remove(file.Name())
defer file.Close()
out, err := os.Create("DbDnsMonthly.csv")
if err != nil {
log.Fatal(err)
}
defer out.Close()
n, err := io.Copy(out, file)
if err != nil {
log.Fatal(err)
}
path, _ := filepath.Abs(out.Name())
fmt.Printf("Saved %d bytes to %s\n", n, path)
}
GET /v3.2/download/dbupdate/daily/subdomains
// Runnable example: Subdomains Daily (GET /v3.2/download/dbupdate/daily/subdomains)
// Run it from the Getting Started module: save it as main.go, then `go run .`
// Parameters for dbSubdomainsDaily (GET /v3.2/download/dbupdate/daily/subdomains):
// - date (string, optional): yyyy-MM-dd; omit for latest
package main
import (
"context"
"fmt"
"io"
"log"
"os"
"path/filepath"
whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go"
)
func main() {
// Set the API key once on the context; every call made with ctx sends it.
ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys,
map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}})
client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration())
file, _, err := client.DatabasesSubdomainsAPI.DbSubdomainsDaily(ctx).
Date("2026-10-01").Execute()
if err != nil {
log.Fatal(err)
}
// The SDK saves the response to a temporary file: copy it to its destination.
defer os.Remove(file.Name())
defer file.Close()
out, err := os.Create("DbSubdomainsDaily.csv")
if err != nil {
log.Fatal(err)
}
defer out.Close()
n, err := io.Copy(out, file)
if err != nil {
log.Fatal(err)
}
path, _ := filepath.Abs(out.Name())
fmt.Printf("Saved %d bytes to %s\n", n, path)
}
GET /v3.2/download/dbupdate/weekly/subdomains
// Runnable example: Subdomains Weekly (GET /v3.2/download/dbupdate/weekly/subdomains)
// Run it from the Getting Started module: save it as main.go, then `go run .`
// Parameters for dbSubdomainsWeekly (GET /v3.2/download/dbupdate/weekly/subdomains):
// - date (string, optional): yyyy-MM-dd; omit for latest
package main
import (
"context"
"fmt"
"io"
"log"
"os"
"path/filepath"
whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go"
)
func main() {
// Set the API key once on the context; every call made with ctx sends it.
ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys,
map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}})
client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration())
file, _, err := client.DatabasesSubdomainsAPI.DbSubdomainsWeekly(ctx).
Date("2026-10-01").Execute()
if err != nil {
log.Fatal(err)
}
// The SDK saves the response to a temporary file: copy it to its destination.
defer os.Remove(file.Name())
defer file.Close()
out, err := os.Create("DbSubdomainsWeekly.csv")
if err != nil {
log.Fatal(err)
}
defer out.Close()
n, err := io.Copy(out, file)
if err != nil {
log.Fatal(err)
}
path, _ := filepath.Abs(out.Name())
fmt.Printf("Saved %d bytes to %s\n", n, path)
}
GET /v3.2/download/dbupdate/monthly/subdomains
// Runnable example: Subdomains Monthly (GET /v3.2/download/dbupdate/monthly/subdomains)
// Run it from the Getting Started module: save it as main.go, then `go run .`
// Parameters for dbSubdomainsMonthly (GET /v3.2/download/dbupdate/monthly/subdomains):
// - date (string, optional): yyyy-MM-dd; omit for latest
package main
import (
"context"
"fmt"
"io"
"log"
"os"
"path/filepath"
whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go"
)
func main() {
// Set the API key once on the context; every call made with ctx sends it.
ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys,
map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}})
client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration())
file, _, err := client.DatabasesSubdomainsAPI.DbSubdomainsMonthly(ctx).
Date("2026-10-01").Execute()
if err != nil {
log.Fatal(err)
}
// The SDK saves the response to a temporary file: copy it to its destination.
defer os.Remove(file.Name())
defer file.Close()
out, err := os.Create("DbSubdomainsMonthly.csv")
if err != nil {
log.Fatal(err)
}
defer out.Close()
n, err := io.Copy(out, file)
if err != nil {
log.Fatal(err)
}
path, _ := filepath.Abs(out.Name())
fmt.Printf("Saved %d bytes to %s\n", n, path)
}
GET /v3.3/status/snapshot/ip/country
// Runnable example: IP to Country Snapshot Status (GET /v3.3/status/snapshot/ip/country)
// Run it from the Getting Started module: save it as main.go, then `go run .`
// Parameters for dbIpCountryStatus (GET /v3.3/status/snapshot/ip/country):
// (no parameters; the API key is set on the client)
package main
import (
"context"
"encoding/json"
"fmt"
"log"
"os"
whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go"
)
func main() {
// Set the API key once on the context; every call made with ctx sends it.
ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys,
map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}})
client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration())
result, _, err := client.DatabasesIPGeolocationAPI.DbIpCountryStatus(ctx).Execute()
if err != nil {
log.Fatal(err)
}
out, _ := json.MarshalIndent(result, "", " ")
fmt.Println(string(out))
}
GET /v3.3/download/snapshot/ip/country
// Runnable example: IP to Country Snapshot (GET /v3.3/download/snapshot/ip/country)
// Run it from the Getting Started module: save it as main.go, then `go run .`
// Parameters for dbIpCountry (GET /v3.3/download/snapshot/ip/country):
// - date (string, required)
package main
import (
"context"
"fmt"
"io"
"log"
"os"
"path/filepath"
whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go"
)
func main() {
// Set the API key once on the context; every call made with ctx sends it.
ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys,
map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}})
client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration())
file, _, err := client.DatabasesIPGeolocationAPI.DbIpCountry(ctx).Date("2026-10-01").Execute()
if err != nil {
log.Fatal(err)
}
// The SDK saves the response to a temporary file: copy it to its destination.
defer os.Remove(file.Name())
defer file.Close()
out, err := os.Create("DbIpCountry.zip")
if err != nil {
log.Fatal(err)
}
defer out.Close()
n, err := io.Copy(out, file)
if err != nil {
log.Fatal(err)
}
path, _ := filepath.Abs(out.Name())
fmt.Printf("Saved %d bytes to %s\n", n, path)
}
GET /v3.3/status/snapshot/ip/city
// Runnable example: IP to City Snapshot Status (GET /v3.3/status/snapshot/ip/city)
// Run it from the Getting Started module: save it as main.go, then `go run .`
// Parameters for dbIpCityStatus (GET /v3.3/status/snapshot/ip/city):
// (no parameters; the API key is set on the client)
package main
import (
"context"
"encoding/json"
"fmt"
"log"
"os"
whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go"
)
func main() {
// Set the API key once on the context; every call made with ctx sends it.
ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys,
map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}})
client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration())
result, _, err := client.DatabasesIPGeolocationAPI.DbIpCityStatus(ctx).Execute()
if err != nil {
log.Fatal(err)
}
out, _ := json.MarshalIndent(result, "", " ")
fmt.Println(string(out))
}
GET /v3.3/download/snapshot/ip/city
// Runnable example: IP to City Snapshot (GET /v3.3/download/snapshot/ip/city)
// Run it from the Getting Started module: save it as main.go, then `go run .`
// Parameters for dbIpCity (GET /v3.3/download/snapshot/ip/city):
// - date (string, required)
package main
import (
"context"
"fmt"
"io"
"log"
"os"
"path/filepath"
whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go"
)
func main() {
// Set the API key once on the context; every call made with ctx sends it.
ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys,
map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}})
client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration())
file, _, err := client.DatabasesIPGeolocationAPI.DbIpCity(ctx).Date("2026-10-01").Execute()
if err != nil {
log.Fatal(err)
}
// The SDK saves the response to a temporary file: copy it to its destination.
defer os.Remove(file.Name())
defer file.Close()
out, err := os.Create("DbIpCity.zip")
if err != nil {
log.Fatal(err)
}
defer out.Close()
n, err := io.Copy(out, file)
if err != nil {
log.Fatal(err)
}
path, _ := filepath.Abs(out.Name())
fmt.Printf("Saved %d bytes to %s\n", n, path)
}
GET /v3.3/download/snapshot/asn/whois
// Runnable example: ASN WHOIS Snapshot (GET /v3.3/download/snapshot/asn/whois)
// Run it from the Getting Started module: save it as main.go, then `go run .`
// Parameters for dbAsnWhois (GET /v3.3/download/snapshot/asn/whois):
// - date (string, required)
package main
import (
"context"
"fmt"
"io"
"log"
"os"
"path/filepath"
whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go"
)
func main() {
// Set the API key once on the context; every call made with ctx sends it.
ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys,
map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}})
client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration())
file, _, err := client.DatabasesASNWHOISAPI.DbAsnWhois(ctx).Date("2026-10-01").Execute()
if err != nil {
log.Fatal(err)
}
// The SDK saves the response to a temporary file: copy it to its destination.
defer os.Remove(file.Name())
defer file.Close()
out, err := os.Create("DbAsnWhois.json.gz")
if err != nil {
log.Fatal(err)
}
defer out.Close()
n, err := io.Copy(out, file)
if err != nil {
log.Fatal(err)
}
path, _ := filepath.Abs(out.Name())
fmt.Printf("Saved %d bytes to %s\n", n, path)
}
GET /v3.3/status/snapshot/asn/whois
// Runnable example: ASN WHOIS Snapshot Status (GET /v3.3/status/snapshot/asn/whois)
// Run it from the Getting Started module: save it as main.go, then `go run .`
// Parameters for dbAsnWhoisStatus (GET /v3.3/status/snapshot/asn/whois):
// (no parameters; the API key is set on the client)
package main
import (
"context"
"encoding/json"
"fmt"
"log"
"os"
whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go"
)
func main() {
// Set the API key once on the context; every call made with ctx sends it.
ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys,
map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}})
client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration())
result, _, err := client.DatabasesASNWHOISAPI.DbAsnWhoisStatus(ctx).Execute()
if err != nil {
log.Fatal(err)
}
out, _ := json.MarshalIndent(result, "", " ")
fmt.Println(string(out))
}
GET /v3.3/download/snapshot/ip/whois
// Runnable example: IP WHOIS Snapshot (GET /v3.3/download/snapshot/ip/whois)
// Run it from the Getting Started module: save it as main.go, then `go run .`
// Parameters for dbIpWhois (GET /v3.3/download/snapshot/ip/whois):
// - date (string, required)
package main
import (
"context"
"fmt"
"io"
"log"
"os"
"path/filepath"
whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go"
)
func main() {
// Set the API key once on the context; every call made with ctx sends it.
ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys,
map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}})
client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration())
file, _, err := client.DatabasesIPWHOISAPI.DbIpWhois(ctx).Date("2026-10-01").Execute()
if err != nil {
log.Fatal(err)
}
// The SDK saves the response to a temporary file: copy it to its destination.
defer os.Remove(file.Name())
defer file.Close()
out, err := os.Create("DbIpWhois.json.gz")
if err != nil {
log.Fatal(err)
}
defer out.Close()
n, err := io.Copy(out, file)
if err != nil {
log.Fatal(err)
}
path, _ := filepath.Abs(out.Name())
fmt.Printf("Saved %d bytes to %s\n", n, path)
}
GET /v3.3/status/snapshot/ip/whois
// Runnable example: IP WHOIS Snapshot Status (GET /v3.3/status/snapshot/ip/whois)
// Run it from the Getting Started module: save it as main.go, then `go run .`
// Parameters for dbIpWhoisStatus (GET /v3.3/status/snapshot/ip/whois):
// (no parameters; the API key is set on the client)
package main
import (
"context"
"encoding/json"
"fmt"
"log"
"os"
whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go"
)
func main() {
// Set the API key once on the context; every call made with ctx sends it.
ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys,
map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}})
client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration())
result, _, err := client.DatabasesIPWHOISAPI.DbIpWhoisStatus(ctx).Execute()
if err != nil {
log.Fatal(err)
}
out, _ := json.MarshalIndent(result, "", " ")
fmt.Println(string(out))
}
GET /v3.3/download/snapshot/ip/security
// Runnable example: IP Security Snapshot (GET /v3.3/download/snapshot/ip/security)
// Run it from the Getting Started module: save it as main.go, then `go run .`
// Parameters for dbIpSecurity (GET /v3.3/download/snapshot/ip/security):
// - date (string, required)
package main
import (
"context"
"fmt"
"io"
"log"
"os"
"path/filepath"
whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go"
)
func main() {
// Set the API key once on the context; every call made with ctx sends it.
ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys,
map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}})
client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration())
file, _, err := client.DatabasesIPSecurityAPI.DbIpSecurity(ctx).Date("2026-10-01").Execute()
if err != nil {
log.Fatal(err)
}
// The SDK saves the response to a temporary file: copy it to its destination.
defer os.Remove(file.Name())
defer file.Close()
out, err := os.Create("DbIpSecurity.csv")
if err != nil {
log.Fatal(err)
}
defer out.Close()
n, err := io.Copy(out, file)
if err != nil {
log.Fatal(err)
}
path, _ := filepath.Abs(out.Name())
fmt.Printf("Saved %d bytes to %s\n", n, path)
}
GET /v3.3/status/snapshot/ip/security
// Runnable example: IP Security Snapshot Status (GET /v3.3/status/snapshot/ip/security)
// Run it from the Getting Started module: save it as main.go, then `go run .`
// Parameters for dbIpSecurityStatus (GET /v3.3/status/snapshot/ip/security):
// (no parameters; the API key is set on the client)
package main
import (
"context"
"encoding/json"
"fmt"
"log"
"os"
whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go"
)
func main() {
// Set the API key once on the context; every call made with ctx sends it.
ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys,
map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}})
client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration())
result, _, err := client.DatabasesIPSecurityAPI.DbIpSecurityStatus(ctx).Execute()
if err != nil {
log.Fatal(err)
}
out, _ := json.MarshalIndent(result, "", " ")
fmt.Println(string(out))
}
GET /v3.4/download/threat-feed/phishing
// Runnable example: Download the daily phishing threat feed (CSV) (GET /v3.4/download/threat-feed/phishing)
// Run it from the Getting Started module: save it as main.go, then `go run .`
// Parameters for downloadThreatFeedPhishing (GET /v3.4/download/threat-feed/phishing):
// - date (string, optional): Feed date (yyyy-MM-dd); omit for the full dump of the feed
package main
import (
"context"
"fmt"
"io"
"log"
"os"
"path/filepath"
whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go"
)
func main() {
// Set the API key once on the context; every call made with ctx sends it.
ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys,
map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}})
client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration())
file, _, err := client.DatabasesThreatFeedAPI.DownloadThreatFeedPhishing(ctx).
Date("2026-10-01").Execute()
if err != nil {
log.Fatal(err)
}
// The SDK saves the response to a temporary file: copy it to its destination.
defer os.Remove(file.Name())
defer file.Close()
out, err := os.Create("DownloadThreatFeedPhishing.csv")
if err != nil {
log.Fatal(err)
}
defer out.Close()
n, err := io.Copy(out, file)
if err != nil {
log.Fatal(err)
}
path, _ := filepath.Abs(out.Name())
fmt.Printf("Saved %d bytes to %s\n", n, path)
}
GET /v3.4/download/threat-feed/phishing/sample
// Runnable example: Download a sample of the phishing threat feed (CSV) (GET /v3.4/download/threat-feed/phishing/sample)
// Run it from the Getting Started module: save it as main.go, then `go run .`
// Parameters for downloadThreatFeedPhishingSample (GET /v3.4/download/threat-feed/phishing/sample):
// (no parameters; the API key is set on the client)
package main
import (
"context"
"fmt"
"io"
"log"
"os"
"path/filepath"
whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go"
)
func main() {
// Set the API key once on the context; every call made with ctx sends it.
ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys,
map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}})
client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration())
file, _, err := client.DatabasesThreatFeedAPI.DownloadThreatFeedPhishingSample(ctx).Execute()
if err != nil {
log.Fatal(err)
}
// The SDK saves the response to a temporary file: copy it to its destination.
defer os.Remove(file.Name())
defer file.Close()
out, err := os.Create("DownloadThreatFeedPhishingSample.csv")
if err != nil {
log.Fatal(err)
}
defer out.Close()
n, err := io.Copy(out, file)
if err != nil {
log.Fatal(err)
}
path, _ := filepath.Abs(out.Name())
fmt.Printf("Saved %d bytes to %s\n", n, path)
}
GET /v3.4/download/threat-feed/malware
// Runnable example: Download the daily malware threat feed (CSV) (GET /v3.4/download/threat-feed/malware)
// Run it from the Getting Started module: save it as main.go, then `go run .`
// Parameters for downloadThreatFeedMalware (GET /v3.4/download/threat-feed/malware):
// - date (string, optional): Feed date (yyyy-MM-dd); omit for the full dump of the feed
package main
import (
"context"
"fmt"
"io"
"log"
"os"
"path/filepath"
whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go"
)
func main() {
// Set the API key once on the context; every call made with ctx sends it.
ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys,
map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}})
client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration())
file, _, err := client.DatabasesThreatFeedAPI.DownloadThreatFeedMalware(ctx).
Date("2026-10-01").Execute()
if err != nil {
log.Fatal(err)
}
// The SDK saves the response to a temporary file: copy it to its destination.
defer os.Remove(file.Name())
defer file.Close()
out, err := os.Create("DownloadThreatFeedMalware.csv")
if err != nil {
log.Fatal(err)
}
defer out.Close()
n, err := io.Copy(out, file)
if err != nil {
log.Fatal(err)
}
path, _ := filepath.Abs(out.Name())
fmt.Printf("Saved %d bytes to %s\n", n, path)
}
GET /v3.4/download/threat-feed/malware/sample
// Runnable example: Download a sample of the malware threat feed (CSV) (GET /v3.4/download/threat-feed/malware/sample)
// Run it from the Getting Started module: save it as main.go, then `go run .`
// Parameters for downloadThreatFeedMalwareSample (GET /v3.4/download/threat-feed/malware/sample):
// (no parameters; the API key is set on the client)
package main
import (
"context"
"fmt"
"io"
"log"
"os"
"path/filepath"
whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go"
)
func main() {
// Set the API key once on the context; every call made with ctx sends it.
ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys,
map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}})
client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration())
file, _, err := client.DatabasesThreatFeedAPI.DownloadThreatFeedMalwareSample(ctx).Execute()
if err != nil {
log.Fatal(err)
}
// The SDK saves the response to a temporary file: copy it to its destination.
defer os.Remove(file.Name())
defer file.Close()
out, err := os.Create("DownloadThreatFeedMalwareSample.csv")
if err != nil {
log.Fatal(err)
}
defer out.Close()
n, err := io.Copy(out, file)
if err != nil {
log.Fatal(err)
}
path, _ := filepath.Abs(out.Name())
fmt.Printf("Saved %d bytes to %s\n", n, path)
}
GET /v3.4/download/threat-feed/spam
// Runnable example: Download the daily spam threat feed (CSV) (GET /v3.4/download/threat-feed/spam)
// Run it from the Getting Started module: save it as main.go, then `go run .`
// Parameters for downloadThreatFeedSpam (GET /v3.4/download/threat-feed/spam):
// - date (string, optional): Feed date (yyyy-MM-dd); omit for the full dump of the feed
package main
import (
"context"
"fmt"
"io"
"log"
"os"
"path/filepath"
whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go"
)
func main() {
// Set the API key once on the context; every call made with ctx sends it.
ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys,
map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}})
client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration())
file, _, err := client.DatabasesThreatFeedAPI.DownloadThreatFeedSpam(ctx).
Date("2026-10-01").Execute()
if err != nil {
log.Fatal(err)
}
// The SDK saves the response to a temporary file: copy it to its destination.
defer os.Remove(file.Name())
defer file.Close()
out, err := os.Create("DownloadThreatFeedSpam.csv")
if err != nil {
log.Fatal(err)
}
defer out.Close()
n, err := io.Copy(out, file)
if err != nil {
log.Fatal(err)
}
path, _ := filepath.Abs(out.Name())
fmt.Printf("Saved %d bytes to %s\n", n, path)
}
GET /v3.4/download/threat-feed/spam/sample
// Runnable example: Download a sample of the spam threat feed (CSV) (GET /v3.4/download/threat-feed/spam/sample)
// Run it from the Getting Started module: save it as main.go, then `go run .`
// Parameters for downloadThreatFeedSpamSample (GET /v3.4/download/threat-feed/spam/sample):
// (no parameters; the API key is set on the client)
package main
import (
"context"
"fmt"
"io"
"log"
"os"
"path/filepath"
whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go"
)
func main() {
// Set the API key once on the context; every call made with ctx sends it.
ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys,
map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}})
client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration())
file, _, err := client.DatabasesThreatFeedAPI.DownloadThreatFeedSpamSample(ctx).Execute()
if err != nil {
log.Fatal(err)
}
// The SDK saves the response to a temporary file: copy it to its destination.
defer os.Remove(file.Name())
defer file.Close()
out, err := os.Create("DownloadThreatFeedSpamSample.csv")
if err != nil {
log.Fatal(err)
}
defer out.Close()
n, err := io.Copy(out, file)
if err != nil {
log.Fatal(err)
}
path, _ := filepath.Abs(out.Name())
fmt.Printf("Saved %d bytes to %s\n", n, path)
}
GET /v3.4/stream/threat-feed/phishing
// Runnable example: Stream the daily phishing threat feed (CSV) (GET /v3.4/stream/threat-feed/phishing)
// Run it from the Getting Started module: save it as main.go, then `go run .`
// Parameters for streamThreatFeedPhishing (GET /v3.4/stream/threat-feed/phishing):
// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints.
// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are...
// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on...
package main
import (
"context"
"encoding/json"
"fmt"
"log"
"os"
whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go"
)
func main() {
// Set the API key once on the context; every call made with ctx sends it.
ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys,
map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}})
client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration())
result, _, err := client.DatabasesStreamingAPI.StreamThreatFeedPhishing(ctx).
Date("2026-10-01").Execute()
if err != nil {
log.Fatal(err)
}
out, _ := json.MarshalIndent(result, "", " ")
fmt.Println(string(out))
}
GET /v3.4/stream/threat-feed/phishing/sample
// Runnable example: Stream a sample of the phishing threat feed (CSV) (GET /v3.4/stream/threat-feed/phishing/sample)
// Run it from the Getting Started module: save it as main.go, then `go run .`
// Parameters for streamThreatFeedPhishingSample (GET /v3.4/stream/threat-feed/phishing/sample):
// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are...
// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on...
package main
import (
"context"
"encoding/json"
"fmt"
"log"
whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go"
)
func main() {
// Public endpoint: no API key needed.
ctx := context.Background()
client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration())
result, _, err := client.DatabasesStreamingAPI.StreamThreatFeedPhishingSample(ctx).Execute()
if err != nil {
log.Fatal(err)
}
out, _ := json.MarshalIndent(result, "", " ")
fmt.Println(string(out))
}
GET /v3.4/stream/threat-feed/malware
// Runnable example: Stream the daily malware threat feed (CSV) (GET /v3.4/stream/threat-feed/malware)
// Run it from the Getting Started module: save it as main.go, then `go run .`
// Parameters for streamThreatFeedMalware (GET /v3.4/stream/threat-feed/malware):
// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints.
// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are...
// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on...
package main
import (
"context"
"encoding/json"
"fmt"
"log"
"os"
whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go"
)
func main() {
// Set the API key once on the context; every call made with ctx sends it.
ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys,
map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}})
client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration())
result, _, err := client.DatabasesStreamingAPI.StreamThreatFeedMalware(ctx).
Date("2026-10-01").Execute()
if err != nil {
log.Fatal(err)
}
out, _ := json.MarshalIndent(result, "", " ")
fmt.Println(string(out))
}
GET /v3.4/stream/threat-feed/malware/sample
// Runnable example: Stream a sample of the malware threat feed (CSV) (GET /v3.4/stream/threat-feed/malware/sample)
// Run it from the Getting Started module: save it as main.go, then `go run .`
// Parameters for streamThreatFeedMalwareSample (GET /v3.4/stream/threat-feed/malware/sample):
// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are...
// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on...
package main
import (
"context"
"encoding/json"
"fmt"
"log"
whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go"
)
func main() {
// Public endpoint: no API key needed.
ctx := context.Background()
client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration())
result, _, err := client.DatabasesStreamingAPI.StreamThreatFeedMalwareSample(ctx).Execute()
if err != nil {
log.Fatal(err)
}
out, _ := json.MarshalIndent(result, "", " ")
fmt.Println(string(out))
}
GET /v3.4/stream/threat-feed/spam
// Runnable example: Stream the daily spam threat feed (CSV) (GET /v3.4/stream/threat-feed/spam)
// Run it from the Getting Started module: save it as main.go, then `go run .`
// Parameters for streamThreatFeedSpam (GET /v3.4/stream/threat-feed/spam):
// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints.
// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are...
// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on...
package main
import (
"context"
"encoding/json"
"fmt"
"log"
"os"
whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go"
)
func main() {
// Set the API key once on the context; every call made with ctx sends it.
ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys,
map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}})
client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration())
result, _, err := client.DatabasesStreamingAPI.StreamThreatFeedSpam(ctx).
Date("2026-10-01").Execute()
if err != nil {
log.Fatal(err)
}
out, _ := json.MarshalIndent(result, "", " ")
fmt.Println(string(out))
}
GET /v3.4/stream/threat-feed/spam/sample
// Runnable example: Stream a sample of the spam threat feed (CSV) (GET /v3.4/stream/threat-feed/spam/sample)
// Run it from the Getting Started module: save it as main.go, then `go run .`
// Parameters for streamThreatFeedSpamSample (GET /v3.4/stream/threat-feed/spam/sample):
// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are...
// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on...
package main
import (
"context"
"encoding/json"
"fmt"
"log"
whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go"
)
func main() {
// Public endpoint: no API key needed.
ctx := context.Background()
client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration())
result, _, err := client.DatabasesStreamingAPI.StreamThreatFeedSpamSample(ctx).Execute()
if err != nil {
log.Fatal(err)
}
out, _ := json.MarshalIndent(result, "", " ")
fmt.Println(string(out))
}
GET /v3.3/stream/domainer/gtld
// Runnable example: Stream newly registered gTLD domains (CSV) (GET /v3.3/stream/domainer/gtld)
// Run it from the Getting Started module: save it as main.go, then `go run .`
// Parameters for streamDomainerGtld (GET /v3.3/stream/domainer/gtld):
// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints.
// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only...
// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are...
// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on...
package main
import (
"context"
"encoding/json"
"fmt"
"log"
"os"
whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go"
)
func main() {
// Set the API key once on the context; every call made with ctx sends it.
ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys,
map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}})
client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration())
result, _, err := client.DatabasesStreamingAPI.StreamDomainerGtld(ctx).
Date("2026-10-01").Execute()
if err != nil {
log.Fatal(err)
}
out, _ := json.MarshalIndent(result, "", " ")
fmt.Println(string(out))
}
GET /v3.3/stream/domainer/gtld/cleaned
// Runnable example: Stream cleaned newly registered gTLD domains (CSV) (GET /v3.3/stream/domainer/gtld/cleaned)
// Run it from the Getting Started module: save it as main.go, then `go run .`
// Parameters for streamDomainerGtldCleaned (GET /v3.3/stream/domainer/gtld/cleaned):
// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints.
// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only...
// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are...
// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on...
package main
import (
"context"
"encoding/json"
"fmt"
"log"
"os"
whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go"
)
func main() {
// Set the API key once on the context; every call made with ctx sends it.
ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys,
map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}})
client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration())
result, _, err := client.DatabasesStreamingAPI.StreamDomainerGtldCleaned(ctx).
Date("2026-10-01").Execute()
if err != nil {
log.Fatal(err)
}
out, _ := json.MarshalIndent(result, "", " ")
fmt.Println(string(out))
}
GET /v3.3/stream/domainer/gtld/cleaned/email
// Runnable example: Stream cleaned newly registered gTLD domains with an email (CSV) (GET /v3.3/stream/domainer/gtld/cleaned/email)
// Run it from the Getting Started module: save it as main.go, then `go run .`
// Parameters for streamDomainerGtldCleanedEmail (GET /v3.3/stream/domainer/gtld/cleaned/email):
// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints.
// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only...
// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are...
// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on...
package main
import (
"context"
"encoding/json"
"fmt"
"log"
"os"
whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go"
)
func main() {
// Set the API key once on the context; every call made with ctx sends it.
ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys,
map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}})
client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration())
result, _, err := client.DatabasesStreamingAPI.StreamDomainerGtldCleanedEmail(ctx).
Date("2026-10-01").Execute()
if err != nil {
log.Fatal(err)
}
out, _ := json.MarshalIndent(result, "", " ")
fmt.Println(string(out))
}
GET /v3.3/stream/domainer/gtld/cleaned/phone
// Runnable example: Stream cleaned newly registered gTLD domains with a phone (CSV) (GET /v3.3/stream/domainer/gtld/cleaned/phone)
// Run it from the Getting Started module: save it as main.go, then `go run .`
// Parameters for streamDomainerGtldCleanedPhone (GET /v3.3/stream/domainer/gtld/cleaned/phone):
// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints.
// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only...
// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are...
// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on...
package main
import (
"context"
"encoding/json"
"fmt"
"log"
"os"
whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go"
)
func main() {
// Set the API key once on the context; every call made with ctx sends it.
ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys,
map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}})
client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration())
result, _, err := client.DatabasesStreamingAPI.StreamDomainerGtldCleanedPhone(ctx).
Date("2026-10-01").Execute()
if err != nil {
log.Fatal(err)
}
out, _ := json.MarshalIndent(result, "", " ")
fmt.Println(string(out))
}
GET /v3.3/stream/domainer/cctld
// Runnable example: Stream newly registered ccTLD domains (CSV) (GET /v3.3/stream/domainer/cctld)
// Run it from the Getting Started module: save it as main.go, then `go run .`
// Parameters for streamDomainerCctld (GET /v3.3/stream/domainer/cctld):
// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints.
// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only...
// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are...
// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on...
package main
import (
"context"
"encoding/json"
"fmt"
"log"
"os"
whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go"
)
func main() {
// Set the API key once on the context; every call made with ctx sends it.
ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys,
map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}})
client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration())
result, _, err := client.DatabasesStreamingAPI.StreamDomainerCctld(ctx).
Date("2026-10-01").Execute()
if err != nil {
log.Fatal(err)
}
out, _ := json.MarshalIndent(result, "", " ")
fmt.Println(string(out))
}
GET /v3.3/stream/domainer/cctld/cleaned
// Runnable example: Stream cleaned newly registered ccTLD domains (CSV) (GET /v3.3/stream/domainer/cctld/cleaned)
// Run it from the Getting Started module: save it as main.go, then `go run .`
// Parameters for streamDomainerCctldCleaned (GET /v3.3/stream/domainer/cctld/cleaned):
// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints.
// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only...
// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are...
// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on...
package main
import (
"context"
"encoding/json"
"fmt"
"log"
"os"
whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go"
)
func main() {
// Set the API key once on the context; every call made with ctx sends it.
ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys,
map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}})
client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration())
result, _, err := client.DatabasesStreamingAPI.StreamDomainerCctldCleaned(ctx).
Date("2026-10-01").Execute()
if err != nil {
log.Fatal(err)
}
out, _ := json.MarshalIndent(result, "", " ")
fmt.Println(string(out))
}
GET /v3.3/stream/domainer/cctld/cleaned/email
// Runnable example: Stream cleaned newly registered ccTLD domains with an email (CSV) (GET /v3.3/stream/domainer/cctld/cleaned/email)
// Run it from the Getting Started module: save it as main.go, then `go run .`
// Parameters for streamDomainerCctldCleanedEmail (GET /v3.3/stream/domainer/cctld/cleaned/email):
// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints.
// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only...
// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are...
// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on...
package main
import (
"context"
"encoding/json"
"fmt"
"log"
"os"
whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go"
)
func main() {
// Set the API key once on the context; every call made with ctx sends it.
ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys,
map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}})
client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration())
result, _, err := client.DatabasesStreamingAPI.StreamDomainerCctldCleanedEmail(ctx).
Date("2026-10-01").Execute()
if err != nil {
log.Fatal(err)
}
out, _ := json.MarshalIndent(result, "", " ")
fmt.Println(string(out))
}
GET /v3.3/stream/domainer/cctld/cleaned/phone
// Runnable example: Stream cleaned newly registered ccTLD domains with a phone (CSV) (GET /v3.3/stream/domainer/cctld/cleaned/phone)
// Run it from the Getting Started module: save it as main.go, then `go run .`
// Parameters for streamDomainerCctldCleanedPhone (GET /v3.3/stream/domainer/cctld/cleaned/phone):
// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints.
// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only...
// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are...
// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on...
package main
import (
"context"
"encoding/json"
"fmt"
"log"
"os"
whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go"
)
func main() {
// Set the API key once on the context; every call made with ctx sends it.
ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys,
map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}})
client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration())
result, _, err := client.DatabasesStreamingAPI.StreamDomainerCctldCleanedPhone(ctx).
Date("2026-10-01").Execute()
if err != nil {
log.Fatal(err)
}
out, _ := json.MarshalIndent(result, "", " ")
fmt.Println(string(out))
}
GET /v3.3/stream/domainer/expired
// Runnable example: Stream expiring domains (CSV) (GET /v3.3/stream/domainer/expired)
// Run it from the Getting Started module: save it as main.go, then `go run .`
// Parameters for streamDomainerExpired (GET /v3.3/stream/domainer/expired):
// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints.
// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only...
// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are...
// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on...
package main
import (
"context"
"encoding/json"
"fmt"
"log"
"os"
whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go"
)
func main() {
// Set the API key once on the context; every call made with ctx sends it.
ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys,
map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}})
client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration())
result, _, err := client.DatabasesStreamingAPI.StreamDomainerExpired(ctx).
Date("2026-10-01").Execute()
if err != nil {
log.Fatal(err)
}
out, _ := json.MarshalIndent(result, "", " ")
fmt.Println(string(out))
}
GET /v3.3/stream/domainer/expired/cleaned
// Runnable example: Stream cleaned expiring domains (CSV) (GET /v3.3/stream/domainer/expired/cleaned)
// Run it from the Getting Started module: save it as main.go, then `go run .`
// Parameters for streamDomainerExpiredCleaned (GET /v3.3/stream/domainer/expired/cleaned):
// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints.
// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only...
// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are...
// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on...
package main
import (
"context"
"encoding/json"
"fmt"
"log"
"os"
whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go"
)
func main() {
// Set the API key once on the context; every call made with ctx sends it.
ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys,
map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}})
client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration())
result, _, err := client.DatabasesStreamingAPI.StreamDomainerExpiredCleaned(ctx).
Date("2026-10-01").Execute()
if err != nil {
log.Fatal(err)
}
out, _ := json.MarshalIndent(result, "", " ")
fmt.Println(string(out))
}
GET /v3.3/stream/domainer/expired/cleaned/email
// Runnable example: Stream cleaned expiring domains with an email (CSV) (GET /v3.3/stream/domainer/expired/cleaned/email)
// Run it from the Getting Started module: save it as main.go, then `go run .`
// Parameters for streamDomainerExpiredCleanedEmail (GET /v3.3/stream/domainer/expired/cleaned/email):
// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints.
// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only...
// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are...
// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on...
package main
import (
"context"
"encoding/json"
"fmt"
"log"
"os"
whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go"
)
func main() {
// Set the API key once on the context; every call made with ctx sends it.
ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys,
map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}})
client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration())
result, _, err := client.DatabasesStreamingAPI.StreamDomainerExpiredCleanedEmail(ctx).
Date("2026-10-01").Execute()
if err != nil {
log.Fatal(err)
}
out, _ := json.MarshalIndent(result, "", " ")
fmt.Println(string(out))
}
GET /v3.3/stream/domainer/expired/cleaned/phone
// Runnable example: Stream cleaned expiring domains with a phone (CSV) (GET /v3.3/stream/domainer/expired/cleaned/phone)
// Run it from the Getting Started module: save it as main.go, then `go run .`
// Parameters for streamDomainerExpiredCleanedPhone (GET /v3.3/stream/domainer/expired/cleaned/phone):
// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints.
// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only...
// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are...
// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on...
package main
import (
"context"
"encoding/json"
"fmt"
"log"
"os"
whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go"
)
func main() {
// Set the API key once on the context; every call made with ctx sends it.
ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys,
map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}})
client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration())
result, _, err := client.DatabasesStreamingAPI.StreamDomainerExpiredCleanedPhone(ctx).
Date("2026-10-01").Execute()
if err != nil {
log.Fatal(err)
}
out, _ := json.MarshalIndent(result, "", " ")
fmt.Println(string(out))
}
GET /v3.3/stream/domainer/dropped
// Runnable example: Stream dropped domains (CSV) (GET /v3.3/stream/domainer/dropped)
// Run it from the Getting Started module: save it as main.go, then `go run .`
// Parameters for streamDomainerDropped (GET /v3.3/stream/domainer/dropped):
// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints.
// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only...
// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are...
// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on...
package main
import (
"context"
"encoding/json"
"fmt"
"log"
"os"
whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go"
)
func main() {
// Set the API key once on the context; every call made with ctx sends it.
ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys,
map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}})
client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration())
result, _, err := client.DatabasesStreamingAPI.StreamDomainerDropped(ctx).
Date("2026-10-01").Execute()
if err != nil {
log.Fatal(err)
}
out, _ := json.MarshalIndent(result, "", " ")
fmt.Println(string(out))
}
GET /v3.3/stream/domainer/dropped/backlinks
// Runnable example: Stream dropped domains with backlinks (CSV) (GET /v3.3/stream/domainer/dropped/backlinks)
// Run it from the Getting Started module: save it as main.go, then `go run .`
// Parameters for streamDomainerDroppedBacklinks (GET /v3.3/stream/domainer/dropped/backlinks):
// - date (string, required): yyyy-MM-dd. Streaming always requires a date, unlike the download endpoints.
// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only...
// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are...
// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on...
package main
import (
"context"
"encoding/json"
"fmt"
"log"
"os"
whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go"
)
func main() {
// Set the API key once on the context; every call made with ctx sends it.
ctx := context.WithValue(context.Background(), whoisfreaks.ContextAPIKeys,
map[string]whoisfreaks.APIKey{"ApiKeyAuth": {Key: os.Getenv("WHOISFREAKS_API_KEY")}})
client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration())
result, _, err := client.DatabasesStreamingAPI.StreamDomainerDroppedBacklinks(ctx).
Date("2026-10-01").Execute()
if err != nil {
log.Fatal(err)
}
out, _ := json.MarshalIndent(result, "", " ")
fmt.Println(string(out))
}
GET /v3.3/stream/domainer/sample/gtld
// Runnable example: Stream a sample of newly registered gTLD domains (CSV) (GET /v3.3/stream/domainer/sample/gtld)
// Run it from the Getting Started module: save it as main.go, then `go run .`
// Parameters for streamDomainerGtldSample (GET /v3.3/stream/domainer/sample/gtld):
// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only...
// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are...
// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on...
package main
import (
"context"
"encoding/json"
"fmt"
"log"
whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go"
)
func main() {
// Public endpoint: no API key needed.
ctx := context.Background()
client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration())
result, _, err := client.DatabasesStreamingAPI.StreamDomainerGtldSample(ctx).Execute()
if err != nil {
log.Fatal(err)
}
out, _ := json.MarshalIndent(result, "", " ")
fmt.Println(string(out))
}
GET /v3.3/stream/domainer/sample/gtld/cleaned
// Runnable example: Stream a sample of cleaned newly registered gTLD domains (CSV) (GET /v3.3/stream/domainer/sample/gtld/cleaned)
// Run it from the Getting Started module: save it as main.go, then `go run .`
// Parameters for streamDomainerGtldCleanedSample (GET /v3.3/stream/domainer/sample/gtld/cleaned):
// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only...
// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are...
// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on...
package main
import (
"context"
"encoding/json"
"fmt"
"log"
whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go"
)
func main() {
// Public endpoint: no API key needed.
ctx := context.Background()
client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration())
result, _, err := client.DatabasesStreamingAPI.StreamDomainerGtldCleanedSample(ctx).Execute()
if err != nil {
log.Fatal(err)
}
out, _ := json.MarshalIndent(result, "", " ")
fmt.Println(string(out))
}
GET /v3.3/stream/domainer/sample/cctld
// Runnable example: Stream a sample of newly registered ccTLD domains (CSV) (GET /v3.3/stream/domainer/sample/cctld)
// Run it from the Getting Started module: save it as main.go, then `go run .`
// Parameters for streamDomainerCctldSample (GET /v3.3/stream/domainer/sample/cctld):
// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only...
// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are...
// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on...
package main
import (
"context"
"encoding/json"
"fmt"
"log"
whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go"
)
func main() {
// Public endpoint: no API key needed.
ctx := context.Background()
client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration())
result, _, err := client.DatabasesStreamingAPI.StreamDomainerCctldSample(ctx).Execute()
if err != nil {
log.Fatal(err)
}
out, _ := json.MarshalIndent(result, "", " ")
fmt.Println(string(out))
}
GET /v3.3/stream/domainer/sample/cctld/cleaned
// Runnable example: Stream a sample of cleaned newly registered ccTLD domains (CSV) (GET /v3.3/stream/domainer/sample/cctld/cleaned)
// Run it from the Getting Started module: save it as main.go, then `go run .`
// Parameters for streamDomainerCctldCleanedSample (GET /v3.3/stream/domainer/sample/cctld/cleaned):
// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only...
// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are...
// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on...
package main
import (
"context"
"encoding/json"
"fmt"
"log"
whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go"
)
func main() {
// Public endpoint: no API key needed.
ctx := context.Background()
client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration())
result, _, err := client.DatabasesStreamingAPI.StreamDomainerCctldCleanedSample(ctx).Execute()
if err != nil {
log.Fatal(err)
}
out, _ := json.MarshalIndent(result, "", " ")
fmt.Println(string(out))
}
GET /v3.3/stream/domainer/sample/expired
// Runnable example: Stream a sample of expiring domains (CSV) (GET /v3.3/stream/domainer/sample/expired)
// Run it from the Getting Started module: save it as main.go, then `go run .`
// Parameters for streamDomainerExpiredSample (GET /v3.3/stream/domainer/sample/expired):
// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only...
// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are...
// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on...
package main
import (
"context"
"encoding/json"
"fmt"
"log"
whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go"
)
func main() {
// Public endpoint: no API key needed.
ctx := context.Background()
client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration())
result, _, err := client.DatabasesStreamingAPI.StreamDomainerExpiredSample(ctx).Execute()
if err != nil {
log.Fatal(err)
}
out, _ := json.MarshalIndent(result, "", " ")
fmt.Println(string(out))
}
GET /v3.3/stream/domainer/sample/expired/cleaned
// Runnable example: Stream a sample of cleaned expiring domains (CSV) (GET /v3.3/stream/domainer/sample/expired/cleaned)
// Run it from the Getting Started module: save it as main.go, then `go run .`
// Parameters for streamDomainerExpiredCleanedSample (GET /v3.3/stream/domainer/sample/expired/cleaned):
// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only...
// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are...
// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on...
package main
import (
"context"
"encoding/json"
"fmt"
"log"
whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go"
)
func main() {
// Public endpoint: no API key needed.
ctx := context.Background()
client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration())
result, _, err := client.DatabasesStreamingAPI.StreamDomainerExpiredCleanedSample(ctx).Execute()
if err != nil {
log.Fatal(err)
}
out, _ := json.MarshalIndent(result, "", " ")
fmt.Println(string(out))
}
GET /v3.3/stream/domainer/sample/dropped
// Runnable example: Stream a sample of dropped domains (CSV) (GET /v3.3/stream/domainer/sample/dropped)
// Run it from the Getting Started module: save it as main.go, then `go run .`
// Parameters for streamDomainerDroppedSample (GET /v3.3/stream/domainer/sample/dropped):
// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only...
// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are...
// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on...
package main
import (
"context"
"encoding/json"
"fmt"
"log"
whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go"
)
func main() {
// Public endpoint: no API key needed.
ctx := context.Background()
client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration())
result, _, err := client.DatabasesStreamingAPI.StreamDomainerDroppedSample(ctx).Execute()
if err != nil {
log.Fatal(err)
}
out, _ := json.MarshalIndent(result, "", " ")
fmt.Println(string(out))
}
GET /v3.3/stream/domainer/sample/dropped/backlinks
// Runnable example: Stream a sample of dropped domains with backlinks (CSV) (GET /v3.3/stream/domainer/sample/dropped/backlinks)
// Run it from the Getting Started module: save it as main.go, then `go run .`
// Parameters for streamDomainerDroppedBacklinksSample (GET /v3.3/stream/domainer/sample/dropped/backlinks):
// - whois (boolean, optional): true streams the full WHOIS record per domain with a CSV header row; false streams only...
// - offset (integer, optional): Data rows to skip from the start of the file. The header row is never counted. Rows are...
// - limit (integer, optional): Maximum data rows to return. Omit for the whole file. limit=0 returns the header row on...
package main
import (
"context"
"encoding/json"
"fmt"
"log"
whoisfreaks "github.com/WhoisFreaks/whoisfreaks-go"
)
func main() {
// Public endpoint: no API key needed.
ctx := context.Background()
client := whoisfreaks.NewAPIClient(whoisfreaks.NewConfiguration())
result, _, err := client.DatabasesStreamingAPI.StreamDomainerDroppedBacklinksSample(ctx).Execute()
if err != nil {
log.Fatal(err)
}
out, _ := json.MarshalIndent(result, "", " ")
fmt.Println(string(out))
}