What is my IP address?

54.161.175.236

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

CLI examples:

$ curl ifconfig.co
54.161.175.236

$ http -b ifconfig.co
54.161.175.236

$ wget -qO- ifconfig.co
54.161.175.236

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

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-161-175-236.compute-1.amazonaws.com",
    "ip": "54.161.175.236",
    "ip_decimal": 916565996
}

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

Testing port connectivity:

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