---
title: "Returns information about an ASN."
method: GET
path: "/AS{asn}"
tags: ["asn"]
---

# Returns information about an ASN.

`GET /AS{asn}`

## Request

- Base URL: `https://ipinfo.io`
- URL: `https://ipinfo.io/AS{asn}`
- Auth: one of:
  - HTTP basic
  - HTTP bearer
  - API key in query parameter `token`
- TypeScript: <https://skmtc.dev/ipinfo/apis/ipinfo-io-openapi-specification/docs/AS:asn/get.ts> (a function with typed inputs; its response is checked against the schema)

Returns information about an ASN, such as the assigned prefixes, related domain, and more.
The ASN API provides comprehensive information about an Autonomous System (AS) entity.
It delivers data on the AS's registration, ASN type, network details, associated prefixes (including IPv6), and relationships with other ASNs (peers, upstreams and downstreams).

## Path parameters

- `asn` integer, required

## Response `200`

ASN response object.

- AsnResponse
  - `asn` string, required
  - `name` string, required
  - `country` string
  - `allocated` string, date
  - `registry` 'arin' | 'ripe' | 'apnic' | 'lacnic' | 'afrinic'
  - `domain` string, required
  - `num_ips` integer
  - `route` string
  - `type` 'isp' | 'business' | 'education' | 'hosting' | 'government', required
  - `prefixes` Prefix[]
    - `netblock` string, required
    - `id` string, required
    - `name` string, required
    - `country` string, required
    - `size` string
    - `status` string
    - `domain` string, nullable
    - `rpki_status` 'valid' | 'invalid' | 'unknown'
  - `prefixes6` Prefix6[]
    - `netblock` string, required
    - `id` string, required
    - `name` string, required
    - `country` string, required
    - `size` string
    - `status` string
    - `domain` string
    - `rpki_status` 'valid' | 'invalid' | 'unknown'
  - `peers` string[]
  - `upstreams` string[]
  - `downstreams` string[]

## Other responses

- `403`: Unknown token or invalid permission. We return the same error for blocking malicious IP addresses as well.
- `404`: ASN not found.
- `429`: Allocated API rate limit has been reached for the token. The user will be prompted with options to increase their API limit.
- `500`: Internal server error or server unavailable.

---

[API](https://skmtc.dev/ipinfo/apis/ipinfo-io-openapi-specification.md) - [All operations](https://skmtc.dev/ipinfo/apis/ipinfo-io-openapi-specification/llms.txt) - [OpenAPI document](https://skmtc.dev/ipinfo/apis/ipinfo-io-openapi-specification/revisions/c63f11e4f26e?raw)
