whoami

Your public IP address, location and network.

curl whoami.upset.dev

fetching…

API

In a terminal you get readable text. Ask for JSON with the accept header.

curl https://whoami.upset.dev

Questions

Where does the location come from?
MaxMind GeoLite2. The country is usually right. The city often isn't, especially on mobile data.
Does it work behind a proxy or CDN?
Yes. It reads CF-Connecting-IP, X-Forwarded-For and X-Real-IP, in that order.
Is the API free?
Yes, with no sign-up. You can call it from any website. Rate limits may apply.

Related tools

Links