$ curl ip.nutz.cn 3.235.11.178 $ http -b ip.nutz.cn 3.235.11.178 $ wget -qO- ip.nutz.cn 3.235.11.178 $ fetch -qo- https://ip.nutz.cn 3.235.11.178 $ bat -print=b ip.nutz.cn/ip 3.235.11.178
$ http ip.nutz.cn/country 美国
$ http ip.nutz.cn/city 未知
$ http ip.nutz.cn/json { "city": "未知", "country": "美国", "ip": "3.235.11.178", "ip_decimal": 65735602 }
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.235.11.178
$ http ip.nutz.cn/port/8080 { "ip": "3.235.11.178", "port": 8080, "reachable": false }