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.
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.
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.
$ pip install requests
Parameter | Required | Type | Default | Description |
---|---|---|---|---|
asn | Yes | String | Autonomous System Number whose WHOIS required
It accepts both with and without 'as'.
For example: as56554 or 56554 |
Field | Type | Requirement | Description |
---|---|---|---|
status | Boolean | Mandatory | true if the WHOIS response from whois_server is a complete response |
as_number | String | Mandatory | AS number to query live WHOIS, e.g., AS1, 3655, etc. |
query_time | String | Mandatory | Date and time of WHOIS query in the yyyy-MM-dd HH:mm:ss format |
whois_server | String | Mandatory | WHOIS host server used to query the as_number |
as_blocks | List<ASBlock> | Optional | Details of AS blocks associated with the AS number |
as_sets | List<ASSet> | Optional | Details of AS sets associated with the AS number |
aut_nums | List<AutNum> | Optional | Details of Autonomous System (AS) numbers associated with the AS number |
irt.handle | String | Mandatory | Handle or unique identifier of this irt in the WHOIS data |
irt.address | List<String> | Mandatory | all values of address in the irt object |
irt.street | String | Optional | parsed street address from address |
irt.city | String | Optional | parsed city from address |
irt.district | String | Optional | parsed district from address |
irt.state | String | Optional | parsed state from address |
irt.zip_code | String | Optional | parsed ZIP Code from address |
irt.country | String | Optional | parsed country from address |
irt.email | List<String> | Mandatory | all values of email in the irt object |
irt.abuse_mailbox | List<String> | Optional | all values of abuse-mailbox in the irt object |
irt.phone | List<String> | Optional | all values of phone in the irt object |
irt.fax_no | List<String> | Optional | all values of fax-no in the irt object |
irt.organizations | List<String> | Optional | all handles oforganization objects, irt object is linked to |
irt.admin_contacts | List<String> | Mandatory | All handles (unique IDs) of admin persons or roles in WHOIS data |
irt.tech_contacts | List<String> | Mandatory | All handles (unique IDs) of tech persons or roles in WHOIS data |
irt.remarks | List<String> | Optional | all values of remarks in the irt object |
irt.signature | List<String> | Optional | all values of signature in the irt object |
irt.encryption | List<String> | Optional | all values of encryption in the irt object |
irt.auth | List<String> | Optional | all values of auth in the irt object |
irt.notify | List<String> | Optional | all values of notify in the irt object |
irt.irt_nfy | List<String> | Optional | all values of irt-nfy in the irt object |
irt.mnt_by | List<String> | Optional | all values of mnt-by in the irt object |
irt.mnt_ref | List<String> | Optional | all values of mnt-ref in the irt object |
irt.date_created | String | Optional | This object's registration date, parsed in yyyy-MM-dd format |
irt.date_updated | String | Mandatory | This object's last update date, parsed in yyyy-MM-dd format |
irt.source | String | Mandatory | WHOIS data source of this object |
organization.handle | String | Mandatory | Handle or unique identifier of this organization object in WHOIS data |
organization.name | String | Mandatory | Name of the organization |
organization.type | String | Optional | Type of the organization |
organization.description | List<String> | Optional | all values of description in the organization object |
organization.address | List<String> | Mandatory | all values of address in the organization object |
organization.street | String | Optional | parsed street address from address |
organization.city | String | Optional | parsed city from address |
organization.district | String | Optional | parsed district from address |
organization.state | String | Optional | parsed state from address |
organization.zip_code | String | Optional | parsed ZIP code from address |
organization.country | String | Optional | parsed country from address |
organization.latitude | Double | Optional | latitude parsed from the geoloc field |
organization.longitude | Double | Optional | longitude parsed from the geoloc field |
organization.email | List<String> | Mandatory | all values of email in the organization object |
organization.abuse_mailbox | List<String> | Optional | all values of abuse-mailbox in the organization object |
organization.phone | List<String> | Optional | all values of phone in the organization object |
organization.fax_no | List<String> | Optional | all values of fax-no in the organization object |
organization.organizations | List<String> | Optional | all handles of organization objects, linked to this organization |
organization.admin_contacts | List<String> | Optional | All handles (unique IDs) of admin persons or roles in WHOIS data |
organization.tech_contacts | List<String> | Optional | All handles (unique IDs) of tech persons or roles in WHOIS data |
organization.abuse_contacts | List<String> | Optional | All handles (unique IDs) of persons or roles, managing abuse related to this organization, in WHOIS data |
organization.languages | List<String> | Optional | all values of language in the organization object |
organization.remarks | List<String> | Optional | all values of remarks in the organization object |
organization.notify | List<String> | Optional | all values of notify in the organization object |
organization.ref_nfy | List<String> | Optional | all values of ref-nfy in the organization object |
organization.mnt_ref | List<String> | Optional | all values of mnt-ref in the organization object |
organization.mnt_by | List<String> | Optional | all values of mnt-by in the organization object |
organization.date_created | String | Optional | This object's registration date, parsed in yyyy-MM-dd format |
organization.date_updated | String | Mandatory | This object's last update date, parsed in yyyy-MM-dd format |
organization.source | String | Mandatory | WHOIS data source of this object |
administrative_contacts | List<Object> | Optional | List of administrative contacts |
technical_contacts | List<Object> | Optional | List of technical contacts |
abuse_contacts | List<Object> | Optional | List of abuse contacts |
whois_raw_response | String | Mandatory | WHOIS response (unparsed) from the whois_server WHOIS server |
r_whois_raw_response | String | Mandatory | WHOIS response from the rwhois server |
ASBlock object contains following fields:
Field | Type | Requirement | Description |
---|---|---|---|
as_block | String | Mandatory | AS numbers block |
type | String | Optional | Type of AS numbers block |
country | String | Optional | Country of organization managing this as-block object |
description | List<String> | Optional | all values of description in the as-block object |
organizations | List<String> | Optional | All handles of 'organization' objects holding this as-block |
admin_contacts | List<String> | Optional | All handles (unique IDs) of admin persons or roles in WHOIS data |
tech_contacts | List<String> | Optional | All handles (unique IDs) of tech persons or roles in WHOIS data |
remarks | List<String> | Optional | all values of remarks/ in as-block object |
notify | List<String> | Optional | all values of notify in as-block object |
mnt_by | List<String> | Mandatory | all values of mnt-by in as-block object |
mnt_lower | List<String> | Optional | all values of mnt-lower in as-block object |
date_created | String | Optional | This object's registration date, parsed in yyyy-MM-dd format |
date_updated | String | Mandatory | This object's registration date, parsed in yyyy-MM-dd format |
source | String | Mandatory | WHOIS data source of this object |
ASSet object contains following fields:
Field | Type | Requirement | Description |
---|---|---|---|
as_set | String | Mandatory | AS numbers set |
country | String | Optional | Country of organization managing this as-block object |
description | List<String> | Optional | all values of description in the as-block object |
organizations | List<String> | Optional | All handles of 'organization' objects holding this as-block |
admin_contacts | List<String> | Optional | All handles (unique IDs) of admin persons or roles in WHOIS data |
tech_contacts | List<String> | Optional | All handles (unique IDs) of tech persons or roles in WHOIS data |
remarks | List<String> | Optional | all values of remarks in as-block object |
notify | List<String> | Optional | all values of notify in as-block object |
mnt_by | List<String> | Mandatory | all values of mnt-by in as-block object |
mnt_lower | List<String> | Optional | all values of mnt-lower in as-block object |
date_created | String | Optional | This object's registration date, parsed in yyyy-MM-dd format |
date_updated | String | Mandatory | This object's registration date, parsed in yyyy-MM-dd format |
source | String | Mandatory | WHOIS data source of this object |
AutNum object contains following fields:
Field | Type | Requirement | Description |
---|---|---|---|
aut_num | String | Mandatory | Autonomous System (AS) number |
as_handle | String | Mandatory | Handle (unique ID) of this aut-num in WHOIS data |
as_name | String | Mandatory | AS name for the network handling this network |
description | List<String> | Optional | all values of description in the aut-num object |
country | String | Optional | Country of organization holding the aut-num object |
status | String | Optional | Assignment or allocation status |
member_of | List<String> | Optional | all values of member-of in the aut-num object |
import_via | List<String> | Optional | all values of import-via in the aut-num object |
import | List<String> | Optional | all values of import in the aut-num object |
mp_import | List<String> | Optional | all values of mp-import in the aut-num object |
export_via | List<String> | Optional | all values of export-via in the aut-num object |
export | List<String> | Optional | all values of export in the aut-num object |
mp_export | List<String> | Optional | all values of mp-export in the aut-num object |
default | List<String> | Optional | all values of default in the aut-num object |
mp_default | List<String> | Optional | all values of mp-default in the aut-num object |
organization | String | Optional | Handle (unique ID) of the organization in WHOIS data, managing this aut-num |
sponsoring_organization | String | Optional | Handle (unique ID) of the sponsoring-organization in WHOIS data, sponsoring this aut-num |
admin_contacts | List<String> | Mandatory | All handles (unique IDs) of admin persons or roles in WHOIS data |
tech_contacts | List<String> | Mandatory | All handles (unique IDs) of tech persons or roles in WHOIS data |
abuse_contacts | List<String> | Optional | All handles (unique IDs) of persons or roles, managing abuse to this aut-num, in WHOIS data |
remarks | List<String> | Optional | all values of remarks in the aut-num object |
notify | List<String> | Optional | all values of notify in the aut-num object |
mnt_irt | List<String> | Optional | all values of mnt-irt in the aut-num object |
mnt_lower | List<String> | Optional | all values of mnt-lower in the aut-num object |
mnt_routes | List<String> | Optional | all values of mnt-routes in the aut-num object |
mnt_by | List<String> | Optional | all values of mnt-by in the aut-num object |
date_created | String | Optional | This object's registration date, parsed in yyyy-MM-dd format |
date_updated | String | Mandatory | This object's registration date, parsed in yyyy-MM-dd format |
source | String | Mandatory | WHOIS data source of this object |
Each object within the lists of administrative contacts, technical contacts, and abuse contacts comprises the following fields:
Field | Type | Requirement | Description |
---|---|---|---|
handle | String | Mandatory | Handle or unique identifier of this person or role object in WHOIS data |
name | String | Mandatory | Name of the person or role |
address | List<String> | Mandatory | all values of address in the object |
street | String | Optional | parsed street address from address |
city | String | Optional | parsed city from address |
district | String | Optional | parsed district from address |
state | String | Optional | parsed state from address |
zip_code | String | Optional | parsed ZIP Code from address |
country | String | Optional | parsed country from address |
List<String> | Mandatory | all values of email in the object | |
abuse_mailbox | List<String> | Optional | all values of abuse-mailbox in the object |
phone | List<String> | Optional | all values of phone in the object |
fax_no | List<String> | Optional | all values of fax-no in the object |
organizations | List<String> | Optional | All handles of organization objects, managing this person or role object |
admin_contacts | List<String> | Optional | All handles (unique IDs) of admin persons or roles in WHOIS data |
tech_contacts | List<String> | Optional | All handles (unique IDs) of tech persons or roles in WHOIS data |
remarks | List<String> | Optional | all values of remarks in the person or role object |
notify | List<String> | Optional | all values of notify in the person or role object |
mnt_by | List<String> | Optional | all values of mnt-by in the person or role object |
mnt_ref | List<String> | Optional | all values of mnt-ref in the person or role object |
date_created | String | Optional | This object's registration date, parsed in yyyy-MM-dd format |
date_updated | String | Mandatory | This object's last update date, parsed in yyyy-MM-dd format |
source | String | Mandatory | WHOIS data source of this object |
HTTP Status | Reasons |
---|---|
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. |
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'# ASN WHOIS Lookup without prefix 'AS'curl --location 'https://api.apifreaks.com/v1.0/asn/whois/live?asn=as56554&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)" }curl --location 'https://api.apifreaks.com/v1.0/asn/whois/live?asn=1234&apiKey=API-KEY'
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.