What is my IP address?

54.242.224.250

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

CLI examples:

$ curl ifconfig.co
54.242.224.250

$ http -b ifconfig.co
54.242.224.250

$ wget -qO- ifconfig.co
54.242.224.250

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

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-242-224-250.compute-1.amazonaws.com",
    "ip": "54.242.224.250",
    "ip_decimal": 921886970
}

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

Testing port connectivity:

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