What is my IP address?

34.204.171.108

Multiple command line HTTP clients are supported, including curl, httpie, GNU Wget and fetch.

CLI examples

$ curl 127.0.0.1:18081
34.204.171.108

$ http -b 127.0.0.1:18081
34.204.171.108

$ wget -qO- 127.0.0.1:18081
34.204.171.108

$ fetch -qo- https://127.0.0.1:18081
34.204.171.108

$ bat -print=b 127.0.0.1:18081/ip
34.204.171.108

Country lookup

$ http 127.0.0.1:18081/country
United States

$ http 127.0.0.1:18081/country-iso
US

City lookup

$ http 127.0.0.1:18081/city
Ashburn

JSON output

$ http 127.0.0.1:18081/json
{
  "ip": "34.204.171.108",
  "ip_decimal": 583838572,
  "country": "United States",
  "country_eu": false,
  "country_iso": "US",
  "city": "Ashburn",
  "hostname": "ec2-34-204-171-108.compute-1.amazonaws.com",
  "latitude": 39.0481,
  "longitude": -77.4728
}

Setting the Accept: application/json header also works as expected.

Plain output

Always returns the IP address including a trailing newline, regardless of user agent.

$ http 127.0.0.1:18081/ip
34.204.171.108

Port testing

$ http 127.0.0.1:18081/port/8080
{
  "ip": "34.204.171.108",
  "port": 8080,
  "reachable": false
}

Map

FAQ

How do I force IPv4 or IPv6 lookup?

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.