A rather inexpensive option would be to use the ipdata.co API, it's free upto 1500 requests a day.
This answer uses a 'test' API Key that is very limited and only meant for testing a few calls. Signup for your own Free API Key and get up to 1500 requests daily for development.
$.get("https://api.ipdata.co?api-key=test", function (response) {
$("#ip").html("IP: " + response.ip);
$("#city").html(response.city + ", " + response.region);
$("#response").html(JSON.stringify(response, null, 4));
}, "jsonp");
ipdata.co - IP geolocation API
View the Fiddle at https://jsfiddle.net/ipdata/6wtf0q4g/922/