dropdown

ASN Whois Lookup Documentation

Overview

  • ASN Whois Lookup
    ASN Whois Lookup allows you to fetch all ASN related information which include ASN blocks, contact details and more.

Authorization

You can make authorized requests to our API by passing API key as a query parameter. To get your API key, login to our billing dashboard and get your API key! If your API key has been compromised, you can change it by clicking on reset button in billing dashboard.


ASN Whois Lookup

API

GET https://api.whoisfreaks.com/v1.0/asn-whois?apiKey=API_KEY&asn=as56554 Copy
Copied


Input parameters: required

apiKey Get your API key from our billing dashboard.

asn The ASN number for requested whois.

Input parameters: optional

format Two formats are available JSON, XML. If you don't pass 'format' parameter, default format is JSON.


Code Snippets


curl --location --request GET 'https://api.whoisfreaks.com/v1.0/asn-whois?apiKey=API_KEY&asn=as56554'
Copy

                        

var request = require('request');
var options = {
  'method': 'GET',
  'url': 'https://api.whoisfreaks.com/v1.0/asn-whois?apiKey=API_KEY&asn=as56554',
  'headers': {
  }
};
request(options, function (error, response) {
  if (error) throw new Error(error);
  console.log(response.body);
});


Copy

                        

OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
Request request = new Request.Builder()
  .url("https://api.whoisfreaks.com/v1.0/asn-whois?apiKey=API_KEY&asn=as56554")
  .method("GET", null)
  .build();
Response response = client.newCall(request).execute();

Copy


import http.client

conn = http.client.HTTPSConnection("api.whoisfreaks.com")
payload = ''
headers = {}

conn.request("GET", "/v1.0/asn-whois?apiKey=API_KEY&asn=as56554", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))

Copy

                        

<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.whoisfreaks.com/v1.0/asn-whois?apiKey=API_KEY&asn=as56554',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;


Copy

                        

require "uri"
require "net/http"

url = URI("https://api.whoisfreaks.com/v1.0/asn-whois?apiKey=API_KEY&asn=as56554")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Get.new(url)

response = https.request(request)
puts response.read_body


Copy

                        

var requestOptions = {
  method: 'GET',
  redirect: 'follow'
};

fetch("https://api.whoisfreaks.com/v1.0/asn-whois?apiKey=API_KEY&asn=as56554", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));

Copy

                        

var client = new RestClient("https://api.whoisfreaks.com/v1.0/asn-whois?apiKey=API_KEY&asn=as56554");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);

Copy

                        

package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {

  url := "https://api.whoisfreaks.com/v1.0/asn-whois?apiKey=API_KEY&asn=as56554"
  method := "GET"

  client := &http.Client {
  }
  req, err := http.NewRequest(method, url, nil)

  if err != nil {
    fmt.Println(err)
    return
  }
  res, err := client.Do(req)
  if err != nil {
    fmt.Println(err)
    return
  }
  defer res.Body.Close()

  body, err := ioutil.ReadAll(res.Body)
  if err != nil {
    fmt.Println(err)
    return
  }
  fmt.Println(string(body))
}

Copy


CURL *curl;
CURLcode res;
curl = curl_easy_init();
if(curl) {
  curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "GET");
  curl_easy_setopt(curl, CURLOPT_URL, "https://api.whoisfreaks.com/v1.0/asn-whois?apiKey=API_KEY&asn=as56554");
  curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
  curl_easy_setopt(curl, CURLOPT_DEFAULT_PROTOCOL, "https");
  struct curl_slist *headers = NULL;
  curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
  res = curl_easy_perform(curl);
}
curl_easy_cleanup(curl);


Copy

                        

import Foundation
#if canImport(FoundationNetworking)
import FoundationNetworking
#endif

var semaphore = DispatchSemaphore (value: 0)

