What is my IP address?

3.236.50.201

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

All endpoints, with the exception of /port, can return information about a custom IP address specified via ?ip= query parameter.

CLI examples

$ curl https://ip.0xcb.dev
3.236.50.201

$ http -b https://ip.0xcb.dev
3.236.50.201

$ ht -b https://ip.0xcb.dev
3.236.50.201

$ wget -qO- https://ip.0xcb.dev
3.236.50.201

$ fetch -qo- https://ip.0xcb.dev
3.236.50.201

$ bat -print=b https://ip.0xcb.dev/ip
3.236.50.201

Country lookup

$ curl https://ip.0xcb.dev/country
United States

$ curl https://ip.0xcb.dev/country-iso
US

City lookup

$ curl https://ip.0xcb.dev/city
Ashburn

ASN lookup

$ curl https://ip.0xcb.dev/asn
AS14618

JSON output

$ curl https://ip.0xcb.dev/json
{
  "ip": "3.236.50.201",
  "ip_decimal": 65811145,
  "country": "United States",
  "country_iso": "US",
  "country_eu": false,
  "region_name": "Virginia",
  "region_code": "VA",
  "metro_code": 511,
  "zip_code": "20149",
  "city": "Ashburn",
  "latitude": 39.0481,
  "longitude": -77.4728,
  "time_zone": "America/New_York",
  "asn": "AS14618",
  "asn_org": "AMAZON-AES",
  "hostname": "ec2-3-236-50-201.compute-1.amazonaws.com",
  "user_agent": {
    "product": "CCBot",
    "version": "2.0",
    "comment": "(https://commoncrawl.org/faq/)",
    "raw_value": "CCBot/2.0 (https://commoncrawl.org/faq/)"
  }
}

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.

$ curl https://ip.0xcb.dev/ip
3.236.50.201

Port testing

$ curl https://ip.0xcb.dev/port/8080
{
  "ip": "3.236.50.201",
  "port": 8080,
  "reachable": false
}

Map