
Security News
Astral Launches pyx: A Python-Native Package Registry
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
maxmind-db-reader
Advanced tools
This is the pure Node API for reading MaxMind DB files. MaxMind DB is a binary file format that stores data indexed by IP address subnets (IPv4 or IPv6).
This is the pure Node API for reading MaxMind DB files. MaxMind DB is a binary file format that stores data indexed by IP address subnets (IPv4 or IPv6).
.open(Sync)
needs to be called once before abusing .getGeoData(Sync)
npm i maxmind-db-reader
// require the db reader
var mmdbreader = require('maxmind-db-reader');
// open database
mmdbreader.open('./countries.mmdb',function(err,countries){
// get geodata
countries.getGeoData('128.101.101.101',function(err,geodata){
// log data :D
console.log(geodata);
});
});
// require the db reader
var mmdbreader = require('maxmind-db-reader');
// open database
var countries = mmdbreader.openSync('./countries.mmdb');
// get geodata
var geodata = countries.getGeoDataSync('128.101.101.101');
// log data :D
console.log(geodata);
// require the db reader
var mmdbreader = require('maxmind-db-reader');
// open database
var countries = mmdbreader.openSync('./countries.mmdb');
// get geodata
countries.getGeoData('128.101.101.101',function(err,geodata){
// log data :D
console.log(geodata);
});
{
"city": {
"geoname_id": 5037649,
"names": {
"de": "Minneapolis",
"en": "Minneapolis",
"es": "Mineápolis",
"fr": "Minneapolis",
"ja": "ミネアポリス",
"pt-BR": "Minneapolis",
"ru": "Миннеаполис",
"zh-CN": "明尼阿波利斯"
}
},
"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": {
"latitude": 44.9759,
"longitude": -93.2166,
"metro_code": "613",
"time_zone": "America/Chicago"
},
"postal": {
"code": "55414"
},
"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": "美国"
}
},
"subdivisions": [
{
"geoname_id": 5037779,
"iso_code": "MN",
"names": {
"en": "Minnesota",
"es": "Minnesota",
"ja": "ミネソタ州",
"ru": "Миннесота"
}
}
]
}
maxmind-db-reader
.open (databasePath, callback(err, maxmind-db-reader)) void
.openSync (databasePath) maxmind-db-reader
maxmind-db-reader()
.getGeoData (ip, callback(err,geodata)) void
.getGeoDataSync (ip) geodata
.getDatabaseMetadata() metadata
FAQs
This is the pure Node API for reading MaxMind DB files. MaxMind DB is a binary file format that stores data indexed by IP address subnets (IPv4 or IPv6).
The npm package maxmind-db-reader receives a total of 2,611 weekly downloads. As such, maxmind-db-reader popularity was classified as popular.
We found that maxmind-db-reader demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
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.