var request = URLRequest(url: URL(string: "https://api.whoisfreaks.com/v1.0/asn-whois?apiKey=API_KEY&asn=as56554")!,timeoutInterval: Double.infinity)
request.httpMethod = "GET"

let task = URLSession.shared.dataTask(with: request) { data, response, error in
  guard let data = data else {
    print(String(describing: error))
    semaphore.signal()
    return
  }
  print(String(data: data, encoding: .utf8)!)
  semaphore.signal()
}

task.resume()
semaphore.wait()


Copy

                        

Response

The Live ASN-Whois API provides responses in JSON/XML formats. You can pass the desired format as a parameter to consume the API in your preferred style. The default format is JSON. An ASN to WHOIS API provides detailed information about an Autonomous System Number (ASN), a unique identifier allocated to each autonomous system (AS) that participates in internet routing. When queried with an ASN, this API reveals comprehensive WHOIS data, which typically includes the ASN's allocation and assignment details, the name and description of the AS, its routing policies, and the status (e.g., assigned or active). Additionally, it discloses the organization responsible for the ASN, including its name, type, and contact information—both for administrative and technical inquiries. The API also often provides details about the maintenance of the ASN records and may include specific blocks of IP addresses associated with the ASN. This information is crucial for network administrators, cyber-security professionals, and researchers to understand the management and operational aspects of internet routing, as well as for identifying and contacting the relevant authorities for issues related to internet infrastructure and security. The API's output is an invaluable tool in the realm of digital communications and internet resource management.


