$ curl ip.nutz.cn 3.236.50.252 $ http -b ip.nutz.cn 3.236.50.252 $ wget -qO- ip.nutz.cn 3.236.50.252 $ fetch -qo- https://ip.nutz.cn 3.236.50.252 $ bat -print=b ip.nutz.cn/ip 3.236.50.252
$ http ip.nutz.cn/country 美国
$ http ip.nutz.cn/city 阿什本
$ http ip.nutz.cn/json { "city": "阿什本", "country": "美国", "ip": "3.236.50.252", "ip_decimal": 65811196 }
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.50.252
$ http ip.nutz.cn/port/8080 { "ip": "3.236.50.252", "port": 8080, "reachable": false }