CheckIP.ca
CheckIP.ca API documentation
The API returns the public IP and Cloudflare-provided network metadata for the connection making the request. It requires no account or API key.
JSON endpoint
GET https://checkip.ca/api/ip
curl https://checkip.ca/api/ip
HEAD is also supported and returns the same response headers without a body. Other methods return 405 Method Not Allowed.
Example response
{
"ip": "203.0.113.42",
"type": "IPv4",
"country": "CA",
"city": "Regina",
"region": "Saskatchewan",
"timezone": "America/Regina",
"asn": 64500,
"isp": "Example Network",
"colo": "YYZ"
}
The address and network values above are documentation examples, not a claim about the reader's connection.
Response fields
ip- The public address presented by the request.
typeIPv4orIPv6, inferred from the address format.country- Cloudflare's two-letter country code, or
Unknown. city- Cloudflare's approximate city, or
Unknown. region- Cloudflare's approximate region, or
Unknown. timezone- Cloudflare's timezone value, or
Unknown. asn- The autonomous system number as a number when available; otherwise
Unknown. isp- Cloudflare's autonomous-system organization value, or
Unknown. It may identify a carrier, host, VPN, or proxy rather than a retail ISP. colo- The Cloudflare edge-location code that handled the request, or
Unknown.
Headers and indexing
Content-Type: application/json; charset=utf-8Access-Control-Allow-Origin: *Cache-Control: private, no-storeX-Robots-Tag: noindexkeeps the raw response out of search indexes.
Plain-text address
Recognized command-line clients can request https://checkip.ca/ to receive only the public address and a newline:
curl https://checkip.ca
Use curl --ipv4 https://checkip.ca or curl --ipv6 https://checkip.ca to ask curl to connect with a specific IP protocol when your network supports it.
Limitations
All metadata describes the requesting connection and is approximate. VPNs, proxies, mobile gateways, and CGNAT can change or share the address and associated location. The API does not look up an arbitrary IP address and does not provide authentication, history, bulk lookup, uptime guarantees, or a service-level agreement.