Iplocation Save

Get ip location information.

Project README

iplocation Travis CI Build Status

Get ip location information.

NPM Badge

Install

npm install iplocation

Usage

const ipLocation = require("iplocation");

(async () => {
	await ipLocation("172.217.167.78");
	//=> { latitude: -33.8591, longitude: 151.2002, region: { name: "New South Wales" ... } ... }
})();

API

ipLocation(ip, options?)

ip

Type: string

The ipv4 address to get the information for.

options

Type: object

apiKey

Type: string

An optional ipapi API key to use.

const ipLocation = require("iplocation");

(async () => {
	await ipLocation("172.217.167.78", { apiKey: 'YOUR_API_KEY' });
	//=> { latitude: -33.8591, longitude: 151.2002, region: { name: "New South Wales" ... } ... }
})();

Providers

iplocation currently uses ipapi for IP lookups. Their free API is limited to 1000 requests per day.

Open Source Agenda is not affiliated with "Iplocation" Project. README Source: Richienb/iplocation
Stars
77
Open Issues
1
Last Commit
2 years ago
Repository
License
MIT

Open Source Agenda Badge

Open Source Agenda Rating