FOR YOUR TERMINAL · 5 MIN READ
Your Public IP. One Command.
No banner, no markup, no extra fields. Command-line requests to the home page return your source IP followed by one newline. Registration lookup is a separate, explicit request.
curl
Just the domain. No parameters required.
curl ipwhois.infoThe bare command uses HTTP. Use HTTPS for encryption:
curl -fsS https://ipwhois.infoThe result is the address seen for that connection. It may be a VPN, proxy or NAT exit—not your device’s private address.
wget
wget -qO- https://ipwhois.infoPowerShell
The dedicated plain-text endpoint avoids user-agent detection.
Invoke-RestMethod https://ipwhois.info/ipIn Windows PowerShell, curl can be an alias. Use curl.exe when you specifically want the curl executable.
Always Plain Text
/ip returns plain text even in a browser. The home page serves the toolkit to ordinary browsers.
curl -fsS https://ipwhois.info/ipJSON for Your Script
/api/ip returns the same two fields: ip and version, where version is 4 or 6.
curl -fsS https://ipwhois.info/api/ip{"ip":"192.0.2.10","version":4}PowerShell converts the JSON to an object:
(Invoke-RestMethod https://ipwhois.info/api/ip).ipSelect IPv4 or IPv6
The selected family must be supported by your network.
curl -4 -fsS https://ipwhois.infocurl -6 -fsS https://ipwhois.infoLook Up Your Address’s Registration
GET /api/rdap?ip= accepts one public IPv4 or IPv6 address. It does not accept hostnames, URLs or CIDR ranges. This shell example first obtains your connection IP, then requests its registration summary:
ip="$(curl -fsS https://ipwhois.info/ip)" &&
curl -fsS -G https://ipwhois.info/api/rdap --data-urlencode "ip=$ip"PowerShell equivalent:
$ip = (Invoke-RestMethod https://ipwhois.info/api/ip).ip
Invoke-RestMethod ("https://ipwhois.info/api/rdap?ip=" + [uri]::EscapeDataString($ip))Each example uses two HTTP requests, one of which is a registry lookup. The queried address is sent through our server to an official registry service.
The Registration JSON
This is IPWHOIS’s normalized summary, not the complete raw RDAP response. Empty optional fields are not invented.
- ip / version
- The normalized queried IP and its address family.
- registry / source
- The responding registry label and official source URL.
- name / handle
- The returned network label and registry identifier.
- startAddress / endAddress
- The inclusive bounds of the returned network record.
- type / country / status
- Published record classifications; not location or reputation scores.
- events
- Available record events as action and date pairs.
- notices
- Selected notices and remarks as title and text pairs.
- fetchedAt / cached
- The original fetch timestamp and whether this observation was reused.
The page may calculate an address count or aligned CIDR from the bounds. Those are display calculations, not additional fields in this API.
Freshness and Completeness
Successful summaries may be cached in application memory for up to ten minutes. Repeated and cached calls still count against request limits. There is no cache-bypass parameter. The original fetchedAt value is retained. Statuses, events and notices are bounded for safe display; contact entities and extensions are not expanded. Follow source for the complete registry response and its usage notices.
Request Limits and Errors
The site allows 60 accepted requests per source IP in a rolling 60 seconds. Pages, assets reaching the application, API requests, HEAD requests and errors share that allowance. Registry lookups also use a separate 6-lookup per-minute budget within the total. People sharing a public IP share both budgets. Changing clients or endpoints does not reset them.
X-RateLimit-Limit and X-RateLimit-Remaining describe the overall allowance. Read them without retrieving a body:
curl -sSI https://ipwhois.info/ipThis HEAD request still counts. Use GET—not HEAD—for /api/rdap.
| HTTP status | What to do |
|---|---|
| 400 | Correct the input. Public unicast addresses only. |
| 404 | A record, supported registry route or endpoint was not found. |
| 429 | Site limit reached. Wait for the Retry-After interval. |
| 502 / 503 | The lookup could not complete or capacity/provider limits require a pause. Back off instead of retrying tightly. |
An upstream provider’s rate limit may appear as 503, not 429. Error JSON includes an error message. Handle non-success responses, use a timeout and avoid automated polling loops. This casual-use service has no uptime guarantee.