Get detailed information of an IP

Country, state, city, if you have a proxy and among others.

Get detailed information of an IP

ipinfo is the official CLI tool for the IP address API, allowing you to:

  • Look up IP details in bulk or one by one.
  • Look up the ASN details.
  • Summarize details for up to 1000 IPs at a time.
  • Open a map of IP locations for any set of IPs.
  • Filter the IPv4 and IPv6 addresses from any entry.
  • Print IP lists for any CIDR or IP range.
  • And more!


You will need to have the Go programming language installed on your system in addition to Git.

After that run the commands:

git clone ipinfo-cli
cd ipinfo-cli/
go build -o ~ ./ipinfo
sudo install -v ipinfo .local/bin/

Then remove the cloned directory: ipinfo-cli.


To get a help of the parameters, just run the ipinfo command, something like this will appear:

Usage: ipinfo <cmd> [<opts>] [<args>]

  <ip>        look up details for an IP address, e.g.
  <asn>       look up details for an ASN, e.g. AS123 or as123.
  myip        get details for your IP.
  bulk        get details for multiple IPs in bulk.
  summarize   get summarized data for a group of IPs.

To get data from your own IP, run:

ipinfo myip

Find out the IP of a given URL and get detailed information with ipinfo:

Example, get data from the URL:

ipinfo $(ping -c1 | sed -n '1p' | sed 's/.* (//;s/) .*//')

Output in JSON format

ipinfo myip --json

The parameters must be indicated at the end of the command.

See an example GIF usage:


For more information access the links below:

commands network