curl --request POST \
--url https://apix.spotzee.com/api/ext/generic/dns/dns-record-lookup \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data hostname=example.comimport requests
url = "https://apix.spotzee.com/api/ext/generic/dns/dns-record-lookup"
payload = { "hostname": "example.com" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/x-www-form-urlencoded"
}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: 'Bearer <token>',
'Content-Type': 'application/x-www-form-urlencoded'
},
body: new URLSearchParams({hostname: 'example.com'})
};
fetch('https://apix.spotzee.com/api/ext/generic/dns/dns-record-lookup', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://apix.spotzee.com/api/ext/generic/dns/dns-record-lookup"
payload := strings.NewReader("hostname=example.com")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"status": "success",
"data": {
"exists": true,
"data": {
"Status": 0,
"TC": false,
"RD": true,
"RA": true,
"AD": false,
"CD": false,
"Question": [
{
"name": "<string>",
"type": 123
}
],
"Answer": [
{
"name": "example.com",
"type": 1,
"TTL": 300,
"data": "192.168.1.1"
}
]
},
"error": "<string>"
}
}{
"status": "error",
"error": "Invalid request parameters"
}{
"status": "error",
"error": "Invalid request parameters"
}{
"status": "error",
"error": "Invalid request parameters"
}{
"status": "error",
"error": "Invalid request parameters"
}{
"status": "error",
"error": "Invalid request parameters"
}{
"status": "error",
"error": "Invalid request parameters"
}Perform DNS record lookup
Performs comprehensive DNS record lookups for a hostname. Supports all major record types (A, AAAA, MX, TXT, CNAME, NS, SOA, PTR, SRV, CAA) with optional DNSSEC validation. Results are cached for performance optimization.
curl --request POST \
--url https://apix.spotzee.com/api/ext/generic/dns/dns-record-lookup \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data hostname=example.comimport requests
url = "https://apix.spotzee.com/api/ext/generic/dns/dns-record-lookup"
payload = { "hostname": "example.com" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/x-www-form-urlencoded"
}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: 'Bearer <token>',
'Content-Type': 'application/x-www-form-urlencoded'
},
body: new URLSearchParams({hostname: 'example.com'})
};
fetch('https://apix.spotzee.com/api/ext/generic/dns/dns-record-lookup', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://apix.spotzee.com/api/ext/generic/dns/dns-record-lookup"
payload := strings.NewReader("hostname=example.com")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"status": "success",
"data": {
"exists": true,
"data": {
"Status": 0,
"TC": false,
"RD": true,
"RA": true,
"AD": false,
"CD": false,
"Question": [
{
"name": "<string>",
"type": 123
}
],
"Answer": [
{
"name": "example.com",
"type": 1,
"TTL": 300,
"data": "192.168.1.1"
}
]
},
"error": "<string>"
}
}{
"status": "error",
"error": "Invalid request parameters"
}{
"status": "error",
"error": "Invalid request parameters"
}{
"status": "error",
"error": "Invalid request parameters"
}{
"status": "error",
"error": "Invalid request parameters"
}{
"status": "error",
"error": "Invalid request parameters"
}{
"status": "error",
"error": "Invalid request parameters"
}Authorizations
Bearer token authentication. Use format: Bearer YOUR_API_KEY
Body
Hostname to lookup DNS records for
"example.com"
DNS record type
A, AAAA, MX, TXT, CNAME, NS, SOA, PTR, SRV, CAA "A"
Only return DNSSEC validated results
"false"
Validate DNSSEC signatures
"false"
Response
Successfully retrieved DNS records
Indicates successful operation
success Hide child attributes
Hide child attributes
Whether DNS records exist
true
Hide child attributes
Hide child attributes
DNS query status code (0 = NOERROR)
0
Truncated response flag
false
Recursion desired flag
true
Recursion available flag
true
Authenticated data flag (DNSSEC)
false
Checking disabled flag (DNSSEC)
false
DNS answer records
Hide child attributes
Hide child attributes
Domain name
"example.com"
DNS record type numeric code
1
Time to live in seconds
300
Record data (IP address, hostname, text, etc.)
"192.168.1.1"
Error message if DNS query failed
Was this page helpful?