Socket
Socket
Sign inDemoInstall

maxmind-country

Package Overview
Dependencies
Maintainers
1
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

maxmind-country

Maxmind GeoLite2 Country Database


Version published
Weekly downloads
92
decreased by-52.82%
Maintainers
1
Weekly downloads
 
Created
Source

Maxmind Databases

Maxmind / Geolite2 databases for node-maxmind

CircleCI

Packages

All packages will be auto updated and published every monday.

PackageLatestSize
maxmind-countrynpm versioninstall size
maxmind-asnnpm versioninstall size
maxmind-citynpm versioninstall size

Usage

Require maxmind:

const maxmind = require('maxmind')

Load either max-city, max-country or max-asn packages:

// City Lookup
const lookupCity = maxmind.openSync(require('maxmind-city'))
const city = lookupCity.get('8.8.8.8')

// Country Lookup
const lookupCountry = maxmind.openSync(require('maxmind-country'))
const country = lookupCountry.get('8.8.8.8')

// ASN Lookup
const lookupASN = maxmind.openSync(require('maxmind-asn'))
const asn = lookupASN.get('8.8.8.8')

Example results

ASN

{
  "autonomous_system_number": 15169,
  "autonomous_system_organization": "Google LLC"
}

Country

{
  "continent": {
    "code": "NA",
    "geoname_id": 6255149,
    "names": {
      "de": "Nordamerika",
      "en": "North America",
      "es": "Norteamérica",
      "fr": "Amérique du Nord",
      "ja": "北アメリカ",
      "pt-BR": "América do Norte",
      "ru": "Северная Америка",
      "zh-CN": "北美洲"
    }
  },
  "country": {
    "geoname_id": 6252001,
    "iso_code": "US",
    "names": {
      "de": "USA",
      "en": "United States",
      "es": "Estados Unidos",
      "fr": "États-Unis",
      "ja": "アメリカ合衆国",
      "pt-BR": "Estados Unidos",
      "ru": "США",
      "zh-CN": "美国"
    }
  },
  "registered_country": {
    "geoname_id": 6252001,
    "iso_code": "US",
    "names": {
      "de": "USA",
      "en": "United States",
      "es": "Estados Unidos",
      "fr": "États-Unis",
      "ja": "アメリカ合衆国",
      "pt-BR": "Estados Unidos",
      "ru": "США",
      "zh-CN": "美国"
    }
  }
}

City

NOTE: Latitude and longitude are not precise and should not be used to identify a particular street address or household.

{
  "continent": {
    "code": "NA",
    "geoname_id": 6255149,
    "names": {
      "de": "Nordamerika",
      "en": "North America",
      "es": "Norteamérica",
      "fr": "Amérique du Nord",
      "ja": "北アメリカ",
      "pt-BR": "América do Norte",
      "ru": "Северная Америка",
      "zh-CN": "北美洲"
    }
  },
  "country": {
    "geoname_id": 6252001,
    "iso_code": "US",
    "names": {
      "de": "USA",
      "en": "United States",
      "es": "Estados Unidos",
      "fr": "États-Unis",
      "ja": "アメリカ合衆国",
      "pt-BR": "Estados Unidos",
      "ru": "США",
      "zh-CN": "美国"
    }
  },
  "location": {
    "accuracy_radius": 1000,
    "latitude": 37.751,
    "longitude": -97.822
  },
  "registered_country": {
    "geoname_id": 6252001,
    "iso_code": "US",
    "names": {
      "de": "USA",
      "en": "United States",
      "es": "Estados Unidos",
      "fr": "États-Unis",
      "ja": "アメリカ合衆国",
      "pt-BR": "Estados Unidos",
      "ru": "США",
      "zh-CN": "美国"
    }
  }
}

Development

Run ./scripts/fetch and ./scripts/update to fetch latest databases.

License

This product includes GeoLite2 data created by MaxMind, available from http://www.maxmind.com

Packages published under MIT

Keywords

FAQs

Package last updated on 09 Sep 2019

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