ASN Lookup API - Get Real-Time ASN WHOIS Information

Our Autonomous System Number (ASN) Lookup API delivers real-time access to detailed ASN WHOIS data directly from Regional Internet Registries (RIR). Ideal for network administrators, cybersecurity professionals, and businesses, this API provides precise and latest information on Autonomous System Numbers (ASNs), including organizational details, routing policies, and contact information. Whether you are performing an ASN lookup, conducting an ASN search, or retrieving specific ASN WHOIS data, our API offers reliable and up-to-date results to support your network management and security needs.

10K Free Credits, No Credit Card Required

Features

Real-time Data

Our ASN Lookup API provides immediate access to up-to-date ASN WHOIS data sourced directly from Regional Internet Registries (RIRs). This ensures that you receive the most current and accurate information available, helping you stay informed about ASN details as they evolve.

Structured & Raw WHOIS Data

The API provides both structured and raw ASN WHOIS data. The structured data offers easy integration and usability for standard applications, while the raw, unprocessed data is ideal for advanced machine learning algorithms and in-depth analysis. This flexibility supports a wide range of use cases, from routine network operations to complex data processing tasks.

Documentation

API Endpoint

GET

https://api.apifreaks.com/v1.0/asn/whois/live

Test
LANGUAGE
Python
PHP
Java
Node
Ruby
$ pip install requests

API Request

ParameterRequiredTypeDefaultDescription
asnYesString
Autonomous System Number whose WHOIS required It accepts both with and without 'as'. For example: as56554 or 56554

API Response

FieldTypeRequirementDescription
statusBooleanMandatory
true if the WHOIS response from whois_server is a complete response
as_numberStringMandatory
AS number to query live WHOIS, e.g., AS1, 3655, etc.
query_timeStringMandatory
Date and time of WHOIS query in the yyyy-MM-dd HH:mm:ss format
whois_serverStringMandatory
WHOIS host server used to query the as_number
as_blocksList<ASBlock>Optional
Details of AS blocks associated with the AS number
as_setsList<ASSet>Optional
Details of AS sets associated with the AS number
aut_numsList<AutNum>Optional
Details of Autonomous System (AS) numbers associated with the AS number
irt.handleStringMandatory
Handle or unique identifier of this irt in the WHOIS data
irt.addressList<String>Mandatory
all values of address in the irt object
irt.streetStringOptional
parsed street address from address
irt.cityStringOptional
parsed city from address
irt.districtStringOptional
parsed district from address
irt.stateStringOptional
parsed state from address
irt.zip_codeStringOptional
parsed ZIP Code from address
irt.countryStringOptional
parsed country from address
irt.emailList<String>Mandatory
all values of email in the irt object
irt.abuse_mailboxList<String>Optional
all values of abuse-mailbox in the irt object
irt.phoneList<String>Optional
all values of phone in the irt object
irt.fax_noList<String>Optional
all values of fax-no in the irt object
irt.organizationsList<String>Optional
all handles oforganization objects, irt object is linked to
irt.admin_contactsList<String>Mandatory
All handles (unique IDs) of admin persons or roles in WHOIS data
irt.tech_contactsList<String>Mandatory
All handles (unique IDs) of tech persons or roles in WHOIS data
irt.remarksList<String>Optional
all values of remarks in the irt object
irt.signatureList<String>Optional
all values of signature in the irt object
irt.encryptionList<String>Optional
all values of encryption in the irt object
irt.authList<String>Optional
all values of auth in the irt object
irt.notifyList<String>Optional
all values of notify in the irt object
irt.irt_nfyList<String>Optional
all values of irt-nfy in the irt object
irt.mnt_byList<String>Optional
all values of mnt-by in the irt object
irt.mnt_refList<String>Optional
all values of mnt-ref in the irt object
irt.date_createdStringOptional
This object's registration date, parsed in yyyy-MM-dd format
irt.date_updatedStringMandatory
This object's last update date, parsed in yyyy-MM-dd format
irt.sourceStringMandatory
WHOIS data source of this object
organization.handleStringMandatory
Handle or unique identifier of this organization object in WHOIS data
organization.nameStringMandatory
Name of the organization
organization.typeStringOptional
Type of the organization
organization.descriptionList<String>Optional
all values of description in the organization object
organization.addressList<String>Mandatory
all values of address in the organization object
organization.streetStringOptional
parsed street address from address
organization.cityStringOptional
parsed city from address
organization.districtStringOptional
parsed district from address
organization.stateStringOptional
parsed state from address
organization.zip_codeStringOptional
parsed ZIP code from address
organization.countryStringOptional
parsed country from address
organization.latitudeDoubleOptional
latitude parsed from the geoloc field
organization.longitudeDoubleOptional
longitude parsed from the geoloc field
organization.emailList<String>Mandatory
all values of email in the organization object
organization.abuse_mailboxList<String>Optional
all values of abuse-mailbox in the organization object
organization.phoneList<String>Optional
all values of phone in the organization object
organization.fax_noList<String>Optional
all values of fax-no in the organization object
organization.organizationsList<String>Optional
all handles of organization objects, linked to this organization
organization.admin_contactsList<String>Optional
All handles (unique IDs) of admin persons or roles in WHOIS data
organization.tech_contactsList<String>Optional
All handles (unique IDs) of tech persons or roles in WHOIS data
organization.abuse_contactsList<String>Optional
All handles (unique IDs) of persons or roles, managing abuse related to this organization, in WHOIS data
organization.languagesList<String>Optional
all values of language in the organization object
organization.remarksList<String>Optional
all values of remarks in the organization object
organization.notifyList<String>Optional
all values of notify in the organization object
organization.ref_nfyList<String>Optional
all values of ref-nfy in the organization object
organization.mnt_refList<String>Optional
all values of mnt-ref in the organization object
organization.mnt_byList<String>Optional
all values of mnt-by in the organization object
organization.date_createdStringOptional
This object's registration date, parsed in yyyy-MM-dd format
organization.date_updatedStringMandatory
This object's last update date, parsed in yyyy-MM-dd format
organization.sourceStringMandatory
WHOIS data source of this object
administrative_contactsList<Object>Optional
List of administrative contacts
technical_contactsList<Object>Optional
List of technical contacts
abuse_contactsList<Object>Optional
List of abuse contacts
whois_raw_responseStringMandatory
WHOIS response (unparsed) from the whois_server WHOIS server
r_whois_raw_responseStringMandatory
WHOIS response from the rwhois server

