Get a domain's current DNS records with counts of domains sharing each value
GET/domain/{hostname}
- Takes: Domain
- Passive: the target is not contacted
Returns current A, AAAA, MX, NS, SOA and TXT records, each with its first-seen date and statistics such as how many other domains share the same IP, mail server or name server.
Path parameters
hostnameDomain or hostname
Response fields · 8ShowHide
hostname
The hostname looked up
alexa_rank
Alexa rank
ip
Current A record IP
ip_count
Number of domains sharing that IP
first_seen
Date the current A records were first seen
host
Mail server
nameserver
Name server
value
TXT record
curl 'https://api.securitytrails.com/v1/domain/example.com' \
-H 'APIKEY: YOUR_API_KEY'{
"hostname": "example.com",
"alexa_rank": 83756,
"current_dns": {
"a": {
"first_seen": "2020-05-26",
"values": [
{
"ip": "192.0.2.10",
"ip_count": 12
}
]
},
"mx": {
"first_seen": "2020-05-26",
"values": [
{
"priority": 10,
"host": "mail.example.com",
"host_count": 3
}
]
},
"ns": {
"first_seen": "2020-05-26",
"values": [
{
"nameserver": "ns1.example.net",
"nameserver_count": 5213
}
]
},
"txt": {
"first_seen": "2020-05-26",
"values": [
{
"value": "v=spf1 mx -all"
}
]
}
}
}