$.get("https://ipinfo.io/json", function (response) { $("#ip").html(response.ip); $("#address").html(response.city + ", " + response.region); $("#details").html(JSON.stringify(response, null, 4)); }, "jsonp");