ASBlock object contains following fields:

FieldTypeRequirementDescription
as_blockStringMandatory
AS numbers block
typeStringOptional
Type of AS numbers block
countryStringOptional
Country of organization managing this as-block object
descriptionList<String>Optional
all values of description in the as-block object
organizationsList<String>Optional
All handles of 'organization' objects holding this as-block
admin_contactsList<String>Optional
All handles (unique IDs) of admin persons or roles in WHOIS data
tech_contactsList<String>Optional
All handles (unique IDs) of tech persons or roles in WHOIS data
remarksList<String>Optional
all values of remarks/ in as-block object
notifyList<String>Optional
all values of notify in as-block object
mnt_byList<String>Mandatory
all values of mnt-by in as-block object
mnt_lowerList<String>Optional
all values of mnt-lower in as-block object
date_createdStringOptional
This object's registration date, parsed in yyyy-MM-dd format
date_updatedStringMandatory
This object's registration date, parsed in yyyy-MM-dd format
sourceStringMandatory
WHOIS data source of this object

ASSet object contains following fields:

FieldTypeRequirementDescription
as_setStringMandatory
AS numbers set
countryStringOptional
Country of organization managing this as-block object
descriptionList<String>Optional
all values of description in the as-block object
organizationsList<String>Optional
All handles of 'organization' objects holding this as-block
admin_contactsList<String>Optional
All handles (unique IDs) of admin persons or roles in WHOIS data
tech_contactsList<String>Optional
All handles (unique IDs) of tech persons or roles in WHOIS data
remarksList<String>Optional
all values of remarks in as-block object
notifyList<String>Optional
all values of notify in as-block object
mnt_byList<String>Mandatory
all values of mnt-by in as-block object
mnt_lowerList<String>Optional
all values of mnt-lower in as-block object
date_createdStringOptional
This object's registration date, parsed in yyyy-MM-dd format
date_updatedStringMandatory
This object's registration date, parsed in yyyy-MM-dd format
sourceStringMandatory
WHOIS data source of this object

AutNum object contains following fields:

