🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

ipflare

Package Overview
Dependencies
Maintainers
0
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ipflare

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.

1.0.3
latest
npm
Version published
Weekly downloads
154
1084.62%
Maintainers
0
Weekly downloads
 
Created
Source
IPFlare Logo

IP Flare

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.

Visit our website: www.ipflare.io

Installation

Install the library using npm:

npm install ipflare

Getting Started

To use the IPFlare library, you'll need an API key. You can obtain your API key from the IPFlare Dashboard.

Usage

Initialize the Library

import { IPFlare } from "ipflare";

// Initialize with your API key (required)
const geolocator = new IPFlare({
  apiKey: "your-api-key",
});

Single IP Lookup

// Look up a single IP address
const result = await geolocator.lookup("178.238.11.6");

console.log(result);

Lookup with Additional Fields

// Look up with additional fields
const resultWithFields = await geolocator.lookup("178.238.11.6", {
  include: {
    asn: true,
    isp: true,
  },
});

console.log(resultWithFields);

Bulk IP Lookup

// Look up multiple IP addresses
const bulkResults = await geolocator.bulkLookup({
  ips: ["178.238.11.6", "1.1.1.1"],
  include: {
    asn: true,
    isp: true,
  },
});

console.log(bulkResults);

Documentation

For more detailed information, please refer to our documentation:

Features

  • Single IP lookup
  • Bulk IP lookup (up to 500 IPs)
  • Optional fields support (ASN, ISP)
  • Comprehensive geolocation data
  • TypeScript support with full type definitions
  • Error handling for invalid inputs

Keywords

ip

FAQs

Package last updated on 19 Jan 2025

Did you know?

Socket

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.

Install

Related posts