decentraleyes-geoip v0.0.7
decentraleyes-geoip
The decentraleyes-geoip microservice reference implementation
node-geoip2
npm install node-geoip2
Requires the GNU C/C++ build tools, but includes all other necessary dependencies including the MaxMind GeoIP API libraries and a GeoLite2 database to get you started.
Works with precision data sets available for purchase at the vendor's website.
Decentraleyes is not affiliated with MaxMind/GeoLite2 in any way and will not benefit from sales of their data (and doesn't want to). If, however, you want to provide excellent location lookups based on IP addresses, this is pretty much the industry standard.
API
getLocation (options, callback)
options.simple (Boolean)
Indicates whether a simple or full response is requested.
options.address (String)
The IP address to be resolved to a geographic location (if possible).
HTTP Requests
The microservice mounts HTTP request handlers to provide API service to remote callers.
GET /
required privileges: none
Perform a location lookup for a specified IP address.
address (String)
Specifies the address for which a location is being requested.
simple (Boolean, default: true)
Specifies whether the simple or full response is requested. The full request is the same information as the simple response except everything is returned in all available languages.
GET /v4
required privileges: none
Currently routes to /
GET /v6
required privileges: none
Currently routes to /