FieldTypeRequirementDescription
aut_numStringMandatory
Autonomous System (AS) number
as_handleStringMandatory
Handle (unique ID) of this aut-num in WHOIS data
as_nameStringMandatory
AS name for the network handling this network
descriptionList<String>Optional
all values of description in the aut-num object
countryStringOptional
Country of organization holding the aut-num object
statusStringOptional
Assignment or allocation status
member_ofList<String>Optional
all values of member-of in the aut-num object
import_viaList<String>Optional
all values of import-via in the aut-num object
importList<String>Optional
all values of import in the aut-num object
mp_importList<String>Optional
all values of mp-import in the aut-num object
export_viaList<String>Optional
all values of export-via in the aut-num object
exportList<String>Optional
all values of export in the aut-num object
mp_exportList<String>Optional
all values of mp-export in the aut-num object
defaultList<String>Optional
all values of default in the aut-num object
mp_defaultList<String>Optional
all values of mp-default in the aut-num object
organizationStringOptional
Handle (unique ID) of the organization in WHOIS data, managing this aut-num
sponsoring_organizationStringOptional
Handle (unique ID) of the sponsoring-organization in WHOIS data, sponsoring this aut-num
admin_contactsList<String>Mandatory
All handles (unique IDs) of admin persons or roles in WHOIS data
tech_contactsList<String>Mandatory
All handles (unique IDs) of tech persons or roles in WHOIS data
abuse_contactsList<String>Optional
All handles (unique IDs) of persons or roles, managing abuse to this aut-num, in WHOIS data
remarksList<String>Optional
all values of remarks in the aut-num object
notifyList<String>Optional
all values of notify in the aut-num object
mnt_irtList<String>Optional
all values of mnt-irt in the aut-num object
mnt_lowerList<String>Optional
all values of mnt-lower in the aut-num object
mnt_routesList<String>Optional
all values of mnt-routes in the aut-num object
mnt_byList<String>Optional
all values of mnt-by in the aut-num object
date_createdStringOptional
This object's registration date, parsed in yyyy-MM-dd format
date_updatedStringMandatory
This object's registration date, parsed in yyyy-MM-dd format
sourceStringMandatory
WHOIS data source of this object

Each object within the lists of administrative contacts, technical contacts, and abuse contacts comprises the following fields:

FieldTypeRequirementDescription
handleStringMandatory
Handle or unique identifier of this person or role object in WHOIS data
nameStringMandatory
Name of the person or role
addressList<String>Mandatory
all values of address in the object
streetStringOptional
parsed street address from address
cityStringOptional
parsed city from address
districtStringOptional
parsed district from address
stateStringOptional
parsed state from address
zip_codeStringOptional
parsed ZIP Code from address
countryStringOptional
parsed country from address
emailList<String>Mandatory
all values of email in the object
abuse_mailboxList<String>Optional
all values of abuse-mailbox in the object
phoneList<String>Optional
all values of phone in the object
fax_noList<String>Optional
all values of fax-no in the object
organizationsList<String>Optional
All handles of organization objects, managing this person or role object
admin_contactsList<String>Optional
All handles (unique IDs) of admin persons or roles in WHOIS data
tech_contactsList<String>Optional
All handles (unique IDs) of tech persons or roles in WHOIS data
remarksList<String>Optional
all values of remarks in the person or role object
notifyList<String>Optional
all values of notify in the person or role object
mnt_byList<String>Optional
all values of mnt-by in the person or role object
mnt_refList<String>Optional
all values of mnt-ref in the person or role object
date_createdStringOptional
This object's registration date, parsed in yyyy-MM-dd format
date_updatedStringMandatory
This object's last update date, parsed in yyyy-MM-dd format
sourceStringMandatory
WHOIS data source of this object

HTTP Status Codes

HTTP StatusReasons
200
Request is processed successfully.
206
Partial response, as an error occurred while processing the request.
400
Invalid ASN parameter.
500
Internal Server error occurred.
503
Service is unavailable.
504
Request is timed-out.

How to Guides

To perform an ASN WHOIS lookup with our API, include the asn parameter in your request along with the Autonomous System Number (ASN). You can provide the ASN in two formats: with the "AS" prefix (e.g., AS1234) or without it (e.g., 1234). Our API supports both formats seamlessly.

The response from the API will include comprehensive ASN WHOIS data, providing both structured and raw information. The raw WHOIS data offers detailed, unprocessed information ideal for advanced machine learning algorithms and other in-depth analyses. This ensures you receive thorough ASN lookup results, including key details such as registration dates, ownership information, routing policies, and geographic locations.

