Our Autonomous System Number (ASN) Lookup API delivers real-time access to detailed ASN 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 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 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.
Our API delivers in-depth IP route intelligence by identifying upstream ASNs that provide routes to the target ASN and downstream ASNs that receive routes from it. Each Route Object includes CIDR block, origin ASN, ISP organization, and IP count, enabling accurate network topology mapping for security, traffic engineering, and BGP monitoring.
The API provides both structured and raw ASN 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 |
For a comprehensive view of the API response structure and detailed field descriptions, explore the interactive Response Table by clicking here.
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 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 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=AS1234&apiKey=API-KEY'#Response { "asNumber": "1234", "asName": "FORTUM-AS", "orgName": "Fortum", "description": "Fortum", "orgHandle": "FORTUM-AS", "country": "EU", "domain": "ripe.net", "website": "http://ripe.net", "allocationStatus": "allocated", "numOfIPv4Routes": "5", "numOfIPv6Routes": "0", "whoisHost": "RIPE", "dateAllocated": "1993-09-01", "type": "BUSINESS", "routeObjects": [ { "route": "137.96.0.0/16", "origin": "AS1234", "originName": "Fortum", "isp": "Fortum Oyj", "numberOfIps": 65536 }, { "route": "132.171.128.0/17", "origin": "AS1234", "originName": "Fortum", "isp": "Fortum Oyj", "numberOfIps": 32768 }, { "route": "132.171.0.0/17", "origin": "AS1234", "originName": "Fortum", "isp": "Fortum Oyj", "numberOfIps": 32768 }, { "route": "193.110.32.0/21", "origin": "AS1234", "originName": "Fortum", "isp": "Fortum Oyj", "numberOfIps": 2048 }, { "route": "132.171.0.0/16", "origin": "AS1234", "originName": "Fortum", "isp": "Fortum Oyj", "numberOfIps": 65536 } ], "whoisResponse": " as-block: AS1234 - AS1235 descr: 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 created: 2018-11-22T15:27:09Z last-modified: 2018-11-22T15:27:09Z source: RIPE aut-num: AS1234 as-name: FORTUM-AS descr: Fortum descr: Fortum's Internet access import: from AS6667 action pref=100; accept ANY import: from AS1759 action pref=100; accept ANY export: to AS6667 announce AS1234 export: to AS1759 announce AS1234 admin-c: TT18-RIPE tech-c: JK6864-RIPE tech-c: KS2114-RIPE status: LEGACY mnt-by: TE-ENERGY-NOC created: 2002-07-01T06:59:10Z last-modified: 2017-11-15T09:13:23Z source: RIPE # Filtered person: Jari Kuusikoski address: Tietoevry Tech Services Finland Oy address: Keilalahdentie 2 address: P.O. BOX 2 address: FI-02101 ESPOO address: Finland phone: +358 40 5477 306 nic-hdl: JK6864-RIPE mnt-by: DATANET-NOC mnt-by: TE-ENERGY-NOC created: 2002-06-25T12:30:09Z last-modified: 2024-01-02T14:44:59Z source: RIPE # Filtered person: Kalevi Sinkko address: TietoEnator address: Aku Korhosentie 2 address: 00441 Helsinki phone: +358207269560 fax-no: +358-2072 69400 nic-hdl: KS2114-RIPE mnt-by: DATANET-NOC mnt-by: TE-ENERGY-NOC created: 2002-06-24T08:06:29Z last-modified: 2006-07-21T06:06:14Z source: RIPE # Filtered person: Tarmo Tuomi address: TietoEnator Co address: Aku Korhosentie 2 address: FIN-00441 HELSINKI address: FINLAND phone: +358-207269559 fax-no: +358-2072 69400 nic-hdl: TT18-RIPE created: 2002-06-17T09:38:57Z last-modified: 2016-04-05T14:33:28Z mnt-by: RIPE-NCC-LOCKED-MNT source: RIPE # Filtered ASNumber: 1234 - 1235 ASName: RIPE-ASNBLOCK-1234 ASHandle: AS1234 RegDate: 2002-10-15 Updated: 2003-04-25 Comment: These addresses have been further assigned to users in Comment: the RIPE NCC region. Contact information can be found in Comment: the RIPE database at http://www.ripe.net/whois Ref: https://rdap.arin.net/registry/autnum/1234 ResourceLink: https://apps.db.ripe.net/db-web-ui/query ResourceLink: whois.ripe.net OrgName: RIPE Network Coordination Centre OrgId: RIPE Address: P.O. Box 10096 City: Amsterdam StateProv: PostalCode: 1001EB Country: NL RegDate: Updated: 2013-07-29 Ref: https://rdap.arin.net/registry/entity/RIPE ReferralServer: whois.ripe.net ResourceLink: https://apps.db.ripe.net/db-web-ui/query OrgTechHandle: RNO29-ARIN OrgTechName: RIPE NCC Operations OrgTechPhone: +31 20 535 4444 OrgTechEmail: hostmaster@ripe.net OrgTechRef: https://rdap.arin.net/registry/entity/RNO29-ARIN OrgAbuseHandle: ABUSE3850-ARIN OrgAbuseName: Abuse Contact OrgAbusePhone: +31205354444 OrgAbuseEmail: abuse@ripe.net OrgAbuseRef: https://rdap.arin.net/registry/entity/ABUSE3850-ARIN ", "downstreams": [], "parsedWhoisResponse": { "status": true, "whois_server": "whois.arin.net", "aut_nums": [ { "aut_num": "1234 - 1235", "as_handle": "AS1234", "as_name": "RIPE-ASNBLOCK-1234", "tech_contacts": [ "RNO29-ARIN" ], "abuse_contacts": [ "ABUSE3850-ARIN" ], "date_created": "2002-10-15", "date_updated": "2003-04-25", "source": "https://rdap.arin.net/registry/autnum/1234" } ], "organization": { "handle": "RIPE", "name": "RIPE Network Coordination Centre", "address": [ "P.O. Box 10096", "Amsterdam", "1001EB", "NL" ], "city": "Amsterdam", "zip_code": "1001EB", "country": [ "NL" ], "date_updated": "2013-07-29", "source": "https://rdap.arin.net/registry/entity/RIPE", "addressCountry": "NL" }, "technical_contacts": [ { "handle": "RNO29-ARIN", "name": "RIPE NCC Operations", "email": [ "hostmaster@ripe.net" ], "phone": [ "+31 20 535 4444" ], "source": "https://rdap.arin.net/registry/entity/RNO29-ARIN" } ], "abuse_contacts": [ { "handle": "ABUSE3850-ARIN", "name": "Abuse Contact", "email": [ "abuse@ripe.net" ], "phone": [ "+31205354444" ], "source": "https://rdap.arin.net/registry/entity/ABUSE3850-ARIN" } ] }, "upstreams": [ { "asNumber": "AS1759", "description": "Telia Finland Oyj", "country": "FI" }, { "asNumber": "AS719", "description": "Elisa Oyj", "country": "FI" } ], "peers": [ { "asNumber": "AS6667", "description": "Elisa Oyj", "country": "FI" }, { "asNumber": "AS1759", "description": "Telia Finland Oyj", "country": "FI" }, { "asNumber": "AS719", "description": "Elisa Oyj", "country": "FI" } ], "contacts": { "emailContacts": [ "jari.kuusikoski@tietoenator.com", "kalevi.sinkko@tietoenator.com", "jari.kuusikoski@tietoevry.com", "tarmo.tuomi@tietoenator.com" ], "abuseContacts": [] }, "legacyRoutes": [] }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.