{"id":21740883,"url":"https://github.com/whois-api-llc/node-simple-geoip","last_synced_at":"2025-04-13T03:41:36.745Z","repository":{"id":31867899,"uuid":"129695395","full_name":"whois-api-llc/node-simple-geoip","owner":"whois-api-llc","description":"The simplest possible way to get IP geolocation information.","archived":false,"fork":false,"pushed_at":"2023-03-01T20:26:16.000Z","size":52,"stargazers_count":4,"open_issues_count":3,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-26T20:51:26.834Z","etag":null,"topics":["geolocation","geolocation-api","ip","ip-geolocation","nodejs","whoisxmlapi"],"latest_commit_sha":null,"homepage":"https://ip-geolocation.whoisxmlapi.com/api","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/whois-api-llc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-04-16T06:29:07.000Z","updated_at":"2022-02-07T10:08:16.000Z","dependencies_parsed_at":"2023-01-14T19:57:22.750Z","dependency_job_id":null,"html_url":"https://github.com/whois-api-llc/node-simple-geoip","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whois-api-llc%2Fnode-simple-geoip","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whois-api-llc%2Fnode-simple-geoip/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whois-api-llc%2Fnode-simple-geoip/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whois-api-llc%2Fnode-simple-geoip/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/whois-api-llc","download_url":"https://codeload.github.com/whois-api-llc/node-simple-geoip/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248660851,"owners_count":21141358,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["geolocation","geolocation-api","ip","ip-geolocation","nodejs","whoisxmlapi"],"created_at":"2024-11-26T06:15:46.701Z","updated_at":"2025-04-13T03:41:36.712Z","avatar_url":"https://github.com/whois-api-llc.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# node-simple-geoip\n\n[![NPM Version](https://img.shields.io/npm/v/simple-geoip.svg?style=flat)](https://npmjs.org/package/simple-geoip)\n[![NPM Downloads](http://img.shields.io/npm/dm/simple-geoip.svg?style=flat)](https://npmjs.org/package/simple-geoip)\n[![Build Status](https://img.shields.io/travis/whois-api-llc/node-simple-geoip.svg?style=flat)](https://travis-ci.org/whois-api-llc/node-simple-geoip)\n\n*The simplest possible way to get IP geolocation information in Node.*\n\n![Email Verifier Icon](https://github.com/whois-api-llc/node-simple-geoip/raw/master/images/geoip.png)\n\n\n## Meta\n\n- Author: Randall Degges\n- Email: r@rdegges.com\n- Twitter: [@rdegges](https://twitter.com/rdegges)\n- Site: https://www.rdegges.com\n- Status: production ready\n\n\n## Prerequisites\n\nTo use this library, you'll need to create a free IP Geolocation account:\nhttps://ip-geolocation.whoisxmlapi.com/api\n\nIf you haven't done this yet, please do so now.\n\n\n## Installation\n\nTo install `simple-geoip` using [npm](https://www.npmjs.org/), simply run:\n\n```console\n$ npm install simple-geoip\n```\n\nIn the root of your project directory.\n\n\n## Usage\n\nOnce you have `simple-geoip` installed, you can use it to easily find the\nphysical location of a given IP address.\n\nThis library gives you access to all sorts of geographical location data that\nyou can use in your application in any number of ways.\n\n```javascript\nconst IpGeolocation = require(\"simple-geoip\");\n\nlet ipGeolocation = new IpGeolocation(\"your-api-key\");\nipGeolocation.lookup(\"8.8.8.8\", (err, data) =\u003e {\n  if (err) throw err;\n  console.log(data);\n});\n```\n\nHere's the sort of data you might get back when performing a ip geolocation lookup\nrequest:\n\n```json\n{\n  \"ip\": \"8.8.8.8\",\n  \"location\": {\n    \"country\": \"US\",\n    \"region\": \"California\",\n    \"city\": \"Mountain View\",\n    \"lat\": 37.40599,\n    \"lng\": -122.078514,\n    \"postalCode\": \"94043\",\n    \"timezone\": \"-08:00\"\n  }\n}\n```\n\nBy default, this library handles retrying failed HTTP requests for you. For\ninstance: if the IP Geolocation API service is currently down or having issues,\nyour request will be retried up to five consecutive times before failing.\n\nThis can add more request time, and may not be what you want in all cases.\n\nIf you'd prefer to lower the amount of retries that this library will perform on\nyour behalf, you can pass in a `retries` option like so:\n\n```javascript\nconst IPGeolocation = require(\"simple-geoip\");\n\nlet iPGeolocation = new IPGeolocation(\"your-api-key\", { retries: 2 });\n```\n\n\n## Changelog\n\n0.1.1: *05-06-2018*\n\n- Updating dependencies to handle `hoek` vulnerability.\n\n0.1.0: *04-16-2018*\n\n- First release!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwhois-api-llc%2Fnode-simple-geoip","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwhois-api-llc%2Fnode-simple-geoip","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwhois-api-llc%2Fnode-simple-geoip/lists"}