Get started

ASNLookup API provides an easy, fast and reliable programmatic way to quickly look up information about ASN, organization, CIDR, or registered IP addresses (IPv4 and IPv6) among other relevant data in a simple and effective manner.

To use this API, you need an API key. Please sign up to get your own API key.

If you run into an issue, kindly reach out to us: [email protected]

Get ASN Data


# Here is a curl example
curl -i -s -k -X 'GET' 'https://asn-lookup.p.rapidapi.com/api?asn=AS13414' \
-H 'Host: asn-lookup.p.rapidapi.com' \
-H 'X-Rapidapi-Host: asn-lookup.p.rapidapi.com' \
-H 'X-Rapidapi-Key: 1234184324abc1d88bfe2f60b28bp16e349jsncc0a5f92df8c'
                

To get ASN data you need, make a GET call to the following url :
https://asn-lookup.p.rapidapi.com/api

Only one query parameter is allowed in an API call.

HTTP response is returned in JSON format.



Result example :
[
  {
    "asnHandle": 13414,
    "asnName": "TWITTER",
    "orgID": "TWITT-ARIN",
    "orgName": "TWITTER",
    "orgCountry": "US",
    "ipv4_prefix": [
      "64.63.0.0/18",
      "69.195.160.0/24",
      "69.195.162.0/23",
      "69.195.164.0/23",
      "69.195.166.0/24",
      "69.195.168.0/23",
      "69.195.171.0/24",
      "69.195.172.0/24",
      "69.195.174.0/23",
      "69.195.176.0/21",
      "69.195.184.0/22"
    ],
    "ipv6_prefix": [
      "2400:6680:f000::/36",
      "2606:1f80:f000::/36",
      "2a04:9d40:f000::/36"
    ]
  }
]
                

QUERY PARAMETERS

Field Type Description
asn String AS number (e.g: AS32934 or 32934)
orgname String Organization name (e.g: Facebook)
cidr String IPv4/IPv6 CIDR (e.g: 66.220.144.0/20 or 2620:0:1c00::/40)
ip String IPv4/IPv6 address (e.g: 66.220.144.0 or 2400:6180:0:d1::79b:1)

Errors

The ASNLookup API uses the following error codes:

Error Code Meaning
404 The resource was not found.
403 GET parameter is invalid.
403 Only one query parameter is allowed in a GET call.
403 Parameter value is not valid.
403 Invalid API key - You're not subscribed to this API.