$ curl https://ip.0xcb.dev 3.239.33.139 $ http -b https://ip.0xcb.dev 3.239.33.139 $ ht -b https://ip.0xcb.dev 3.239.33.139 $ wget -qO- https://ip.0xcb.dev 3.239.33.139 $ fetch -qo- https://ip.0xcb.dev 3.239.33.139 $ bat -print=b https://ip.0xcb.dev/ip 3.239.33.139
$ curl https://ip.0xcb.dev/country United States $ curl https://ip.0xcb.dev/country-iso US
$ curl https://ip.0xcb.dev/city Ashburn
$ curl https://ip.0xcb.dev/asn AS14618
$ curl https://ip.0xcb.dev/json { "ip": "3.239.33.139", "ip_decimal": 66003339, "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-239-33-139.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.
Always returns the IP address including a trailing newline, regardless of user agent.
$ curl https://ip.0xcb.dev/ip 3.239.33.139
$ curl https://ip.0xcb.dev/port/8080 { "ip": "3.239.33.139", "port": 8080, "reachable": false }