Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including node-iplocate with all npm packages installed. Try it out:

var nodeIplocate = require("node-iplocate")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

node-iplocate v1.0.1

Find geolocation data from IP addresses (e.g. city, country, timezone) using the API


Find geolocation data from IP addresses (e.g. city, country, timezone) using the API. provides 1,500 free requests per day. For higher plans, check out the website

NPM Package Version NPM Package License NPM Package Downloads devDependencies Status

Node Version Travis CI Build Status Code Climate Status Coverage Status

NPM Package Statistics


npm install node-iplocate

Usage Example

const iplocate = require("node-iplocate");

iplocate("").then(function(results) {
  console.log("IP Address: " + results.ip);
  console.log("Country: " + + " (" + results.country_code + ")");
  console.log("Continent: " + results.continent);
  console.log("Organisation: " + + " (" + results.asn + ")");

  console.log(JSON.stringify(results, null, 2));

// Or with callbacks
iplocate("", null, function(err, results) {
  // ...
  console.log(JSON.stringify(results, null, 2));

// Provide an API key from
iplocate("", { api_key: "abcdef" }).then(function(results) {
  // ...

IP Address:
Country: United States (US)
Continent: North America
Organisation: Google LLC (AS15169)

  "ip": "",
  "country": "United States",
  "country_code": "US",
  "city": null,
  "continent": "North America",
  "latitude": 37.751,
  "longitude": -97.822,
  "time_zone": null,
  "postal_code": null,
  "org": "Google LLC",
  "asn": "AS15169"


To run the test suite, first install the dependencies, then run npm test:

$ npm install
$ npm test


Distributed under the MIT License.

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free