API: IP2ASN (free)ΒΆ

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

API request and parameters



ip:IPv4 or IPv6 address, for example or 2001:4860:4860::8888

API response

A JSON object with the following fields:

ip:Requested IP address.
announced:IP announced in global routing table (true or false).
cidr:Announced Prefix.
asn:AS Number.
shortname:AS Description.
country:AS Country Registration.


$ curl https://freeapi.dnslytics.net/v1/ip2asn/
  "ip": "",
  "announced": true,
  "cidr": "",
  "asn": 15169,
  "shortname": "Google LLC",
  "country": "US"
$ curl https://freeapi.dnslytics.net/v1/ip2asn/
  "ip": "",
  "announced": false