# ASN WHOIS Lookup with prefix 'AS'
curl --location 'https://api.apifreaks.com/v1.0/asn/whois/live?asn=as56554&apiKey=API-KEY'
# ASN WHOIS Lookup without prefix 'AS'
curl --location 'https://api.apifreaks.com/v1.0/asn/whois/live?asn=1234&apiKey=API-KEY'
{ "status": true, "as_number": "AS1234", "query_time": "2024-08-09 14:55:19", "whois_server": "whois.ripe.net", "as_blocks": [ { "as_block": "AS1234 - AS1235", "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": "2018-11-22", "date_updated": "2018-11-22", "source": "RIPE" } ], "aut_nums": [ { "aut_num": "AS1234", "as_name": "FORTUM-AS", "description": [ "Fortum", "Fortum's Internet access" ], "status": "LEGACY", "import": [ "from AS6667", "from AS1759" ], "export": [ "to AS6667", "to AS1759" ], "admin_contacts": [ "TT18-RIPE" ], "tech_contacts": [ "JK6864-RIPE", "KS2114-RIPE" ], "mnt_by": [ "TE-ENERGY-NOC" ], "date_created": "2002-07-01", "date_updated": "2017-11-15", "source": "RIPE" } ], "administrative_contacts": [ { "handle": "TT18-RIPE", "name": "Tarmo Tuomi", "address": [ "TietoEnator Co", "Aku Korhosentie 2", "FIN-00441 HELSINKI", "FINLAND" ], "street": "Fin-00441", "city": "Helsinki", "country": "FINLAND", "phone": [ "+358-207269559" ], "fax_no": [ "+358-2072 69400" ], "mnt_by": [ "RIPE-NCC-LOCKED-MNT" ], "date_created": "2002-06-17", "date_updated": "2016-04-05", "source": "RIPE" } ], "technical_contacts": [ { "handle": "JK6864-RIPE", "name": "Jari Kuusikoski", "address": [ "Tietoevry Tech Services Finland Oy", "Keilalahdentie 2", "P.O. BOX 2", "FI-02101 ESPOO", "Finland" ], "street": "Keilalahdentie", "city": "Espoo", "zip_code": "FI-02101", "country": "FINLAND", "phone": [ "+358 40 5477 306" ], "mnt_by": [ "DATANET-NOC", "TE-ENERGY-NOC" ], "date_created": "2002-06-25", "date_updated": "2024-01-02", "source": "RIPE" }, { "handle": "KS2114-RIPE", "name": "Kalevi Sinkko", "address": [ "TietoEnator", "Aku Korhosentie 2", "00441 Helsinki" ], "street": "Aku Korhosentie", "city": "Helsinki", "zip_code": "00441", "phone": [ "+358207269560" ], "fax_no": [ "+358-2072 69400" ], "mnt_by": [ "DATANET-NOC", "TE-ENERGY-NOC" ], "date_created": "2002-06-24", "date_updated": "2006-07-21", "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 'AS1234 - AS1235'\n\nas-block: AS1234 - AS1235\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: 2018-11-22T15:27:09Z\nlast-modified: 2018-11-22T15:27:09Z\nsource: RIPE\n\n% Information related to 'AS1234'\n\n% No abuse contact registered for AS1234\n\naut-num: AS1234\nas-name: FORTUM-AS\ndescr: Fortum\ndescr: Fortum's Internet access\nimport: from AS6667\n action pref=100;\n accept ANY\nimport: from AS1759\n action pref=100;\n accept ANY\nexport: to AS6667\n announce AS1234\nexport: to AS1759\n announce AS1234\nadmin-c: TT18-RIPE\ntech-c: JK6864-RIPE\ntech-c: KS2114-RIPE\nstatus: LEGACY\nmnt-by: TE-ENERGY-NOC\ncreated: 2002-07-01T06:59:10Z\nlast-modified: 2017-11-15T09:13:23Z\nsource: RIPE # Filtered\n\nperson: Jari Kuusikoski\naddress: Tietoevry Tech Services Finland Oy\naddress: Keilalahdentie 2\naddress: P.O. BOX 2\naddress: FI-02101 ESPOO\naddress: Finland\nphone: +358 40 5477 306\nnic-hdl: JK6864-RIPE\nmnt-by: DATANET-NOC\nmnt-by: TE-ENERGY-NOC\ncreated: 2002-06-25T12:30:09Z\nlast-modified: 2024-01-02T14:44:59Z\nsource: RIPE # Filtered\n\nperson: Kalevi Sinkko\naddress: TietoEnator\naddress: Aku Korhosentie 2\naddress: 00441 Helsinki\nphone: +358207269560\nfax-no: +358-2072 69400\nnic-hdl: KS2114-RIPE\nmnt-by: DATANET-NOC\nmnt-by: TE-ENERGY-NOC\ncreated: 2002-06-24T08:06:29Z\nlast-modified: 2006-07-21T06:06:14Z\nsource: RIPE # Filtered\n\nperson: Tarmo Tuomi\naddress: TietoEnator Co\naddress: Aku Korhosentie 2\naddress: FIN-00441 HELSINKI\naddress: FINLAND\nphone: +358-207269559\nfax-no: +358-2072 69400\nnic-hdl: TT18-RIPE\ncreated: 2002-06-17T09:38:57Z\nlast-modified: 2016-04-05T14:33:28Z\nmnt-by: RIPE-NCC-LOCKED-MNT\nsource: RIPE # Filtered\n\n% This query was served by the RIPE Database Query Service version 1.113.2 (SHETLAND)" }

Pricing

To use the ASN Lookup API, API credits are required. Charges apply only for successful queries, indicated by a 2xx status code. If a request results in a 4xx or 5xx status code, no credits will be deducted, and any credits previously charged will be refunded.

For each successful request, 15 credits will be charged for ASN lookup. Utilize the Credits Usage API to efficiently monitor your recent consumption of both one-off and subscription credits. This API provides a streamlined way to track and manage your credit usage, ensuring you stay informed about your remaining balance and can optimize your resource allocation effectively.

Price Estimation Calculator