API Usage

Using ipify is ridiculously simple. You have three options. You can get your public IP directly (in plain text), you can get your public IP in JSON format, or you can get your public IP information in JSONP format (useful for Javascript developers).

IPv4

API URL Response Type Sample Output (IPv4) https://api.ipify.org text 98.207.254.136 https://api.ipify.org?format=json json {"ip":"98.207.254.136"} https://api.ipify.org?format=jsonp jsonp callback({"ip":"98.207.254.136"}); https://api.ipify.org?format=jsonp&callback=getip jsonp getip({"ip":"98.207.254.136"});

IPv6

Oct 1, 2020 the A record for api6.ipify.org will be removed to make the subdomain only for IPv6 requests. For universal access please use api64.ipify.org.

API URL Response Type Sample Output (IPv6) https://api6.ipify.org text 2a00:1450:400f:80d::200e https://api6.ipify.org?format=json json {"ip":"2a00:1450:400f:80d::200e"} https://api6.ipify.org?format=jsonp jsonp callback({"ip":"2a00:1450:400f:80d::200e"}); https://api6.ipify.org?format=jsonp&callback=getip jsonp getip({"ip":"2a00:1450:400f:80d::200e"});

Universal: IPv4/IPv6