Actions12
Get ASN Info
AI-generatedSummary
Query detailed Autonomous System Number (ASN) information either by providing an ASN number or an IP address to lookup its associated ASN details.
Inputs
- Query ASN Information By (required) — Choose whether to query ASN info using an ASN number or an IP address.
- ASN Number (required) — The ASN number to look up (required when querying by ASN number).
- IP Address (required) — A valid IPv4 or IPv6 address to look up ASN information (required when querying by IP address).
- Include — Select which additional ASN-related information to include in the response (e.g., downstreams, peers, routes, upstreams, whois response). Selecting 'All' includes all available fields.
- Fields — Comma-separated list specifying which specific fields to include in the API response. Use dot notation for nested fields (e.g., asn.organization, asn.country). Leave empty to include all fields.
- Exclude — Comma-separated list specifying which fields to exclude from the API response. Use dot notation for nested fields (e.g., asn.date_allocated).
Output shape
a JSON object containing ASN details such as organization, country, network information, and optionally relations like downstreams, peers, routes, upstreams, and whois response data, depending on inclusion and field selections.
The response fields can be customized via the 'Include', 'Fields', and 'Exclude' parameters to tailor the returned ASN information. Queries by ASN number or IP address require the corresponding required input. API request uses GET method to the '/v3/asn' endpoint with query parameters reflecting the selected inputs.
Examples
Example 1: Lookup ASN info by ASN number including all fields
Set 'Query ASN Information By' to 'ASN Number', input ASN number to lookup, ensure 'Include' includes 'All', leave 'Fields' and 'Exclude' empty.
Example 2: Lookup ASN info by IP address with custom included fields
Set 'Query ASN Information By' to 'IP Address', input IP address, select specific 'Include' options such as 'downstreams' and 'whois_response', specify required 'Fields' or exclusions to refine the response.