Routing, hosted domains, hosting history, blocklist and geo data for an IPv4 address.
GET/ipinfo/{ip}
- Takes: IP address
- Takes: Domain
- Passive: the target is not contacted
- Cost: 3 credits
- Plan: Premium
If a hostname is given, the first IPv4 address it resolves to is used. Lists up to 10 domains, MX and NS records and up to 100 neighbouring IPs in the /24.
Path parameters
ipIPv4 address, or a hostname
Response fields · 14ShowHide
status
succeed or error
question
The requested IP address
asn
Autonomous system number
cidr
Routed subnet in CIDR form
shortname
AS name
ptr
Reverse DNS record, empty if none
ndomains
Number of domains on the IP
domains[]
Up to 10 domains
ndomains
Unique domains hosted in the past
ip
IP in the same /24 with hosted domains
count
Domains on that IP
dnsblcountsubnet
Listed IPs in the subnet
country_code
Country code
country_name
Country name
curl 'https://api.dnslytics.net/v1/ipinfo/203.0.113.7?apikey=YOUR_API_KEY'{
"status": "succeed",
"data": {
"question": "203.0.113.7",
"typeinfo": "ipinfo",
"asinfo": {
"asn": 64500,
"ip_start": "203.0.113.0",
"ip_end": "203.0.113.255",
"subnet": 24,
"cidr": "203.0.113.0/24",
"shortname": "Example Hosting"
},
"ptr": "",
"ndomains": 2,
"domains": [
"example.com",
"example.org"
],
"hostinghistory": {
"ndomains": 5,
"nmxrecords": 1,
"nnsrecords": 0
},
"subnethosting": {
"ips": [
{
"ip": "203.0.113.8",
"count": 1,
"example": "example.net"
}
]
},
"blocklist": {
"dnsblcountsubnet": 0
},
"geoinfo": {
"country_code": "US",
"country_name": "United States"
}
}
}