{
    "status": true,
    "as_number": "AS56554",
    "query_time": "2024-02-01 08:28:26",
    "whois_server": "whois.ripe.net",
    "as_blocks": [
        {
            "as_block": "AS56444 - AS57146",
            "description": [
                "RIPE NCC ASN block"
            ],
            "remarks": [
                "These AS Numbers are assigned to network operators in the RIPE NCC service region."
            ],
            "mnt_by": [
                "RIPE-NCC-HM-MNT"
            ],
            "date_created": "2023-08-23",
            "date_updated": "2023-08-23",
            "source": "RIPE"
        }
    ],
    "aut_nums": [
        {
            "aut_num": "AS56554",
            "as_name": "IETF-MEETING",
            "description": [
                "IETF Meeting Network"
            ],
            "status": "ASSIGNED",
            "import": [
                "from AS-ANY accept ANY"
            ],
            "export": [
                "to AS-ANY announce ANY"
            ],
            "organization": "ORG-IS136-RIPE",
            "sponsoring_organization": "ORG-NIE1-RIPE",
            "admin_contacts": [
                "IED11-RIPE"
            ],
            "tech_contacts": [
                "IETF-RIPE"
            ],
            "mnt_by": [
                "RIPE-NCC-END-MNT",
                "IETF-MNT",
                "netnod-mnt"
            ],
            "date_created": "2011-03-16",
            "date_updated": "2019-03-26",
            "source": "RIPE"
        }
    ],
    "organization": {
        "handle": "ORG-IS136-RIPE",
        "name": "Internet Society",
        "type": "OTHER",
        "address": [
            "Galerie Jean-Malbuisson 15, CH-1204 Geneva, Switzerland"
        ],
        "street": "Galerie Jean-malbuisson",
        "city": "Geneva",
        "zip_code": "CH-1204",
        "country": [
            "CH"
        ],
        "abuse_contacts": [
            "AR28097-RIPE"
        ],
        "mnt_ref": [
            "netnod-mnt"
        ],
        "mnt_by": [
            "ietf-mnt"
        ],
        "date_created": "2010-11-09",
        "date_updated": "2022-12-01",
        "source": "RIPE"
    },
    "administrative_contacts": [
        {
            "handle": "IED11-RIPE",
            "name": "IETF Executive Director",
            "address": [
                "c/o Association Management Solutions, LLC (AMS)",
                "5177 Brandin Court",
                "Fremont, California 94538",
                "USA"
            ],
            "street": "Brandin Court",
            "city": "Fremont",
            "state": "CALIFORNIA",
            "zip_code": "94538",
            "country": "USA",
            "mnt_by": [
                "IETF-MNT"
            ],
            "date_created": "2019-03-26",
            "date_updated": "2019-03-26",
            "source": "RIPE"
        }
    ],
    "technical_contacts": [
        {
            "handle": "IETF-RIPE",
            "name": "IETF NOC",
            "address": [
                "c/o Association Management Solutions, LLC (AMS)",
                "5177 Brandin Court",
                "Fremont, California 94538",
                "USA"
            ],
            "street": "Brandin Court",
            "city": "Fremont",
            "state": "CALIFORNIA",
            "zip_code": "94538",
            "country": "USA",
            "tech_contacts": [
                "JM13150-RIPE",
                "SC21890-RIPE",
                "WK1766-RIPE",
                "CS218"
            ],
            "mnt_by": [
                "IETF-MNT"
            ],
            "date_created": "2019-03-26",
            "date_updated": "2019-05-28",
            "source": "RIPE"
        }
    ],
    "whois_raw_response": "% This is the RIPE Database query service.\n% The objects are in RPSL format.\n%\n% The RIPE Database is subject to Terms and Conditions.\n% See https://apps.db.ripe.net/docs/HTML-Terms-And-Conditions\n\n% Note: this output has been filtered.\n%       To receive output for a database update, use the \"-B\" flag.\n\n% Information related to 'AS56444 - AS57146'\n\nas-block:       AS56444 - AS57146\ndescr:          RIPE NCC ASN block\nremarks:        These AS Numbers are assigned to network operators in the RIPE NCC service region.\nmnt-by:         RIPE-NCC-HM-MNT\ncreated:        2023-08-23T15:27:46Z\nlast-modified:  2023-08-23T15:27:46Z\nsource:         RIPE\n\n% Information related to 'AS56554'\n\n% Abuse contact for 'AS56554' is 'abuse@noc.ietf.org'\n\naut-num:        AS56554\nas-name:        IETF-MEETING\ndescr:          IETF Meeting Network\norg:            ORG-IS136-RIPE\nimport:         from AS-ANY accept ANY\nexport:         to AS-ANY announce ANY\nadmin-c:        IED11-RIPE\ntech-c:         IETF-RIPE\nstatus:         ASSIGNED\nmnt-by:         RIPE-NCC-END-MNT\nmnt-by:         IETF-MNT\nmnt-by:         netnod-mnt\ncreated:        2011-03-16T15:24:33Z\nlast-modified:  2019-03-26T08:50:53Z\nsource:         RIPE # Filtered\nsponsoring-org: ORG-NIE1-RIPE\n\norganisation:   ORG-IS136-RIPE\norg-name:       Internet Society\ncountry:        CH\norg-type:       OTHER\naddress:        Galerie Jean-Malbuisson 15, CH-1204 Geneva, Switzerland\nabuse-c:        AR28097-RIPE\nmnt-ref:        netnod-mnt\nmnt-by:         ietf-mnt\ncreated:        2010-11-09T08:26:08Z\nlast-modified:  2022-12-01T16:31:33Z\nsource:         RIPE # Filtered\n\nrole:           IETF Executive Director\naddress:        c/o Association Management Solutions, LLC (AMS)\naddress:        5177 Brandin Court\naddress:        Fremont, California 94538\naddress:        USA\nnic-hdl:        IED11-RIPE\nmnt-by:         IETF-MNT\ncreated:        2019-03-26T08:38:58Z\nlast-modified:  2019-03-26T08:38:58Z\nsource:         RIPE # Filtered\n\nrole:           IETF NOC\naddress:        c/o Association Management Solutions, LLC (AMS)\naddress:        5177 Brandin Court\naddress:        Fremont, California 94538\naddress:        USA\ntech-c:         JM13150-RIPE\ntech-c:         SC21890-RIPE\ntech-c:         WK1766-RIPE\ntech-c:         CS218\nnic-hdl:        IETF-RIPE\nmnt-by:         IETF-MNT\ncreated:        2019-03-26T08:30:32Z\nlast-modified:  2019-05-28T14:36:16Z\nsource:         RIPE # Filtered\n\n% This query was served by the RIPE Database Query Service version 1.109.1 (DEXTER)"
}

                


