IPGeolocation API JQuery SDK
Basic Usage
Add the following script in your page:
<script src="https://cdn.jsdelivr.net/npm/ip-geolocation-api-jquery-sdk@1.0.4/ipgeolocation.min.js"></script>
Geolocation Lookup
<script>
function geoResponse(data){
console.log(data);
}
</script>
geolocation(geoResponse)
geolocationByAPIkey('YOUR_API_KEY', geoResponse)
geolocationByIP('1.1.1.1', geoResponse)
geolocationByAPIkeyAndIP('YOUR_API_KEY', '1.1.1.1', geoResponse)
geolocationByFields('geo,time_zone,currency', geoResponse)
geolocationByAPIkeyAndFields('YOUR_API_KEY', 'geo,time_zone,currency', geoResponse)
geolocationByFieldsAndIP('geo,time_zone,currency', '1.1.1.1', geoResponse)
geolocationByAPIkeyFieldsAndIp('YOUR_API_KEY', 'geo,time_zone,currency', '1.1.1.1', geoResponse)
Time Zone API
<script>
function geoResponse(data){
console.log(data);
}
</script>
timezone(geoResponse)
timezoneByAPIKey('YOUR_API_KEY', geoResponse)
timezoneByIP('1.1.1.1', geoResponse)
timezoneByAPIKeyAndIP('YOUR_API_KEY', '1.1.1.1', geoResponse)
timezoneByTz('America/Los_Angeles', geoResponse)
timezoneByAPIKeyAndTz('YOUR_API_KEY', 'America/Los_Angeles', geoResponse)
// Query time zone information by latitude and longitude of the location
timezoneByLatitudeAndLongitude( '31.4816', '74.3551', geoResponse)
timezoneByAPIKeyLatitudeAndLongitude('YOUR_API_KEY', '31.4816', '74.3551', geoResponse)