Explore our IP Address Database Downloads for instant access to our IP address insights
Learn moreIn our last article of the IPinfo CLI article series, we showed how IPinfo CLI users can use the mapping feature to map IP addresses on an interactive map right from their terminal. Today we are going to explore another feature of the IPinfo CLI, the summarize command.
The summarize
command summarizes IP address information from a list of IP addresses. This allows you to get a summary result that contains geolocation data, ASN data, privacy detection (aka anonymous data), mobile carrier data and more, in a report-like format that can even be outputted as a JSON file.
summarize
IP inputsThe summarize
command like other IPinfo CLI commands can take in singular and multiple sources of IP address data. You can use text files containing IP addresses, CIDRs, and IP ranges and can even mix and match all of them in a single command. This is the summary of the summarize
command:
Commands | Description |
---|---|
ipinfo summarize ips.txt |
Summarize IP address data from a text file |
ipinfo summarize ips_1.txt ips_2.txt ips_3.txt |
Summarize IP address data from multiple text files |
ipinfo summarize 8.8.8.0/24 |
Summarize data from all the IP addresses in a CIDR |
ipinfo summarize 8.8.8.0/24 1.1.1.0/24 |
Summarize data from all the IP addresses from multiple CIDRs |
ipinfo summarize 8.8.8.0-8.8.8.255 |
Summarize data of IP addresses in an IP range |
ipinfo summarize 8.8.8.0-8.8.8.255 1.1.1.0/30 123.123.123.123 ips.txt |
Summarize IP address data from multiple sources simultaneously |
You can get summary-level information from IP addresses listed in a text file. This is incredibly helpful if you are processing a log file or have just copied and pasted a list of IP addresses to a file.
Simply pass the path to the file containing the IP addresses to the IPinfo CLI like so:
ipinfo summarize ips.txt
You can also input several text files to be simultaneously summarized into one output:
ipinfo summarize ips_1.txt ips_2.txt ips_3.txt ips_4.txt
CIDR and IP ranges are unique as they represent a block or a set of IP address information.
To get summary-level information from a CIDR, you can simply pass the CIDR value to the CLI:
ipinfo summarize 8.8.8.0/24
ipinfo summarize 142.245.65.0/24 142.245.67.0/24 142.245.71.0/24 142.245.72.0/24
We can even create IP range summaries right out of the box with the IPinfo CLI and as always, you can process multiple sources simultaneously in one line of command:
ipinfo summarize 149.234.16.0-149.234.31.255
ipinfo summarize 149.234.16.0-149.234.31.255 212.64.224.0-212.64.255.255
And last but not least, simultaneously process and summarize different of kinds of IP address data sources:
ipinfo summarize 149.234.16.0-149.234.31.255 142.245.72.0/24 ips.txt
summarize
IP ResultsThe summarize
command lets you summarize IP address-related information from a list of IP addresses in one fell swoop and returns a robust, information-dense result. The summary output shows the following features on the output report:
Summary
Top ASNs: Top 5 ASNs with organization name
Top Usage Types: Usage types with the option being: Business, Hosting, ISP and Education.
Top Routes: IP range routes with ASN
Top Countries: IP address source countries
Top Cities: IP address source cities
Top Regions: IP address source regions
Top Domains: Top domains associated with the input IP addresses
This is what a pretty output summary report looks like after analyzing 1,000 randomly generated IP addresses:
$ ipinfo summarize ips.txt
Summary
- Total 200
- Unique 200
- Anycast 0
- Bogon 41
- Mobile 6
- VPN 1
- Proxy 0
- Hosting 10
- Tor 0
- Relay 0
Top ASNs
- AS749 DoD Network Information Center 7 (3.5%)
- AS7018 AT&T Services, Inc. 6 (3.0%)
- AS17676 Softbank BB Corp. 4 (2.0%)
- AS8075 Microsoft Corporation 4 (2.0%)
- AS209 CenturyLink Communications, LLC 3 (1.5%)
Top Usage Types
- ISP 98 (49.0%)
- Business 44 (22.0%)
- Hosting 10 (5.0%)
- Education 5 (2.5%)
Top Routes
- 107.64.0.0/10 (AS7018) 3 (1.5%)
- 7.0.0.0/8 (AS749) 2 (1.0%)
- 215.0.0.0/9 (AS721) 2 (1.0%)
- 135.4.0.0/14 (AS10455) 1 (0.5%)
- 170.21.0.0/16 (AS22773) 1 (0.5%)
Top Countries
- United States 81 (40.5%)
- Japan 10 (5.0%)
- China 8 (4.0%)
- United Kingdom 6 (3.0%)
- Germany 4 (2.0%)
Top Cities
- Columbus, Ohio, US 10 (5.0%)
- London, England, GB 6 (3.0%)
- Redmond, Washington, US 6 (3.0%)
- Tokyo, Tokyo, JP 5 (2.5%)
- Chicago, Illinois, US 4 (2.0%)
Top Regions
- Ohio, US 10 (5.0%)
- California, US 10 (5.0%)
- Washington, US 9 (4.5%)
- England, GB 6 (3.0%)
- Tokyo, JP 6 (3.0%)
Top Carriers
- T-Mobile UK 1 (0.5%)
- Claro 1 (0.5%)
- OOREDOO%20TN 1 (0.5%)
- Verizon 1 (0.5%)
- Safaricom 1 (0.5%)
Top Domains
- bbtec.net 4 (2.0%)
- comcast.net 4 (2.0%)
- qwest.net 3 (1.5%)
- rr.com 2 (1.0%)
summarize
Command Output FormatsThe summarize
command has “pretty printed" output turned on by default. You can disable colors with the argument --nocolor
. Going beyond the prettify format output, the summarize
command let’s you output the results in a json
format as well with the argument --json
or -j
for short.
ipinfo summarize ips.txt --json
If you are looking for a web UI with interactive features, check out our: IPinfo Summary Tool. Our online summary tool also integrates our mapping tool into a single page.
You can generate this online report from the command line as well:
$ cat ips.txt | curl -XPOST --data-binary @- "ipinfo.io/tools/summarize-ips?cli=1"
{
"status": "Report Generated",
"reportUrl": "<https://ipinfo.io/tools/summarize-ips/ac27ea4a-79b2-4f9d-9302-c9a87975d316>"
}
And you can pass all the IP address inputs we described so far.
All CLI binaries (e.g. ipinfo, grepip, map IPs) are available for download from multiple mechanisms. See https://github.com/ipinfo/cli#installation for full details.
IPinfo is a comprehensive IP address data and API provider with flexible pricing plans to meet your business needs. We handle billions of API requests per month, serving data like IP geolocation, VPN detection, ASN, and more. Sign up for a free account or contact our team to learn more.