FOR YOUR TERMINAL · 4 MIN READ
Your public IP. One command.
No banner, no markup, no extra fields. A command-line request to MYINFO returns the source IP seen by the service, followed by one newline.
curl
Just the domain. No parameters needed.
curl whatismy.infoThat bare command uses HTTP. For an encrypted connection, use the HTTPS version below. Both return only your public IP address.
curl -fsS https://whatismy.infoThe -f option reports HTTP errors as failures; -sS hides the progress meter while keeping error messages. These options help scripts avoid treating an error page as an IP address.
Your result will be your connection’s address, not this example.
wget
Print the address directly to your terminal instead of saving a file.
wget -qO- https://whatismy.infoPowerShell
Use the dedicated plain-text endpoint in Windows PowerShell or PowerShell 7.
Invoke-RestMethod https://whatismy.info/ipThis returns an address as text. Using Invoke-RestMethod explicitly avoids confusion with shells where curl is an alias rather than the curl program.
A Predictable Plain-Text Endpoint
The /ip path always returns plain text, regardless of user agent. Use it when your script needs an address instead of the browser snapshot.
curl -fsS https://whatismy.info/ipJSON
Choose JSON when your application needs named fields instead of a line of text.
curl -fsS https://whatismy.info/api/ipip is the observed source address. version is the number 4 or 6 for this request. The response is private and non-cacheable; no API key is required.
PowerShell converts a JSON response into an object. Read its ip property if you only want the address:
(Invoke-RestMethod https://whatismy.info/api/ip).ipIPv4 or IPv6?
Ask curl to use a specific address family. Your device and network must support the family you request.
curl -4 -fsS https://whatismy.info/ipcurl -6 -fsS https://whatismy.info/ipA successful IPv4 request does not prove IPv6 is unavailable. If the IPv6 command fails, check that connection separately; the failure is not a diagnosis. NAT, VPNs, mobile networks and proxies can change the public address you see.
Connection Details & Approximate Location
Need more context? This separate JSON endpoint adds the observation time, connection source and IP-based location fields. The simple IP endpoints above stay unchanged.
curl -fsS https://whatismy.info/api/connectionLook for observedAt, source, transport and location. The location object contains status, source, countryCode, country, region, city, timezone and an explanatory note.
To inspect the location object in PowerShell:
(Invoke-RestMethod https://whatismy.info/api/connection).locationCloudflare supplies approximate IP geolocation—not GPS. Missing fields are null; check location.status before using them. A VPN exit or ISP gateway can be far from the visitor. Browser settings are not included in this API.
Choose the Right Endpoint
GET /ip- One IP and a newline. Predictable plain text for scripts.
GET /api/ip- JSON with the IP and its address family.
GET /api/connection- JSON with connection context and available IP-location estimates.
These endpoints describe the caller’s request; adding an ?ip= parameter does not look up another address. They do not identify your private LAN IP, configured DNS resolver, ISP subscription, VPN status or internet speed.
To compare a domain’s public DNS answers, visit IPDNS. For browser-reported language, time zone and display details, use My Snapshot. Browser details stay in that page until you choose to share them.
SHARED RESOURCES / CLEAR LIMITS
60 Requests per Minute. Shared by IP.
MYINFO has a 60-request limit per source IP in any rolling 60 seconds. Normal page, asset and endpoint requests share that allowance. People using the same public IP—including shared NAT or VPN exits—share the budget.
On HTTP 429, wait for the number of seconds in Retry-After before retrying. Avoid tight polling loops and reuse a result when practical. These free endpoints have no uptime commitment.
Inspect the response headers without downloading the body:
curl -sSI https://whatismy.info/ipThe -I option sends a HEAD request, so no IP body is returned. A successful response does not include Retry-After; that header is supplied when the request limit is reached.
Command references: curl documentation · PowerShell Invoke-RestMethod.