# Summarizing all the IP ranges of an ASN

**URL:** <https://community.ipinfo.io/t/summarizing-all-the-ip-ranges-of-an-asn/5550>\
**Category:** General\
**Tags:** asn, cli\
**Created:** [March 12, 2024, 5:24pm UTC](https://community.ipinfo.io/t/summarizing-all-the-ip-ranges-of-an-asn/5550 "2024-03-12T17:24:05Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Abdullah](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.ipinfo.io/abdullah/32/4973_2.png) [@Abdullah](https://community.ipinfo.io/u/Abdullah)\
**Post date:** [March 12, 2024, 5:24pm UTC](https://community.ipinfo.io/t/summarizing-all-the-ip-ranges-of-an-asn/5550/1 "2024-03-12T17:24:05Z")

</div>

You can summarize all the IP ranges of a particular ASN using a combination of the paid [IPinfo ASN API](https://ipinfo.io/products/asn-api) service, the [IPinfo CLI](https://github.com/ipinfo/cli) and [JQ](https://jqlang.github.io/jq/).

> This can also be done with our free IP to ASN database. If you are interested, please let me know! I will provide instructions as well.

This summary operation is interesting because it will show you the actual IP range locations of a particular ASN instead of the advertised ones in their WHOIS data. It also provides a bird’s eye view of the IP metadata of a particular ASN.

```auto
curl ipinfo.io/AS152586?token=$token | jq -r .prefixes[].netblock | ipinfo summarize

```

![WindowsTerminal_KIPDVpK4No-ezgif.com-video-to-gif-converter](https://canada1.discourse-cdn.com/flex035/uploads/ipinfo/original/2X/b/b98568f6590d920e744dcbbe3d2985f41fb6ba96.gif)

---

_[View the full topic](https://community.ipinfo.io/t/summarizing-all-the-ip-ranges-of-an-asn/5550)._
