$ curl ip.nicolasallemand.com 216.73.216.30 $ http -b ip.nicolasallemand.com 216.73.216.30 $ wget -qO- ip.nicolasallemand.com 216.73.216.30 $ fetch -qo- https://ip.nicolasallemand.com 216.73.216.30 $ bat -print=b ip.nicolasallemand.com/ip 216.73.216.30
$ http ip.nicolasallemand.com/country United States $ http ip.nicolasallemand.com/country-iso US
$ http ip.nicolasallemand.com/city Palmdale
$ http ip.nicolasallemand.com/json
{
"ip": "216.73.216.30",
"ip_decimal": 3628718110,
"country": "United States",
"country_eu": false,
"country_iso": "US",
"city": "Palmdale",
"latitude": 34.5705,
"longitude": -118.029,
"user_agent": {
"product": "Mozilla",
"version": "5.0",
"comment": "AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)",
"raw_value": "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)"
}
}
Setting the Accept: application/json header also works as expected.
Always returns the IP address including a trailing newline, regardless of user agent.
$ http ip.nicolasallemand.com/ip 216.73.216.30
$ http ip.nicolasallemand.com/port/8080
{
"ip": "216.73.216.30",
"port": 8080,
"reachable": false
}
As of 2018-07-25 it's no longer possible to force protocol using
the v4 and v6 subdomains. IPv4 or IPv6 still can be forced
by passing the appropiate flag to your client, e.g curl -4
or curl -6.