JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 6
  • Score
    100M100P100Q39707F
  • License ISC

Get Nearest Airport & City From IP Address. API to get nearest airport IATA & City using user IP

Package Exports

  • ip2nearestairport

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (ip2nearestairport) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

IP2NearestAirport Node.js Module

This Node.js module (ip2nearestairport) provides a fast lookup of country, region, city, latitude, longitude, ZIP code, time zone, ISP, domain name and usage type from IP address including nearest airport details with distance from the city center. This module uses ipinfo.io and travel payout API.

This module can be used in many types of projects such as:

  • travel projects
  • flight search websites
  • map based portable apps for showing cities and nearest airports with distance.
  • travel route guide
  • travel guides
  • tourism websites
  • select the geographically closest mirror
  • analyze your web server logs to determine the countries of your visitors
  • credit card fraud detection
  • software export controls
  • display native language and currency
  • prevent password sharing and abuse of service
  • geotargeting in advertisement

Installation

To install this module type the following:

npm install ip2nearestairport

Uses

var test = require("ip2nearestairport"); test.ip2nearestairport('13.73.31.65', function(data) { var DT=JSON.parse(data); console.log(DT.nearestairport); });
Output

{ ip: '13.73.31.65', city: 'Tokyo', region: 'Tokyo', country: 'JP', citycenter: '35.6427,139.7677',  latitude: '35.6427', longitude: '139.7677', org: 'AS8075 Microsoft Corporation', host: '', phone: '', postal: '100-0001', nearestairport: 'TYO', airportcity: 'Tokyo', countryname: 'Japan', airportcoordinate: '35.6895,139.692', airportlatitude: '35.6895', airportlongitude: '139.692', distancefromcitycenter: '8.59', distanceunit: 'Km' }

Copyright

Copyright (C) 2017 Dhiraj Das, dhirajdas.author@gmail.com