LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

ipinfo

official command-line client for the IPinfo API

TLDR

Look up your own IP address
$ ipinfo myip
copy
Look up details for a specific IP address
$ ipinfo [8.8.8.8]
copy
Look up ASN information
$ ipinfo [AS15169]
copy
Bulk lookup multiple IPs or CIDR ranges
$ ipinfo bulk [1.1.1.0/30] [8.8.8.8]
copy
Extract a specific field (city, country, org, hostname, etc.)
$ ipinfo [8.8.8.8] -f [city]
copy
Output in CSV format
$ cat ips.txt | ipinfo -c
copy
Authenticate with an API token for higher rate limits
$ ipinfo init [your_token]
copy
Summarize details for a list of IPs
$ cat ips.txt | ipinfo summarize
copy

SYNOPSIS

ipinfo [command] [IP|ASN] [options]

DESCRIPTION

ipinfo is the official command-line client for the IPinfo.io API. It returns IP intelligence data including geographic location, ISP, organization, ASN, hostname, and abuse contact information.The tool accepts IP addresses (IPv4/IPv6), ASNs, and CIDR ranges. Multiple inputs can be queried at once or piped in from another command. Output can be rendered as human-readable text, JSON, or CSV, and specific fields can be extracted for use in scripts.The CLI ships with several helper binaries such as grepip, prips, cidr2range, cidr2ip, range2cidr, and mmdb for working with IP lists and MMDB databases.

PARAMETERS

init token

Save an API token for authenticated requests.
myip
Look up details for your own IP address.
bulk ips
Process multiple IPs or CIDR ranges.
summarize ips
Produce a summary report for a list of IPs.
-f, --field FIELD
Return only the specified field (e.g., ip, city, region, country, org, hostname).
-c, --csv
Output results in CSV format.
--nocolor
Disable colored output (or set the `NO_COLOR` environment variable).
--token TOKEN
Pass an API token for this invocation.
completion
Generate shell completions (bash, zsh, fish).
-h, --help
Display help information.
-v, --version
Display version information.

CAVEATS

Requires internet connectivity to reach ipinfo.io. Anonymous requests are heavily rate-limited; register for a free token via `ipinfo init` for higher quotas. Private, reserved, and multicast addresses cannot be geolocated. Geolocation accuracy varies by region and network type.

HISTORY

Developed by IPinfo.io, a geolocation data provider founded in 2013. The CLI is written in Go and wraps the same public API used by the web service.

SEE ALSO

curl(1), whois(1), dig(1), jq(1)

Copied to clipboard
Kai