$ curl ip.nutz.cn 3.236.228.250 $ http -b ip.nutz.cn 3.236.228.250 $ wget -qO- ip.nutz.cn 3.236.228.250 $ fetch -qo- https://ip.nutz.cn 3.236.228.250 $ bat -print=b ip.nutz.cn/ip 3.236.228.250
$ http ip.nutz.cn/country 美国
$ http ip.nutz.cn/city 未知
$ http ip.nutz.cn/json { "city": "未知", "country": "美国", "ip": "3.236.228.250", "ip_decimal": 65856762 }
Setting the Accept header to application/json also works.
Always returns the IP address including a trailing newline, regardless of user agent.
$ http ip.nutz.cn/ip 3.236.228.250
$ http ip.nutz.cn/port/8080 { "ip": "3.236.228.250", "port": 8080, "reachable": false }