home
home

API Documentation: IP2ASN

IP2ASN

The IP2ASN API call retrieves ASN & Subnet info about an IP address (IPv4 and IPv6).

API request

https://freeapi.dnslytics.net/v1/ip2asn/<ip>

API response

Examples

URL

$ curl https://freeapi.dnslytics.net/v1/ip2asn/8.8.8.8

Output

{
  "ip": "8.8.8.8",
  "announced": true,
  "cidr": "8.8.8.0/24",
  "asn": 15169,
  "shortname": "Google LLC",
  "country": "US"
}

URL

$ curl https://freeapi.dnslytics.net/v1/ip2asn/192.168.1.1

Output

{
  "ip": "192.168.1.1",
  "announced": false
}