These endpoints return the address from which our server received your request. If you are using a VPN or proxy, the result normally represents that connection’s exit address.
Get your public IP with curl
The home page detects curl and returns only your address, followed by a newline. Use the explicit /ip endpoint when you want a stable plain-text format with any HTTP client.
curl -sS https://thisismyip.com
curl -sS https://thisismyip.com/ip
In Windows PowerShell, use curl.exe if curl is an alias for a PowerShell command. Browsers continue to receive the normal home page.
Get a JSON response
curl -sS https://thisismyip.com/json
The basic JSON response includes ip, version (IPv4 or IPv6), and a Boolean public flag. It performs no third-party lookup.
{"ip":"8.8.8.8","version":"IPv4","public":true}Example response using a public test address. Your result will differ.
You can also request JSON from the root URL with Accept: application/json or ?format=json. Use ?format=text for plain text.
Add provider and approximate location
curl -sS 'https://thisismyip.com/json?details=1'
This adds a geo object containing isp, asn, organization, country, region, city, and timezone. Fields may be null when unavailable. Results are estimates and may describe a VPN exit or provider registration rather than your physical location.
Details use ipwho.is when a cached result is unavailable. The server queries only your detected public address. Supplying a target or ip parameter does not change the lookup destination.
Use the result in a script
Use a connection and total timeout, require a successful HTTP status, and avoid frequent polling:
PUBLIC_IP=$(curl --fail --silent --show-error \
--connect-timeout 3 --max-time 8 https://thisismyip.com/ip)
printf '%s\n' "$PUBLIC_IP"
curl -4 or curl -6 selects the connection family when your network and this domain’s DNS/server support it. The result describes the family actually used; a successful IPv4 request does not prove IPv6 connectivity.
Limits and errors
Basic address responses do not contact the provider. Detailed lookups are limited to one request per address every five seconds and 120 per minute across the site. The ten-minute cache and a site-wide allowance of 900 outbound provider calls per 24-hour window protect the shared service. This is a best-effort diagnostic endpoint without an availability guarantee.
| Status | Meaning |
|---|---|
| 200 | Address returned. For local or reserved addresses, detailed JSON includes geo: null and a notice. |
| 400 | Invalid format or details parameter. |
| 403 | A cross-site browser request attempted a detailed lookup. |
| 405 | Unsupported method. Use GET or HEAD. |
| 429 | Lookup limit reached. Wait for the number of seconds in Retry-After. |
| 503 | Address detection, lookup storage, provider allowance, or the provider is unavailable. |
JSON errors include an error string and retain the detected IP when available. HEAD requests return headers without contacting the provider. There is no cross-origin browser API permission; same-origin requests and terminal clients are supported.
Privacy and addressing
Responses use private, no-store and carry no session cookie. Basic requests process your connection address only. Detailed requests can send that public address to the lookup provider. Hosting logs may record request addresses; see the privacy policy.
This service reports an observed address. It cannot verify your VPN, identify your home address, or establish whether your device or network is secure. Use the IP address analyzer to understand address ranges and the network troubleshooting guide to investigate connectivity.