HTTP Error Codes

Below mentioned possible type of error and desc.

HTTP Code
Error Message
400 Request-param 'asn' (<asn>) is not valid. 400 Request-param 'format' (<format>) is not valid. Supported formats are json, xml. 401 Provided API key is invalid. [For Technical Support: support@whoisfreaks.com] 401 Provided API key is inactive. [For Technical Support: support@whoisfreaks.com] 401 Please buy subscription plan or add api credits then use this api key. [For Technical Support: support@whoisfreaks.com] 401 Your subscription is deactivated.Please buy new plan or add api credits for using whoisfreaks api's [For Technical Support: support@whoisfreaks.com] 401 Your subscription is deactivated due to many times payment failure.Please buy new plan or add api credits for using whoisfreaks api's. 401 Your account is deactivated.[For Technical Support: support@whoisfreaks.com] 408 Unable to fetch whois data. Please try again. [For technical support: support@whoisfreaks.com] 412 You have exceeded the limit of api plan requests and your subscription canceled.Please contact our technical support team: support@whoisfreaks.com] 413 You have exceeded the limit of api credits requests [allowed_request_no].Please upgrade your plan [For Technical Support: support@whoisfreaks.com] 413 You have exceeded the limit of Surcharge Requests [allowed_surcharge_request_no]. Please upgrade your plan [For Technical Support: support@whoisfreaks.com] 429 Please slow down.Your maximum request limit per minute reached. 500 Internal Server Error occurred [For Technical Support: support@whoisfreaks.com]. 503 Service is unavailable. Please try after some time or contact support@whoisfreaks.com. 504 Request is timed-out. Please contact at support@whoisfreaks.com.

HTTP Success Codes

Below-mentioned possible type of success status codes and their desc.

HTTP Code
Description
200 OK (Request is processed successfully.) 206 Partial Response.

Credits Usage API

You need credits in order to use Whoisfreaks API. ASN Whois Lookup service will charge 1 credit per successful query for an ASN. Surcharge requests are only allowed to credit subscribers. You can fetch credits usage and remaining credits information through an API.

GET https://api.whoisfreaks.com/v1.0/whoisapi/usage?apiKey=API_KEY Copy
Copied

Input parameters: required

apiKey Get your API key from our billing dashboard.

Input parameters: optional

format Two formats are available JSON, XML. If you don't pass 'format' parameter, default format is JSON.


Response

You can get API key from our billing dashboard.

                    
{
    "apiKey": "API_KEY",
    "apiCredits": {
        "totalCredits": 1020079,
        "servedRequest": 1533
    },
    "apiSubscription": {
        "subscriptionStatus": "deactivated",
        "requestLimit": 0,
        "servedRequests": 18,
        "surchargeRequestLimit": 0,
        "servedSurchargeRequests": 0
    }
}
                    
        

FAQs

What is an ASN WHOIS Lookup?

ASN WHOIS Lookup is a process to obtain information about an Autonomous System Number (ASN), which includes details about the organization that holds the ASN, routing policies, and more.



What kind of information does an ASN WHOIS Lookup reveal?

It reveals the ASN's registration details, the organization managing it, routing policies, status, and contact information for administrative and technical issues.



Why is ASN WHOIS Lookup important?

It's important for understanding the management of internet routing, identifying the operators of large networks, and for network troubleshooting or research purposes.



How often is ASN WHOIS data updated?

This depends on the policies of the regional internet registry maintaining the data. It's generally updated whenever there are significant changes to the ASN or its associated organization.