GitXplorerGitXplorer
R

iplocation

public
78 stars
23 forks
1 issues

Commits

List of commits on branch master.
Verified
338b6dc59cfffa51bba77c0df719bdd4422add55

Fix lint

RRichienb committed 3 years ago
Verified
b9d9e8030f992e19da2ad4a75eab3ac1fea1a55b

Allow a custom API key (#38)

AAman1997 committed 3 years ago
Verified
5f8cbac6e073b7c834b3fb7e2db99c98da365122

Minor readme tweak (#34)

aangelorc committed 4 years ago
Verified
d2a75b5223a8ee676612330b2f0044e3316f1d9b

Document providers (#32)

aacal11 committed 5 years ago
Verified
16d6848425d1db3947435af15eb93e327b6f6157

v7.2.0

RRichienb committed 5 years ago
Verified
2493d8f4c1f14c55686ee6bdb050d0a8e04a8b46

Update dependencies

RRichienb committed 5 years ago

README

The README file for this repository.

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.

Related