Loading
Loading
Query real-time WHOIS records for any AS number. Returns organizational details, CIDR block inventory, BGP peer relationships, and structured RIR contact data - sourced live from all 5 RIRs.
The ASN Lookup API provides a complete network operator profile for any Autonomous System Number - including WHOIS registration, advertised CIDR prefixes, BGP relationships (upstreams, downstreams, peers), structured RIR contact records, and raw WHOIS text. Perfect for network analysis, threat intelligence, and infrastructure profiling.
Authorize every request with your API key, passed either as a header or as a query parameter:
X-apiKeyapiKeyThis is version v1.0 of the API.
The following parameters can be used in your API requests. All parameters are passed as query string parameters.
formatoptionalStringdefault: jsonjson (default) or xml.asnrequiredStringAutonomous System Number with or without as.
A successful request returns a 200 OK response with a JSON object containing the ASN data. The response includes the top-level fields listed below. See the response preview on the right for the full JSON structure.
asNumberAS number to query live WHOIS, e.g., 1234, etc.
asNameAS name for the autonomous system.
orgNameOrganization name holding the AS number.
descriptionDescription of the autonomous system.
orgHandleOrganization handle or unique identifier.
countryCountry code where the AS is registered.
domainDomain associated with the AS.
websiteWebsite URL of the organization.
allocationStatusAllocation status of the AS number (e.g., allocated, assigned)
numOfIPv4RoutesNumber of IPv4 routes announced by this AS.
numOfIPv6RoutesNumber of IPv6 routes announced by this AS.
whoisHostWHOIS host server used to query the AS number.
dateAllocatedDate when the AS was allocated in yyyy-MM-dd format (can be empty string)
typeType of the organization (e.g., BUSINESS, ISP)
whoisResponseRaw WHOIS response from the WHOIS server.
legacyRoutesList of legacy routes if any.
route (String), origin (String), originName (String), isp (String), numberOfIps (Integer)
asNumber (String), description (String), country (String)
asNumber (String), description (String), country (String)
asNumber (String), description (String), country (String)
emailContacts (Array<String>), abuseContacts (Array<String>)
status (Boolean), whois_server (String), aut_nums (Array<Object>), organization (Object), technical_contacts (Array<Object>), …
Besides the response body, every response carries custom headers you can use to track credit usage, and concurrency usage on endpoints that enforce a concurrency limit. See the Custom Response Headers documentation and the endpoints with concurrency limits for more details.
X-Concurrent-Threadsheaderconcurrency-limited endpointsSpecifies the maximum number of concurrent requests allowed.
X-Concurrent-Threads-Activeheaderconcurrency-limited endpointsIndicates the number of active concurrent requests being processed.
X-AF-Credits-Costheaderall responsesSpecifies the number of credits consumed by the current request.
See the HTTP Status Codes documentation for a complete reference of common API errors and HTTP status codes.
Request-param 'asn' (ABC123) is not valid
Request-param 'asn' (AS0) must be greater than zero
Request-param 'asn' (15.5) is not valid
please pass correct parameters
Please provide apiKey
ASN data for 999999999 could not be found.
The requested resource could not be found. Please verify the URL and try again.
The media type specified in the request is not supported. For more details, please refer to the API documentation.
Unable to fetch whois data.Please try again [For Technical Support: support@apifreaks.com]
You have exceeded the limit of api plan requests and your subscription is canceled. [For Technical Support email at: support@apifreaks.com]
You have exceeded the limit of Surcharge Requests [allowed_surcharge_request_no]. Please upgrade your plan. [For Technical Support email at: support@apifreaks.com]
Please slow down. Your maximum request limit per minute reached.
The request or connection timeout you’ve set is too short, which is causing the server to close the connection before completing the response. Please increase the timeout duration to ensure successful communication with the server.