Logo
Logo

PRODUCTS

TOOLS

pricing background

GoAPI Integration

api

Live

1package main
2
3import (
4	"fmt"
5	"net/http"
6	"strings"
7	"io/ioutil"
8)
9
10func main() {
11	var payload *strings.Reader = nil
12	req, _ := http.NewRequest("GET", "https://api.whoisfreaks.com/v2.0/dns/live?apiKey=API_KEY&domainName=whoisfreaks.com&ipAddress=8.8.8.8&type=all", payload)
13	client := &http.Client{}
14	resp, _ := client.Do(req)
15	defer resp.Body.Close()
16	body, _ := ioutil.ReadAll(resp.Body)
17	fmt.Println(string(body))
18}

Historical

1package main
2
3import (
4	"fmt"
5	"net/http"
6	"strings"
7	"io/ioutil"
8)
9
10func main() {
11	var payload *strings.Reader = nil
12	req, _ := http.NewRequest("GET", "https://api.whoisfreaks.com/v2.0/dns/historical?apiKey=API_KEY&domainName=whoisfreaks.com&type=all&page=1", payload)
13	client := &http.Client{}
14	resp, _ := client.Do(req)
15	defer resp.Body.Close()
16	body, _ := ioutil.ReadAll(resp.Body)
17	fmt.Println(string(body))
18}

Reverse

1package main
2
3import (
4	"fmt"
5	"net/http"
6	"strings"
7	"io/ioutil"
8)
9
10func main() {
11	var payload *strings.Reader = nil
12	req, _ := http.NewRequest("GET", "https://api.whoisfreaks.com/v2.1/dns/reverse?apiKey=API_KEY&format=json&value=8.8.8.8&type=a", payload)
13	client := &http.Client{}
14	resp, _ := client.Do(req)
15	defer resp.Body.Close()
16	body, _ := ioutil.ReadAll(resp.Body)
17	fmt.Println(string(body))
18}

Bulk DNS

1package main
2
3import (
4	"fmt"
5	"net/http"
6	"strings"
7	"io/ioutil"
8)
9
10func main() {
11	payload := strings.NewReader("{"domainNames": ["whoisfreaks.com","jfreaks.com"],"ipAddresses": ["1.1.1.1","8.8.8.8"]}")
12	req, _ := http.NewRequest("GET", "https://api.whoisfreaks.com/v2.0/dns/bulk/live?apiKey=API_KEY&type=all&format=json", payload)
13	req.Header.Set("Content-Type", "application/json")
14	client := &http.Client{}
15	resp, _ := client.Do(req)
16	defer resp.Body.Close()
17	body, _ := ioutil.ReadAll(resp.Body)
18	fmt.Println(string(body))
19}