UNPKG

ipflare

Version:

IP Geolocation API, our API enables you to effortlessly obtain precise geolocation data for any IP address through a single endpoint. Benefit from ultra-fast responses—typically between 50-100ms—and enjoy reliable performance with 99.9% uptime.

16 lines (15 loc) 521 B
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const _1 = require("."); const dotenv_1 = __importDefault(require("dotenv")); // Load environment variables from .env file dotenv_1.default.config(); const geolocator = new _1.IPFlare({ apiKey: process.env.API_KEY, }); geolocator.lookup("178.238.11.6").then((result) => { console.log(result); });