What is my IP address?

54.146.20.169

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

CLI examples:

$ curl ifconfig.co
54.146.20.169

$ http -b ifconfig.co
54.146.20.169

$ wget -qO- ifconfig.co
54.146.20.169

$ fetch -qo- https://ifconfig.co
54.146.20.169

Country lookup:

$ http ifconfig.co/country
United States

City lookup:

$ http ifconfig.co/city
Ashburn

JSON output:

$ http ifconfig.co/json
{ 
    "city": "Ashburn",
    "country": "United States",
    "hostname": "ec2-54-146-20-169.compute-1.amazonaws.com",
    "ip": "54.146.20.169",
    "ip_decimal": 915543209
}

# or set Accept header:
# http ifconfig.co Accept:application/json

Testing port connectivity:

$ http ifconfig.co/port/8080
{
    "ip": "54.146.20.169",
    "port": 8080,
    "reachable": false
}