The WHOIS Go Lang SDK of WhoisFreaks provides powerful WHOIS lookup capabilities, enabling developers to retrieve live and historical WHOIS data. With this feature, you can access detailed domain registration information, track ownership history, and gain insights into domain changes, making it a key tool for domain analysis and cybersecurity.
Go WHOIS SDK package allows you to perform various types of WHOIS lookups, including live, historical, and reverse lookups.
To use the WhoisFreaks Go SDK for WHOIS lookups, follow these steps:
To authenticate your API requests, set your API key using the SetAPIKey method provided by the SDK. This method sets the global API key to the specified value.
func SetAPIKey(key string)Parameters:
Example Usage:
package main
import (
"github.com/WhoisFreaks/whoisfreaks/whois"
)
func main() {
whois.SetAPIKey("your_api_key")
// Your code here
}Replace "your_api_key" with your actual API key.
GetLiveResponse retrieves live WHOIS information for a specific domain using the WhoisFreaks API.
func GetLiveResponse(domain string) (*modal.DomainInfo, *modal.Error)Parameters:
Returns:
Example Usage:
package main
import (
"fmt"
"log"
"github.com/WhoisFreaks/whoisfreaks/whois"
)
func main() {
whois.SetAPIKey("your_api_key")
domain := "example.com"
result, err := whois.LiveLookup(domain)
if err != nil {
log.Fatal(err)
}
fmt.Println(result)
}Replace "example.com" with the domain you wish to query.
GetBulkLiveResponse retrieves live WHOIS information for multiple domains in bulk using the WhoisFreaks API.
func GetBulkLiveResponse(domains []string) (*modal.BulkDomainInfo, *modal.Error)Parameters:
Returns:
Example Usage:
package main
import (
"fmt"
"log"
"github.com/WhoisFreaks/whoisfreaks/whois"
)
func main() {
whois.SetAPIKey("your_api_key")
domains := []string{"example1.com", "example2.com", "example3.com"}
results, err := whois.BulkLiveLookup(domains)
if err != nil {
log.Fatal(err)
}
for _, result := range results {
fmt.Println(result)
}
}Replace the domain names in the domains slice with the domains you wish to query.
GetHistoricalResponse retrieves historical WHOIS information using the WhoisFreaks API.
func GetHistoricalResponse(domain string) (*modal.HistoricalDomainInfo, *modal.Error)Parameters:
Returns:
Example Usage:
package main
import (
"fmt"
"log"
"github.com/WhoisFreaks/whoisfreaks/whois"
)
func main() {
whois.SetAPIKey("your_api_key")
domain := "example.com"
result, err := whois.HistoricalLookup(domain)
if err != nil {
log.Fatal(err)
}
fmt.Println(result)
}Replace "example.com" with the domain you wish to query.
GetReverseResponse performs a reverse WHOIS lookup using the WhoisFreaks API.
func GetReverseResponse(keyword, email, company, owner, page string) (*modal.ReverseDomainInfo, *modal.Error)Parameters:
Returns:
Example Usage:
package main
import (
"fmt"
"log"
"github.com/WhoisFreaks/whoisfreaks/whois"
)
func main() {
whois.SetAPIKey("your_api_key")
keyword := "whoisfreaks"
email := "[email protected]"
owner := "elon"
company := "google"
page := "2"
result, err := whois.GetReverseResponse(keyword, email, company, owner, page)
if err != nil {
log.Fatal(err)
}
fmt.Println(result)
}Replace keyword, email, owner, company, and page with the desired keyword, email address, owner name, company name, and page number, respectively.
GetReverseMiniResponse performs a reverse WHOIS lookup in mini mode using the WhoisFreaks API.
func GetReverseMiniResponse(keyword, email, company, owner, page string) (*modal.ReverseMiniDomainInfo, *modal.Error)Parameters:
Returns:
Example Usage:
package main
import (
"fmt"
"log"
"github.com/WhoisFreaks/whoisfreaks/whois"
)
func main() {
whois.SetAPIKey("your_api_key")
keyword := "whoisfreaks"
email := "[email protected]"
owner := "elon"
company := "google"
page := "2"
result, err := whois.GetReverseMiniResponse(keyword, email, company, owner, page)
if err != nil {
log.Fatal(err)
}
fmt.Println(result)
}Replace keyword, email, owner, company, and page with the desired keyword, email address, owner name, company name, and page number, respectively.
The SDK allows you to perform live, historical, and reverse DNS lookups. You can retrieve comprehensive domain name system records, which are essential for network analysis, troubleshooting, and ensuring proper domain configurations. This feature is ideal for developers managing DNS data and conducting network diagnostics.
This package is for performing any type of DNS lookup, such as live, historical, or reverse lookups.
To utilize the WhoisFreaks Go SDK for DNS Lookups of domain names or IP addresses, follow these steps:
To authenticate your API requests, set your API key using the SetAPIKey method provided by the SDK. This method sets the global API key to the specified value.
func SetAPIKey(key string)Parameters:
Example Usage:
package main
import (
"github.com/WhoisFreaks/whoisfreaks/whois"
)
func main() {
whois.SetAPIKey("your_api_key")
// Your code here
}Replace "your_api_key" with your actual API key.
GetLiveResponse performs a live DNS lookup using the WhoisFreaks API. It retrieves real-time DNS information for a specific domain and DNS type.
func GetLiveResponse(dnsType, domain string) (*modal.DNSInfo, *modal.Error)Parameters:
Returns:
Example Usage:
package main
import (
"fmt"
"log"
"github.com/WhoisFreaks/whoisfreaks/dns"
)
func main() {
dns.SetAPIKey("your_api_key")
domain := "example.com"
dnsType := "A" // Replace with desired DNS record type (e.g., "A", "MX", "CNAME", "AAAA", "NS", "TXT", "SOA", "SPF")
result, err := dns.GetLiveResponse(dnsType, domain)
if err != nil {
log.Fatal(err)
}
fmt.Println(result)
}Replace domain with the domain you wish to query and dnsType with the desired DNS record type (e.g., "A", "MX", "CNAME").
GetHistoricalResponse performs a historical DNS lookup using the WhoisFreaks API. It retrieves historical DNS information for a specific domain and DNS type.
func GetHistoricalResponse(dnsType, domain, page string) (*modal.HistoricalDnsInfo, *modal.Error)Parameters:
Returns:
Example Usage:
package main
import (
"fmt"
"log"
"github.com/WhoisFreaks/whoisfreaks/dns"
)
func main() {
dns.SetAPIKey("your_api_key")
domain := "example.com"
dnsType := "A" // Replace with desired DNS record type
page := "1" // Optional: specify the page number for paginated results
result, err := dns.GetHistoricalResponse(dnsType, domain, page)
if err != nil {
log.Fatal(err)
}
fmt.Println(result)
}Replace "example.com" with the domain you wish to query, adjust dnsType as needed, and specify the page number if necessary.
GetReverseResponse performs a reverse DNS lookup using the WhoisFreaks API.
func GetReverseResponse(dnsType, value, page string) (*modal.ReverseDnsInfo, *modal.Error)Parameters:
Returns:
Example Usage:
package main
import (
"fmt"
"log"
"github.com/WhoisFreaks/whoisfreaks/dns"
)
func main() {
dns.SetAPIKey("your_api_key")
ipAddress := "8.8.8.8" // Replace with the IP address you wish to query
dnsType := "A" // Replace with desired DNS record type
page := "1" // Optional: specify the page number for paginated results
result, err := dns.GetReverseResponse(dnsType, ipAddress, page)
if err != nil {
log.Fatal(err)
}
fmt.Println(result)
}Replace "8.8.8.8" with the IP address you wish to query, adjust dnsType as needed, and specify the page number if necessary.
With the WhoisFreaks Go SDK, you can retrieve SSL certificate details for any domain. This includes information about the certificate's validity, issuer, and other critical details, allowing you to ensure secure communications and verify the authenticity of websites. This feature is vital for securing online transactions and maintaining web security.
This package is for performing any type of SSL lookup.
To utilize the WhoisFreaks Go SDK for SSL Lookup of domain names, follow these steps:
To authenticate your API requests, set your API key using the SetAPIKey method provided by the SDK. This method sets the global API key to the specified value.
func SetAPIKey(key string)Parameters:
Example Usage:
package main
import (
"github.com/WhoisFreaks/whoisfreaks/whois"
)
func main() {
whois.SetAPIKey("your_api_key")
// Your code here
}Replace "your_api_key" with your actual API key.
GetLiveResponse retrieves live SSL information for a specific domain using the WhoisFreaks API.
func GetLiveResponse(domain string, chain bool, raw bool) (*modal.DomainSslInfo, *modal.Error)Parameters:
Returns:
Example Usage:
package main
import (
"fmt"
"log"
"github.com/WhoisFreaks/whoisfreaks/ssl"
)
func main() {
ssl.SetAPIKey("your_api_key")
domain := "example.com"
result, err := ssl.GetLiveResponse(domain)
if err != nil {
log.Fatal(err)
}
fmt.Println(result)
}Replace "example.com" with the domain you wish to query.
The WhoisFreaks Go SDK enables you to check the availability status of domain names, helping developers determine whether a domain is available for registration. This feature supports domain acquisition, brand protection, and proactive management of digital assets by identifying potential domain opportunities.
This package is for performing any type of Domain Availability Lookup.
To utilize the WhoisFreaks Go SDK for checking the availability of domain names, follow these steps:
To authenticate your API requests, set your API key using the SetAPIKey method provided by the SDK. This method sets the global API key to the specified value.
func SetAPIKey(key string)Parameters:
Example Usage:
package main
import (
"github.com/WhoisFreaks/whoisfreaks/whois"
)
func main() {
whois.SetAPIKey("your_api_key")
// Your code here
}Replace "your_api_key" with your actual API key.
Check performs a domain availability check using the WhoisFreaks API. It checks whether a specific domain name is available for registration.
func Check(domain string) (*modal.DomainAvailability, *modal.Error)Parameters:
Returns:
Example Usage:
package main
import (
"fmt"
"log"
"github.com/WhoisFreaks/whoisfreaks/domainavailability"
)
func main() {
domainavailability.SetAPIKey("your_api_key")
domain := "example.com"
result, err := domainavailability.Check(domain)
if err != nil {
log.Fatal(err)
}
fmt.Println(result)
}Replace "example.com" with the domain you wish to check.
CheckAndSuggest performs a domain availability check and suggests similar domain names using the WhoisFreaks API.
func CheckAndSuggest(domain string, sug bool, count string) (*modal.BulkDomainAvailability, *modal.Error)Parameters:
Returns:
Example Usage:
package main
import (
"fmt"
"log"
"github.com/WhoisFreaks/whoisfreaks/domainavailability"
)
func main() {
domainavailability.SetAPIKey("your_api_key")
domain := "example.com"
suggestions := true
count := "5" // Number of suggestions
result, err := domainavailability.CheckAndSuggest(domain, suggestions, count)
if err != nil {
log.Fatal(err)
}
fmt.Println(result)
}Replace "example.com" with the domain you wish to check, set suggestions to true to enable suggestions, and specify the number of suggestions with count.
Bulk performs a bulk domain availability check using the WhoisFreaks API. It checks the availability of multiple domain names in bulk.
func Bulk(domains []string) (*modal.BulkDomainAvailability, *modal.Error)Parameters:
Returns:
Example Usage:
package main
import (
"fmt"
"log"
"github.com/WhoisFreaks/whoisfreaks/domainavailability"
)
func main() {
domainavailability.SetAPIKey("your_api_key")
domains := []string{"example1.com", "example2.com", "example3.com"}
result, err := domainavailability.Bulk(domains)
if err != nil {
log.Fatal(err)
}
fmt.Println(result)
}Replace the domain names in the domains slice with the domains you wish to check.