{"id":21740872,"url":"https://github.com/whois-api-llc/express-simple-geoip","last_synced_at":"2026-04-08T18:04:34.591Z","repository":{"id":143878973,"uuid":"130093277","full_name":"whois-api-llc/express-simple-geoip","owner":"whois-api-llc","description":"The simplest geolocation middleware for Express that sets location data on the request object.","archived":false,"fork":false,"pushed_at":"2022-09-21T08:07:36.000Z","size":22,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-10-04T23:34:53.029Z","etag":null,"topics":["expressjs","geolocation-api","ip","ip-geolocation","ip-geolocation-api","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,"governance":null}},"created_at":"2018-04-18T16:41:32.000Z","updated_at":"2022-02-07T10:14:00.000Z","dependencies_parsed_at":null,"dependency_job_id":"7875ab68-f39d-403d-8e6d-b7a98e91eb52","html_url":"https://github.com/whois-api-llc/express-simple-geoip","commit_stats":{"total_commits":14,"total_committers":2,"mean_commits":7.0,"dds":0.0714285714285714,"last_synced_commit":"48aeedd3f27aedf8a7b45e6a7027376269586eb4"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/whois-api-llc/express-simple-geoip","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whois-api-llc%2Fexpress-simple-geoip","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whois-api-llc%2Fexpress-simple-geoip/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whois-api-llc%2Fexpress-simple-geoip/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whois-api-llc%2Fexpress-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/express-simple-geoip/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whois-api-llc%2Fexpress-simple-geoip/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31567255,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"ssl_error","status_checked_at":"2026-04-08T14:31:17.202Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["expressjs","geolocation-api","ip","ip-geolocation","ip-geolocation-api","nodejs","whoisxmlapi"],"created_at":"2024-11-26T06:15:44.040Z","updated_at":"2026-04-08T18:04:34.535Z","avatar_url":"https://github.com/whois-api-llc.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# express-simple-geoip\n\n[![NPM Version](https://img.shields.io/npm/v/express-simple-geoip.svg?style=flat)](https://npmjs.org/package/express-simple-geoip)\n[![NPM Downloads](http://img.shields.io/npm/dm/express-simple-geoip.svg?style=flat)](https://npmjs.org/package/express-simple-geoip)\n[![Build Status](https://img.shields.io/travis/whois-api-llc/express-simple-geoip.svg?style=flat)](https://travis-ci.org/whois-api-llc/express-simple-geoip)\n\n*The simplest geolocation middleware for Express that sets location data on the\nrequest object.*\n\n![Email Verifier Icon](https://github.com/whois-api-llc/express-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 `express-simple-geoip` using [npm](https://www.npmjs.org/), simply run:\n\n```console\n$ npm install express-simple-geoip\n```\n\nIn the root of your project directory.\n\n\n## Usage\n\nOnce you have `express-simple-geoip` installed, you can use it to easily get\nthe physical location of a given IP address for every incoming HTTP request your\nweb service gets.\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 express = require(\"express\");\nconst simpleIP = require(\"express-simple-geoip\");\n\nlet app = express();\n\napp.use(simpleIP(\"your-api-key\"));\n\napp.get(\"/\", (req, res) =\u003e {\n  console.log(req.geoip);   // print the incoming requester's IP Geolocation data\n  // ...\n});\n\napp.listen(3000);\n```\n\nIf you run this minimal Express app and then visit the `/` URL, you'll see some\ngeolocation data printed to the console that looks something like this (*based\non your inbound IP address*):\n\n```json\n{\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\nThis library is built on top of the excellent [node-simple-geoip](https://github.com/whois-api-llc/node-simple-geoip)\nlibrary. It will automatically tack IP Geolocation data onto each incoming `req` object\nas `req.geoip`.\n\nSo all you need to do in your code is:\n\n1. Initialize the `simpleIP` middleware, passing in your IP Geolocation API key\n2. Use the data found in `req.geoip`\n3. ???\n4. Profit!\n\nPretty simple, right?!\n\n\n## Changelog\n\n0.1.1: *04-18-2018*\n\n- Removing images from npm package.\n\n0.1.0: *04-18-2018*\n\n- First release!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwhois-api-llc%2Fexpress-simple-geoip","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwhois-api-llc%2Fexpress-simple-geoip","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwhois-api-llc%2Fexpress-simple-geoip/lists"}