ipinfo
Retrieve IP address information
TLDR
Display details for your current IP address
Display details for a specific IP address
Display details for multiple IP addresses in bulk from a file
Display details for a CIDR or IP range
Display only specific fields from IP lookup results
Summarize details for a group of IP addresses
Extract IP addresses from text and highlight them
Display help
SYNOPSIS
ipinfo [-h | -V | -f FIELDS | -j | -L | -t TOKEN | -y] [IP_ADDRESS_OR_FILE]
PARAMETERS
-h, --help
Display help message and exit
-V, --version
Show ipinfo version
-f, --fields FIELDS
Comma-separated list of fields (e.g., city,country,org) to display
-j, --json
Output full response in JSON format
-L, --locate
Return only latitude and longitude
-t, --token TOKEN
API token for extended data (ASN, company, etc.) and higher limits
-y, --yaml
Output full response in YAML format
DESCRIPTION
ipinfo is a lightweight command-line interface tool that retrieves detailed information about IP addresses using the ipinfo.io API.
It provides geolocation data, ASN details, carrier information, company ownership, and more for any IPv4 or IPv6 address. By default, running ipinfo without arguments queries your own public IP. Specify an IP to analyze others.
Key features include customizable output formats (JSON, YAML), field selection to focus on specific data like city, country, or org, and batch processing from files or stdin. It's ideal for network diagnostics, security analysis, scripting, and monitoring.
The tool is cross-platform, installable via pip (pip install ipinfo), Homebrew, or binaries from GitHub. Free tier offers 50,000 requests/month; a token unlocks more data and higher limits. Output is structured for easy parsing in automation workflows.
CAVEATS
Requires internet access and ipinfo.io API (free tier: 50k req/mo). Some data needs token. Not installed by default; third-party tool.
INSTALLATION
pip install ipinfo
brew install ipinfo/cli
or download binaries from GitHub releases
BATCH USAGE
ipinfo IP1 IP2 ...
cat ips.txt | ipinfo
Supports stdin for large lists
HISTORY
Developed by ipinfo.io team; open-source on GitHub since ~2018. Written in Go for speed/portability. Evolved with API v2+ support, batch mode, and YAML output.


