求推荐类似wtfismyip.com的命令行IP信息查询服务
Alternatives to wtfismyip.com for Command-Line IP & Geolocation Info
Absolutely! There are tons of great alternatives to wtfismyip.com that deliver IP details, geolocation data, and related info directly to your terminal—many even support clean, human-readable JSON output just like the service you’re currently using. Here are some reliable options to check out:
1. ipinfo.io
- A widely used, straightforward service. For full JSON output with IP, location, ISP, ASN, and more, run:
curl ipinfo.io/json - You can also fetch specific fields directly if you don’t need the full dataset—for example, to get just your city:
curl ipinfo.io/city
2. ifconfig.me
- A classic command-line IP tool with robust options. To get a detailed JSON response including IP, geolocation, user agent, and port info:
curl ifconfig.me/all.json - For quick one-off queries (like just your public IP), use:
curl ifconfig.me/ip
3. ipapi.co
- This service returns extra-detailed JSON data, including timezone, currency, connection type, and even regional language info. The basic command for your current IP is:
curl ipapi.co/json - Want to look up a specific IP instead? Append it to the URL:
curl ipapi.co/8.8.8.8/json
4. icanhazip.com (Extended API)
- While most people know it for just returning an IP, its v1 API delivers structured JSON with IP, geolocation, and ISP details:
curl icanhazip.com/v1
Pro Tip
If you find raw JSON a bit messy in the terminal, pipe the output to jq (a lightweight JSON processor) to format it nicely:
curl ipinfo.io/json | jq
内容的提问来源于stack exchange,提问作者Patoshi パトシ
相关产品推荐
相关产品推荐

