Skip to content

Getting Started

ipwhoami is a command-line tool that looks up geolocation data for any IP address. It supports multiple providers, lets you compare results side-by-side, and outputs clean JSON for scripting. It also includes a self-hosted API powered by offline databases — no rate limits, no API keys.

The fastest way to get started is via npm:

Terminal window
npm install -g ipwhoami

Or run it directly without installing:

Terminal window
npx ipwhoami 8.8.8.8

For other install methods (Bash script, PowerShell), see the Installation page.

Run ipwhoami with no arguments to look up your own public IP:

Terminal window
ipwhoami
Fetching your public IP...
Your IP: 203.0.113.42
[ipinfo]
IP 203.0.113.42
City Sydney
Region New South Wales
Country AU
Org AS12345 Example ISP
Location -33.8688,151.2093
Timezone Australia/Sydney

Or pass a specific IP:

Terminal window
ipwhoami 8.8.8.8

Use -c to see how different providers report the same IP:

Terminal window
ipwhoami -c 1.1.1.1

This queries all three providers and shows results side-by-side — useful for verifying accuracy.

Tired of rate limits? ipwhoami includes a self-hosted geolocation API that runs on your own machine using offline databases:

3001/lookup/8.8.8.8
cd api && npm install && npm run download-db && npm start

See the Self-Hosted API guide for full details.