Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

maxmind

Package Overview
Dependencies
Maintainers
0
Versions
91
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

maxmind

IP lookup using Maxmind databases

  • 4.3.22
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
227K
increased by16.86%
Maintainers
0
Weekly downloads
 
Created

What is maxmind?

The maxmind npm package provides tools for IP geolocation and other related functionalities using MaxMind's GeoIP2 and GeoLite2 databases. It allows developers to determine the geographical location, ISP, and other details of an IP address.

What are maxmind's main functionalities?

IP Geolocation

This feature allows you to determine the geographical location of an IP address. The code sample demonstrates how to use the GeoLite2-City database to get the city information for the IP address '8.8.8.8'.

const maxmind = require('maxmind');
const lookup = async (ip) => {
  const cityLookup = await maxmind.open('GeoLite2-City.mmdb');
  const city = cityLookup.get(ip);
  console.log(city);
};
lookup('8.8.8.8');

ISP Information

This feature allows you to get the ISP information of an IP address. The code sample demonstrates how to use the GeoIP2-ISP database to get the ISP details for the IP address '8.8.8.8'.

const maxmind = require('maxmind');
const lookup = async (ip) => {
  const ispLookup = await maxmind.open('GeoIP2-ISP.mmdb');
  const isp = ispLookup.get(ip);
  console.log(isp);
};
lookup('8.8.8.8');

Anonymous IP Detection

This feature allows you to detect if an IP address is associated with anonymous networks such as VPNs, proxies, or Tor. The code sample demonstrates how to use the GeoIP2-Anonymous-IP database to get anonymous IP details for the IP address '8.8.8.8'.

const maxmind = require('maxmind');
const lookup = async (ip) => {
  const anonLookup = await maxmind.open('GeoIP2-Anonymous-IP.mmdb');
  const anon = anonLookup.get(ip);
  console.log(anon);
};
lookup('8.8.8.8');

Other packages similar to maxmind

Keywords

FAQs

Package last updated on 01 Oct 2024

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc