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