
Security News
Static vs. Runtime Reachability: Insights from Latio’s On the Record Podcast
The Latio podcast explores how static and runtime reachability help teams prioritize exploitable vulnerabilities and streamline AppSec workflows.
ip-geolocation-api-sdk-typescript
Advanced tools
## Installation ```cli npm i ip-geolocation-api-sdk-typescript ```
npm i ip-geolocation-api-sdk-typescript
import {IPGeolocationAPI} from './node_modules/ip-geolocation-api-sdk-typescript/IPGeolocationAPI';
import {GeolocationParams} from './node_modules/ip-geolocation-api-sdk-typescript/GeolocationParams';
import {TimezoneParams} from './node_modules/ip-geolocation-api-sdk-typescript/TimezoneParams';
var api = new IPGeolocationAPI("YOUR_API_KEY");
or
var api = new IPGeolocationAPI();
// Query geolocation for IP address (1.1.1.1) and fields (geo, time_zone and currency)
var geolocationParams = new GeolocationParams();
geolocationParams.setIp("1.1.1.1");
geolocationParams.setFields("geo,time_zone,currency");
api.getGeolocation(geolocationParams, geoResponse);
function geoResponse(json) {
console.log(json);
}
// Query geolocation for IP address (1.1.1.1) and all fields
GeolocationParams geoParams = new GeolocationParams();
geoParams.SetIp("1.1.1.1");
api.getGeolocation(geolocationParams, geoResponse);
function geoResponse(json) {
console.log(json);
}
// Query geolocation for the calling machine's IP address for all fields
api.getGeolocation(null, geoResponse);
function geoResponse(json) {
console.log(json);
}
// Query geolocations for multiple IP addresses and all fields
var geolocationParams = new GeolocationParams();
geolocationParams.setIps(['1.1.1.1','2.2.22.2','34.1.1.3']);
api.getGeolocation(geolocationParams, geoResponse);
function geoResponse(json) {
console.log(json);
}
// Query time zone information by time zone ID
var tzParams = new TimezoneParams();
tzParams.setIp("1.1.1.1");
obj.getTimezone(null, geoResponse);
function geoResponse(json) {
console.log(json);
}
FAQs
Official Typescript SDK for IPGeolocation.io. Effortlessly integrate IP Geolocation, IP Security, Timezone, ASN, Astronomy, User Agent, Abuse Contact, and Timezone Conversion APIs into your Node.js applications.
The npm package ip-geolocation-api-sdk-typescript receives a total of 341 weekly downloads. As such, ip-geolocation-api-sdk-typescript popularity was classified as not popular.
We found that ip-geolocation-api-sdk-typescript demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The Latio podcast explores how static and runtime reachability help teams prioritize exploitable vulnerabilities and streamline AppSec workflows.
Security News
The latest Opengrep releases add Apex scanning, precision rule tuning, and performance gains for open source static code analysis.
Security News
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.